mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Modularize more components
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
@extends('layout.basecomponent')
|
||||
@push('componentScripts')
|
||||
<script src="/viewjs/components/batterycard.js"></script>
|
||||
@endpush
|
||||
|
||||
@section('componentJsName', 'batterycard')
|
||||
|
||||
@section('componentContent')
|
||||
<div class="main well">
|
||||
|
||||
<h3>Battery overview <strong><span id="batterycard-battery-name"></span></strong></h3>
|
||||
@@ -13,4 +12,3 @@
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
14
views/components/datepicker.blade.php
Normal file
14
views/components/datepicker.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@push('componentScripts')
|
||||
<script src="/viewjs/components/datepicker.js"></script>
|
||||
@endpush
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ $id }}">{!! $label !!} <span class="small text-muted"><time id="datepicker-timeago" class="timeago timeago-contextual"></time></span></label>
|
||||
<div class="input-group date">
|
||||
<input type="text" data-isodate="isodate" class="form-control datepicker" id="{{ $id }}" name="{{ $id }}" required autocomplete="off">
|
||||
<div id="datepicker-button" class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
14
views/components/datetimepicker.blade.php
Normal file
14
views/components/datetimepicker.blade.php
Normal file
@@ -0,0 +1,14 @@
|
||||
@push('componentScripts')
|
||||
<script src="/viewjs/components/datetimepicker.js"></script>
|
||||
@endpush
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ $id }}">{{ $label }}</label>
|
||||
<div class="input-group date datetimepicker">
|
||||
<input type="text" class="form-control" id="{{ $id }}" name="{{ $id }}" required>
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
@@ -1,8 +1,7 @@
|
||||
@extends('layout.basecomponent')
|
||||
@push('componentScripts')
|
||||
<script src="/viewjs/components/habitcard.js"></script>
|
||||
@endpush
|
||||
|
||||
@section('componentJsName', 'habitcard')
|
||||
|
||||
@section('componentContent')
|
||||
<div class="main well">
|
||||
|
||||
<h3>Habit overview <strong><span id="habitcard-habit-name"></span></strong></h3>
|
||||
@@ -13,4 +12,3 @@
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
@@ -1,8 +1,7 @@
|
||||
@extends('layout.basecomponent')
|
||||
@push('componentScripts')
|
||||
<script src="/viewjs/components/productcard.js"></script>
|
||||
@endpush
|
||||
|
||||
@section('componentJsName', 'productcard')
|
||||
|
||||
@section('componentContent')
|
||||
<div class="main well">
|
||||
|
||||
<h3>Product overview <strong><span id="productcard-product-name"></span></strong></h3>
|
||||
@@ -15,4 +14,3 @@
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
@@ -22,16 +22,10 @@
|
||||
<div id="product-error" class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="tracked_time">Tracked time</label>
|
||||
<div class="input-group date datetimepicker">
|
||||
<input type="text" class="form-control" id="tracked_time" name="tracked_time" required >
|
||||
<span class="input-group-addon">
|
||||
<span class="fa fa-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
@include('components.datetimepicker', array(
|
||||
'id' => 'tracked_time',
|
||||
'label' => 'Tracked time'
|
||||
))
|
||||
|
||||
<button id="save-habittracking-button" type="submit" class="btn btn-default">OK</button>
|
||||
|
||||
|
@@ -30,16 +30,10 @@
|
||||
<div id="inventory-change-info" class="help-block text-muted"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="best_before_date">Best before <span class="small text-muted">This will apply to added products</span></label>
|
||||
<div class="input-group date">
|
||||
<input type="text" data-isodate="isodate" class="form-control datepicker" id="best_before_date" name="best_before_date" autocomplete="off">
|
||||
<div id="best_before_date-datepicker-button" class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
@include('components.datepicker', array(
|
||||
'id' => 'best_before_date',
|
||||
'label' => 'Best before <span class="small text-muted">This will apply to added products</span>'
|
||||
))
|
||||
|
||||
<button id="save-inventory-button" type="submit" class="btn btn-default">OK</button>
|
||||
|
||||
|
@@ -1,6 +0,0 @@
|
||||
@section('componentContent')
|
||||
@show
|
||||
|
||||
@push('componentScripts')
|
||||
<script src="/viewjs/components/@yield('componentJsName').js"></script>
|
||||
@endpush
|
@@ -206,8 +206,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
@section('content')
|
||||
@show
|
||||
@yield('content')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -23,16 +23,10 @@
|
||||
<div id="flow-info-addbarcodetoselection" class="text-muted small hide"><strong><span id="addbarcodetoselection"></span></strong> will be added to the list of barcodes for the selected product on submit.</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="best_before_date">Best before <span class="small text-muted"><time id="best-before-timeago" class="timeago timeago-contextual"></time></span></label>
|
||||
<div class="input-group date">
|
||||
<input type="text" data-isodate="isodate" class="form-control datepicker" id="best_before_date" name="best_before_date" required autocomplete="off">
|
||||
<div id="best_before_date-datepicker-button" class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
@include('components.datepicker', array(
|
||||
'id' => 'best_before_date',
|
||||
'label' => 'Best before'
|
||||
))
|
||||
|
||||
<div class="form-group">
|
||||
<label for="amount">Amount <span id="amount_qu_unit" class="small text-muted"></span></label>
|
||||
|
Reference in New Issue
Block a user