mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Applied .blade.php formatting rules
This commit is contained in:
@@ -1,27 +1,28 @@
|
||||
@if (!GROCY_DISABLE_BROWSER_BARCODE_CAMERA_SCANNING)
|
||||
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/barcodescanner.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/barcodescanner.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@push('pageScripts')
|
||||
<script src="{{ $U('/node_modules/@ericblade/quagga2/dist/quagga.min.js?v=', true) }}{{ $version }}"></script>
|
||||
<script src="{{ $U('/node_modules/@ericblade/quagga2/dist/quagga.min.js?v=', true) }}{{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@push('pageStyles')
|
||||
<style>
|
||||
#barcodescanner-start-button {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
margin-top: 4px;
|
||||
margin-right: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
<style>
|
||||
#barcodescanner-start-button {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
margin-top: 4px;
|
||||
margin-right: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.combobox-container #barcodescanner-start-button {
|
||||
margin-right: 36px !important;
|
||||
}
|
||||
</style>
|
||||
.combobox-container #barcodescanner-start-button {
|
||||
margin-right: 36px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@endif
|
||||
|
@@ -1,21 +1,31 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/batterycard.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/batterycard.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
<div class="card batterycard">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-battery-three-quarters"></i> {{ $__t('Battery overview') }}
|
||||
<a id="batterycard-battery-edit-button" class="btn btn-sm btn-outline-info py-0 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Edit battery') }}">
|
||||
<a id="batterycard-battery-edit-button"
|
||||
class="btn btn-sm btn-outline-info py-0 float-right disabled"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Edit battery') }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a id="batterycard-battery-journal-button" class="btn btn-sm btn-outline-secondary py-0 mr-2 float-right disabled show-as-dialog-link" href="#" data-toggle="tooltip" title="{{ $__t('Journal for this battery') }}">
|
||||
<a id="batterycard-battery-journal-button"
|
||||
class="btn btn-sm btn-outline-secondary py-0 mr-2 float-right disabled show-as-dialog-link"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Journal for this battery') }}">
|
||||
<i class="fas fa-file-alt"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h3><span id="batterycard-battery-name"></span></h3>
|
||||
<strong>{{ $__t('Used in') }}:</strong> <span id="batterycard-battery-used_in"></span><br>
|
||||
<strong>{{ $__t('Charge cycles count') }}:</strong> <span id="batterycard-battery-charge-cycles-count" class="locale-number locale-number-generic"></span><br>
|
||||
<strong>{{ $__t('Last charged') }}:</strong> <span id="batterycard-battery-last-charged"></span> <time id="batterycard-battery-last-charged-timeago" class="timeago timeago-contextual"></time><br>
|
||||
<strong>{{ $__t('Charge cycles count') }}:</strong> <span id="batterycard-battery-charge-cycles-count"
|
||||
class="locale-number locale-number-generic"></span><br>
|
||||
<strong>{{ $__t('Last charged') }}:</strong> <span id="batterycard-battery-last-charged"></span> <time id="batterycard-battery-last-charged-timeago"
|
||||
class="timeago timeago-contextual"></time><br>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/calendarcard.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/calendarcard.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
<div class="card">
|
||||
@@ -7,6 +7,7 @@
|
||||
<i class="fas fa-calendar"></i> {{ $__t('Calendar') }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="calendar" data-target-input="nearest"></div>
|
||||
<div id="calendar"
|
||||
data-target-input="nearest"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,21 +1,31 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/chorecard.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/chorecard.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
<div class="card chorecard">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-home"></i> {{ $__t('Chore overview') }}
|
||||
<a id="chorecard-chore-edit-button" class="btn btn-sm btn-outline-info py-0 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Edit chore') }}">
|
||||
<a id="chorecard-chore-edit-button"
|
||||
class="btn btn-sm btn-outline-info py-0 float-right disabled"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Edit chore') }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a id="chorecard-chore-journal-button" class="btn btn-sm btn-outline-secondary py-0 mr-2 float-right disabled show-as-dialog-link" href="#" data-toggle="tooltip" title="{{ $__t('Journal for this chore') }}">
|
||||
<a id="chorecard-chore-journal-button"
|
||||
class="btn btn-sm btn-outline-secondary py-0 mr-2 float-right disabled show-as-dialog-link"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Journal for this chore') }}">
|
||||
<i class="fas fa-file-alt"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h3><span id="chorecard-chore-name"></span></h3>
|
||||
<strong>{{ $__t('Tracked count') }}:</strong> <span id="chorecard-chore-tracked-count" class="locale-number locale-number-generic"></span><br>
|
||||
<strong>{{ $__t('Last tracked') }}:</strong> <span id="chorecard-chore-last-tracked"></span> <time id="chorecard-chore-last-tracked-timeago" class="timeago timeago-contextual"></time><br>
|
||||
<strong>{{ $__t('Tracked count') }}:</strong> <span id="chorecard-chore-tracked-count"
|
||||
class="locale-number locale-number-generic"></span><br>
|
||||
<strong>{{ $__t('Last tracked') }}:</strong> <span id="chorecard-chore-last-tracked"></span> <time id="chorecard-chore-last-tracked-timeago"
|
||||
class="timeago timeago-contextual"></time><br>
|
||||
@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
|
||||
<strong>{{ $__t('Last done by') }}:</strong> <span id="chorecard-chore-last-done-by"></span>
|
||||
@endif
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/datetimepicker.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/datetimepicker.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php if(!isset($isRequired)) { $isRequired = true; } @endphp
|
||||
@@ -16,33 +16,60 @@
|
||||
@php if(empty($additionalGroupCssClasses)) { $additionalGroupCssClasses = ''; } @endphp
|
||||
@php if(empty($activateNumberPad)) { $activateNumberPad = false; } @endphp
|
||||
|
||||
<div id="datetimepicker-wrapper" class="form-group {{ $additionalGroupCssClasses }}">
|
||||
<div id="datetimepicker-wrapper"
|
||||
class="form-group {{ $additionalGroupCssClasses }}">
|
||||
<label for="{{ $id }}">{{ $__t($label) }}
|
||||
<span class="small text-muted">
|
||||
@if(!empty($hint)){{ $__t($hint) }}@endif
|
||||
<time id="datetimepicker-timeago" class="timeago timeago-contextual"></time>
|
||||
<time id="datetimepicker-timeago"
|
||||
class="timeago timeago-contextual"></time>
|
||||
</span>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group date datetimepicker @if(!empty($additionalGroupCssClasses)){{ $additionalGroupCssClasses }}@endif" id="{{ $id }}" @if(!$noNameAttribute) name="{{ $id }}" @endif data-target-input="nearest">
|
||||
<input {!! $additionalAttributes !!} type="text" @if($activateNumberPad) inputmode="numeric" @endif @if($isRequired) @if($isRequired) required @endif @endif class="form-control datetimepicker-input @if(!empty($additionalCssClasses)){{ $additionalCssClasses }}@endif"
|
||||
data-target="#{{ $id }}" data-format="{{ $format }}"
|
||||
<div class="input-group date datetimepicker @if(!empty($additionalGroupCssClasses)){{ $additionalGroupCssClasses }}@endif"
|
||||
id="{{ $id }}"
|
||||
@if(!$noNameAttribute)
|
||||
name="{{ $id }}"
|
||||
@endif
|
||||
data-target-input="nearest">
|
||||
<input {!!
|
||||
$additionalAttributes
|
||||
!!}
|
||||
type="text"
|
||||
@if($activateNumberPad)
|
||||
inputmode="numeric"
|
||||
@endif
|
||||
@if($isRequired)
|
||||
@if($isRequired)
|
||||
required
|
||||
@endif
|
||||
@endif
|
||||
class="form-control datetimepicker-input @if(!empty($additionalCssClasses)){{ $additionalCssClasses }}@endif"
|
||||
data-target="#{{ $id }}"
|
||||
data-format="{{ $format }}"
|
||||
data-init-with-now="{{ BoolToString($initWithNow) }}"
|
||||
data-init-value="{{ $initialValue }}"
|
||||
data-limit-end-to-now="{{ BoolToString($limitEndToNow) }}"
|
||||
data-limit-start-to-now="{{ BoolToString($limitStartToNow) }}"
|
||||
data-next-input-selector="{{ $nextInputSelector }}"
|
||||
data-earlier-than-limit="{{ $earlierThanInfoLimit }}" />
|
||||
<div class="input-group-append" data-target="#{{ $id }}" data-toggle="datetimepicker">
|
||||
<div class="input-group-append"
|
||||
data-target="#{{ $id }}"
|
||||
data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-calendar"></i></div>
|
||||
</div>
|
||||
<div class="invalid-feedback">{{ $invalidFeedback }}</div>
|
||||
</div>
|
||||
<div id="datetimepicker-earlier-than-info" class="form-text text-info font-italic d-none">{{ $earlierThanInfoText }}</div>
|
||||
<div id="datetimepicker-earlier-than-info"
|
||||
class="form-text text-info font-italic d-none">{{ $earlierThanInfoText }}</div>
|
||||
@if(isset($shortcutValue) && isset($shortcutLabel))
|
||||
<div class="form-check w-100">
|
||||
<input class="form-check-input" type="checkbox" id="datetimepicker-shortcut" data-datetimepicker-shortcut-value="{{ $shortcutValue }}">
|
||||
<label class="form-check-label" for="datetimepicker-shortcut">{{ $__t($shortcutLabel) }}</label>
|
||||
<input class="form-check-input"
|
||||
type="checkbox"
|
||||
id="datetimepicker-shortcut"
|
||||
data-datetimepicker-shortcut-value="{{ $shortcutValue }}">
|
||||
<label class="form-check-label"
|
||||
for="datetimepicker-shortcut">{{ $__t($shortcutLabel) }}</label>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/datetimepicker2.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/datetimepicker2.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php if(!isset($isRequired)) { $isRequired = true; } @endphp
|
||||
@@ -15,33 +15,57 @@
|
||||
@php if(empty($additionalAttributes)) { $additionalAttributes = ''; } @endphp
|
||||
@php if(empty($additionalGroupCssClasses)) { $additionalGroupCssClasses = ''; } @endphp
|
||||
|
||||
<div id="datetimepicker2-wrapper" class="form-group {{ $additionalGroupCssClasses }}">
|
||||
<div id="datetimepicker2-wrapper"
|
||||
class="form-group {{ $additionalGroupCssClasses }}">
|
||||
<label for="{{ $id }}">{{ $__t($label) }}
|
||||
<span class="small text-muted">
|
||||
@if(!empty($hint)){{ $__t($hint) }}@endif
|
||||
<time id="datetimepicker2-timeago" class="timeago timeago-contextual"></time>
|
||||
<time id="datetimepicker2-timeago"
|
||||
class="timeago timeago-contextual"></time>
|
||||
</span>
|
||||
</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group date datetimepicker2 @if(!empty($additionalGroupCssClasses)){{ $additionalGroupCssClasses }}@endif" id="{{ $id }}" @if(!$noNameAttribute) name="{{ $id }}" @endif data-target-input="nearest">
|
||||
<input {!! $additionalAttributes !!} type="text" @if($isRequired) @if($isRequired) required @endif @endif class="form-control datetimepicker2-input @if(!empty($additionalCssClasses)){{ $additionalCssClasses }}@endif"
|
||||
data-target="#{{ $id }}" data-format="{{ $format }}"
|
||||
<div class="input-group date datetimepicker2 @if(!empty($additionalGroupCssClasses)){{ $additionalGroupCssClasses }}@endif"
|
||||
id="{{ $id }}"
|
||||
@if(!$noNameAttribute)
|
||||
name="{{ $id }}"
|
||||
@endif
|
||||
data-target-input="nearest">
|
||||
<input {!!
|
||||
$additionalAttributes
|
||||
!!}
|
||||
type="text"
|
||||
@if($isRequired)
|
||||
@if($isRequired)
|
||||
required
|
||||
@endif
|
||||
@endif
|
||||
class="form-control datetimepicker2-input @if(!empty($additionalCssClasses)){{ $additionalCssClasses }}@endif"
|
||||
data-target="#{{ $id }}"
|
||||
data-format="{{ $format }}"
|
||||
data-init-with-now="{{ BoolToString($initWithNow) }}"
|
||||
data-init-value="{{ $initialValue }}"
|
||||
data-limit-end-to-now="{{ BoolToString($limitEndToNow) }}"
|
||||
data-limit-start-to-now="{{ BoolToString($limitStartToNow) }}"
|
||||
data-next-input-selector="{{ $nextInputSelector }}"
|
||||
data-earlier-than-limit="{{ $earlierThanInfoLimit }}" />
|
||||
<div class="input-group-append" data-target="#{{ $id }}" data-toggle="datetimepicker">
|
||||
<div class="input-group-append"
|
||||
data-target="#{{ $id }}"
|
||||
data-toggle="datetimepicker">
|
||||
<div class="input-group-text"><i class="fas fa-calendar"></i></div>
|
||||
</div>
|
||||
<div class="invalid-feedback">{{ $invalidFeedback }}</div>
|
||||
</div>
|
||||
<div id="datetimepicker2-earlier-than-info" class="form-text text-info font-italic d-none">{{ $earlierThanInfoText }}</div>
|
||||
<div id="datetimepicker2-earlier-than-info"
|
||||
class="form-text text-info font-italic d-none">{{ $earlierThanInfoText }}</div>
|
||||
@if(isset($shortcutValue) && isset($shortcutLabel))
|
||||
<div class="form-check w-100">
|
||||
<input class="form-check-input" type="checkbox" id="datetimepicker2-shortcut" data-datetimepicker2-shortcut-value="{{ $shortcutValue }}">
|
||||
<label class="form-check-label" for="datetimepicker2-shortcut">{{ $__t($shortcutLabel) }}</label>
|
||||
<input class="form-check-input"
|
||||
type="checkbox"
|
||||
id="datetimepicker2-shortcut"
|
||||
data-datetimepicker2-shortcut-value="{{ $shortcutValue }}">
|
||||
<label class="form-check-label"
|
||||
for="datetimepicker2-shortcut">{{ $__t($shortcutLabel) }}</label>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/locationpicker.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/locationpicker.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php if(empty($prefillByName)) { $prefillByName = ''; } @endphp
|
||||
@@ -7,12 +7,21 @@
|
||||
@php if(!isset($isRequired)) { $isRequired = true; } @endphp
|
||||
@php if(empty($hint)) { $hint = ''; } @endphp
|
||||
|
||||
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}">
|
||||
<label for="location_id">{{ $__t('Location') }} <span id="{{ $hintId }}" class="small text-muted">{{ $hint }}</span></label>
|
||||
<select class="form-control location-combobox" id="location_id" name="location_id" @if($isRequired) required @endif>
|
||||
<div class="form-group"
|
||||
data-next-input-selector="{{ $nextInputSelector }}"
|
||||
data-prefill-by-name="{{ $prefillByName }}"
|
||||
data-prefill-by-id="{{ $prefillById }}">
|
||||
<label for="location_id">{{ $__t('Location') }} <span id="{{ $hintId }}"
|
||||
class="small text-muted">{{ $hint }}</span></label>
|
||||
<select class="form-control location-combobox"
|
||||
id="location_id"
|
||||
name="location_id"
|
||||
@if($isRequired)
|
||||
required
|
||||
@endif>
|
||||
<option value=""></option>
|
||||
@foreach($locations as $location)
|
||||
<option value="{{ $location->id }}">{{ $location->name }}</option>
|
||||
<option value="{{ $location->id }}">{{ $location->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="invalid-feedback">{{ $__t('You have to select a location') }}</div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/numberpicker.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/numberpicker.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php if(!isset($value)) { $value = 1; } @endphp
|
||||
@@ -16,12 +16,30 @@
|
||||
@php if(!isset($isRequired)) { $isRequired = true; } @endphp
|
||||
@php if(!isset($noNameAttribute)) { $noNameAttribute = false; } @endphp
|
||||
|
||||
<div id="group-{{ $id }}" class="form-group {{ $additionalGroupCssClasses }}">
|
||||
<div id="group-{{ $id }}"
|
||||
class="form-group {{ $additionalGroupCssClasses }}">
|
||||
<label for="{{ $id }}">
|
||||
{{ $__t($label) }}
|
||||
<span id="{{ $hintId }}" data-toggle="tooltip" title="{{ $hint }}"></span>{!! $additionalHtmlContextHelp !!}</label>
|
||||
<span id="{{ $hintId }}"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $hint }}"></span>{!! $additionalHtmlContextHelp !!}</label>
|
||||
<div class="input-group">
|
||||
<input {!! $additionalAttributes !!} type="number" class="form-control numberpicker {{ $additionalCssClasses }}" id="{{ $id }}" @if(!$noNameAttribute) name="{{ $id }}" @endif value="{{ $value }}" min="{{ $min }}" max="{{ $max }}" step="{{ $step }}" @if($isRequired) required @endif>
|
||||
<input {!!
|
||||
$additionalAttributes
|
||||
!!}
|
||||
type="number"
|
||||
class="form-control numberpicker {{ $additionalCssClasses }}"
|
||||
id="{{ $id }}"
|
||||
@if(!$noNameAttribute)
|
||||
name="{{ $id }}"
|
||||
@endif
|
||||
value="{{ $value }}"
|
||||
min="{{ $min }}"
|
||||
max="{{ $max }}"
|
||||
step="{{ $step }}"
|
||||
@if($isRequired)
|
||||
required
|
||||
@endif>
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text numberpicker-up-button"><i class="fas fa-arrow-up"></i></div>
|
||||
</div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/productamountpicker.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/productamountpicker.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php if(empty($additionalGroupCssClasses)) { $additionalGroupCssClasses = ''; } @endphp
|
||||
@@ -9,25 +9,33 @@
|
||||
<div class="row">
|
||||
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'display_amount',
|
||||
'label' => 'Amount',
|
||||
'min' => 0,
|
||||
'value' => $value,
|
||||
'invalidFeedback' => $__t('This cannot be negative and must be an integral number'),
|
||||
'additionalGroupCssClasses' => 'col-4 mb-1',
|
||||
'additionalCssClasses' => 'input-group-productamountpicker'
|
||||
'id' => 'display_amount',
|
||||
'label' => 'Amount',
|
||||
'min' => 0,
|
||||
'value' => $value,
|
||||
'invalidFeedback' => $__t('This cannot be negative and must be an integral number'),
|
||||
'additionalGroupCssClasses' => 'col-4 mb-1',
|
||||
'additionalCssClasses' => 'input-group-productamountpicker'
|
||||
))
|
||||
|
||||
<div class="form-group col-8 mb-1">
|
||||
<label for="qu_id">{{ $__t('Quantity unit') }}</label>
|
||||
<select required class="form-control input-group-productamountpicker" id="qu_id" name="qu_id" data-initial-qu-id="{{ $initialQuId }}">
|
||||
<select required
|
||||
class="form-control input-group-productamountpicker"
|
||||
id="qu_id"
|
||||
name="qu_id"
|
||||
data-initial-qu-id="{{ $initialQuId }}">
|
||||
<option></option>
|
||||
</select>
|
||||
<div class="invalid-feedback">{{ $__t('A quantity unit is required') }}</div>
|
||||
</div>
|
||||
|
||||
<div id="qu-conversion-info" class="col form-text text-info d-none"></div>
|
||||
<input type="hidden" id="amount" name="amount" value="">
|
||||
<div id="qu-conversion-info"
|
||||
class="col form-text text-info d-none"></div>
|
||||
<input type="hidden"
|
||||
id="amount"
|
||||
name="amount"
|
||||
value="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,45 +1,70 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/node_modules/chart.js/dist/Chart.min.js?v=', true) }}{{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/productcard.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/node_modules/chart.js/dist/Chart.min.js?v=', true) }}{{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/productcard.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
<div class="card productcard">
|
||||
<div class="card-header">
|
||||
<i class="fab fa-product-hunt"></i> {{ $__t('Product overview') }}
|
||||
<a id="productcard-product-edit-button" class="btn btn-sm btn-outline-info py-0 float-right disabled" href="#" data-toggle="tooltip" title="{{ $__t('Edit product') }}">
|
||||
<a id="productcard-product-edit-button"
|
||||
class="btn btn-sm btn-outline-info py-0 float-right disabled"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Edit product') }}">
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
<a id="productcard-product-journal-button" class="btn btn-sm btn-outline-secondary py-0 mr-2 float-right disabled show-as-dialog-link" href="#" data-toggle="tooltip" title="{{ $__t('Stock journal for this product') }}">
|
||||
<a id="productcard-product-journal-button"
|
||||
class="btn btn-sm btn-outline-secondary py-0 mr-2 float-right disabled show-as-dialog-link"
|
||||
href="#"
|
||||
data-toggle="tooltip"
|
||||
title="{{ $__t('Stock journal for this product') }}">
|
||||
<i class="fas fa-file-alt"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h3><span id="productcard-product-name"></span></h3>
|
||||
|
||||
<div id="productcard-product-description-wrapper" class="expandable-text mb-2 d-none">
|
||||
<p id="productcard-product-description" class="text-muted collapse mb-0"></p>
|
||||
<a class="collapsed" data-toggle="collapse" href="#productcard-product-description">{{ $__t('Show more') }}</a>
|
||||
<div id="productcard-product-description-wrapper"
|
||||
class="expandable-text mb-2 d-none">
|
||||
<p id="productcard-product-description"
|
||||
class="text-muted collapse mb-0"></p>
|
||||
<a class="collapsed"
|
||||
data-toggle="collapse"
|
||||
href="#productcard-product-description">{{ $__t('Show more') }}</a>
|
||||
</div>
|
||||
|
||||
<strong>{{ $__t('Stock amount') }}:</strong> <span id="productcard-product-stock-amount" class="locale-number locale-number-quantity-amount"></span> <span id="productcard-product-stock-qu-name"></span>
|
||||
<span id="productcard-product-stock-factor-purchase-amount" class="locale-number locale-number-quantity-amount"></span> <span id="productcard-product-stock-factor-purchase-qu-name"></span>
|
||||
<span id="productcard-product-stock-opened-amount" class="small font-italic locale-number locale-number-quantity-amount"></span><br>
|
||||
<strong>{{ $__t('Stock value') }}:</strong> <span id="productcard-product-stock-value" class="locale-number locale-number-currency"></span>
|
||||
<span id="productcard-aggregated-amounts" class="pl-2 text-secondary d-none"><i class="fas fa-custom-sigma-sign"></i> <span id="productcard-product-stock-amount-aggregated" class="locale-number locale-number-quantity-amount"></span> <span id="productcard-product-stock-qu-name-aggregated"></span> <span id="productcard-product-stock-opened-amount-aggregated locale-number locale-number-quantity-amount" class="small font-italic"></span></span><br>
|
||||
<strong>{{ $__t('Stock amount') }}:</strong> <span id="productcard-product-stock-amount"
|
||||
class="locale-number locale-number-quantity-amount"></span> <span id="productcard-product-stock-qu-name"></span>
|
||||
<span id="productcard-product-stock-factor-purchase-amount"
|
||||
class="locale-number locale-number-quantity-amount"></span> <span id="productcard-product-stock-factor-purchase-qu-name"></span>
|
||||
<span id="productcard-product-stock-opened-amount"
|
||||
class="small font-italic locale-number locale-number-quantity-amount"></span><br>
|
||||
<strong>{{ $__t('Stock value') }}:</strong> <span id="productcard-product-stock-value"
|
||||
class="locale-number locale-number-currency"></span>
|
||||
<span id="productcard-aggregated-amounts"
|
||||
class="pl-2 text-secondary d-none"><i class="fas fa-custom-sigma-sign"></i> <span id="productcard-product-stock-amount-aggregated"
|
||||
class="locale-number locale-number-quantity-amount"></span> <span id="productcard-product-stock-qu-name-aggregated"></span> <span id="productcard-product-stock-opened-amount-aggregated locale-number locale-number-quantity-amount"
|
||||
class="small font-italic"></span></span><br>
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_LOCATION_TRACKING)<strong>{{ $__t('Default location') }}:</strong> <span id="productcard-product-location"></span><br>@endif
|
||||
<strong>{{ $__t('Last purchased') }}:</strong> <span id="productcard-product-last-purchased"></span> <time id="productcard-product-last-purchased-timeago" class="timeago timeago-contextual"></time><br>
|
||||
<strong>{{ $__t('Last used') }}:</strong> <span id="productcard-product-last-used"></span> <time id="productcard-product-last-used-timeago" class="timeago timeago-contextual"></time><br>
|
||||
<strong>{{ $__t('Last purchased') }}:</strong> <span id="productcard-product-last-purchased"></span> <time id="productcard-product-last-purchased-timeago"
|
||||
class="timeago timeago-contextual"></time><br>
|
||||
<strong>{{ $__t('Last used') }}:</strong> <span id="productcard-product-last-used"></span> <time id="productcard-product-last-used-timeago"
|
||||
class="timeago timeago-contextual"></time><br>
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)<strong>{{ $__t('Last price') }}:</strong> <span id="productcard-product-last-price"></span><br>@endif
|
||||
@if (GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)<strong>{{ $__t('Average price') }}:</strong> <span id="productcard-product-average-price"></span><br>@endif
|
||||
@if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)<strong>{{ $__t('Average shelf life') }}:</strong> <span id="productcard-product-average-shelf-life"></span><br>@endif
|
||||
<strong>{{ $__t('Spoil rate') }}:</strong> <span id="productcard-product-spoil-rate"></span>
|
||||
|
||||
<p class="w-75 mt-3 mx-auto"><img id="productcard-product-picture" data-src="" class="img-fluid img-thumbnail d-none lazy"></p>
|
||||
<p class="w-75 mt-3 mx-auto"><img id="productcard-product-picture"
|
||||
data-src=""
|
||||
class="img-fluid img-thumbnail d-none lazy"></p>
|
||||
|
||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||
<h5 class="mt-3">{{ $__t('Price history') }}</h5>
|
||||
<canvas id="productcard-product-price-history-chart" class="w-100 d-none"></canvas>
|
||||
<span id="productcard-no-price-data-hint" class="font-italic d-none">{{ $__t('No price history available') }}</span>
|
||||
<canvas id="productcard-product-price-history-chart"
|
||||
class="w-100 d-none"></canvas>
|
||||
<span id="productcard-no-price-data-hint"
|
||||
class="font-italic d-none">{{ $__t('No price history available') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/productpicker.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/productpicker.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php if(empty($disallowAddProductWorkflows)) { $disallowAddProductWorkflows = false; } @endphp
|
||||
@@ -12,23 +12,41 @@
|
||||
@php if(empty($hint)) { $hint = ''; } @endphp
|
||||
@php if(empty($nextInputSelector)) { $nextInputSelector = ''; } @endphp
|
||||
|
||||
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-disallow-add-product-workflows="{{ BoolToString($disallowAddProductWorkflows) }}" data-disallow-all-product-workflows="{{ BoolToString($disallowAllProductWorkflows) }}" data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}">
|
||||
<div class="form-group"
|
||||
data-next-input-selector="{{ $nextInputSelector }}"
|
||||
data-disallow-add-product-workflows="{{ BoolToString($disallowAddProductWorkflows) }}"
|
||||
data-disallow-all-product-workflows="{{ BoolToString($disallowAllProductWorkflows) }}"
|
||||
data-prefill-by-name="{{ $prefillByName }}"
|
||||
data-prefill-by-id="{{ $prefillById }}">
|
||||
<label for="product_id">
|
||||
{{ $__t($label) }} <i class="fas fa-barcode"></i>
|
||||
<span id="barcode-lookup-disabled-hint" class="small text-muted d-none"> {{ $__t('Barcode lookup is disabled') }}</span>
|
||||
<span id="barcode-lookup-disabled-hint"
|
||||
class="small text-muted d-none"> {{ $__t('Barcode lookup is disabled') }}</span>
|
||||
</label>
|
||||
<select class="form-control product-combobox barcodescanner-input" id="product_id" name="product_id" @if($isRequired) required @endif @if($disabled) disabled @endif data-target="@productpicker">
|
||||
<select class="form-control product-combobox barcodescanner-input"
|
||||
id="product_id"
|
||||
name="product_id"
|
||||
@if($isRequired)
|
||||
required
|
||||
@endif
|
||||
@if($disabled)
|
||||
disabled
|
||||
@endif
|
||||
data-target="@productpicker">
|
||||
<option value=""></option>
|
||||
@foreach($products as $product)
|
||||
<option data-additional-searchdata="{{ FindObjectInArrayByPropertyValue($barcodes, 'product_id', $product->id)->barcodes }}," value="{{ $product->id }}">{{ $product->name }}</option>
|
||||
<option data-additional-searchdata="{{ FindObjectInArrayByPropertyValue($barcodes, 'product_id', $product->id)->barcodes }},"
|
||||
value="{{ $product->id }}">{{ $product->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="invalid-feedback">{{ $__t('You have to select a product') }}</div>
|
||||
<div id="custom-productpicker-error" class="form-text text-danger d-none"></div>
|
||||
<div id="custom-productpicker-error"
|
||||
class="form-text text-danger d-none"></div>
|
||||
@if(!$disallowAllProductWorkflows)
|
||||
<div class="form-text text-info small">{{ $__t('Type a new product name or barcode and hit TAB to start a workflow') }}</div>
|
||||
<div class="form-text text-info small">{{ $__t('Type a new product name or barcode and hit TAB to start a workflow') }}</div>
|
||||
@endif
|
||||
<div id="flow-info-addbarcodetoselection" class="form-text text-muted small d-none"><strong><span id="addbarcodetoselection"></span></strong> {{ $__t('will be added to the list of barcodes for the selected product on submit') }}</div>
|
||||
<div id="flow-info-addbarcodetoselection"
|
||||
class="form-text text-muted small d-none"><strong><span id="addbarcodetoselection"></span></strong> {{ $__t('will be added to the list of barcodes for the selected product on submit') }}</div>
|
||||
</div>
|
||||
|
||||
@include('components.barcodescanner')
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/recipepicker.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/recipepicker.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php if(empty($prefillByName)) { $prefillByName = ''; } @endphp
|
||||
@@ -9,12 +9,21 @@
|
||||
@php if(empty($hintId)) { $hintId = ''; } @endphp
|
||||
@php if(empty($nextInputSelector)) { $nextInputSelector = ''; } @endphp
|
||||
|
||||
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}">
|
||||
<label for="recipe_id">{{ $__t('Recipe') }} <span id="{{ $hintId }}" class="small text-muted">{{ $hint }}</span></label>
|
||||
<select class="form-control recipe-combobox" id="recipe_id" name="recipe_id" @if($isRequired) required @endif>
|
||||
<div class="form-group"
|
||||
data-next-input-selector="{{ $nextInputSelector }}"
|
||||
data-prefill-by-name="{{ $prefillByName }}"
|
||||
data-prefill-by-id="{{ $prefillById }}">
|
||||
<label for="recipe_id">{{ $__t('Recipe') }} <span id="{{ $hintId }}"
|
||||
class="small text-muted">{{ $hint }}</span></label>
|
||||
<select class="form-control recipe-combobox"
|
||||
id="recipe_id"
|
||||
name="recipe_id"
|
||||
@if($isRequired)
|
||||
required
|
||||
@endif>
|
||||
<option value=""></option>
|
||||
@foreach($recipes as $recipe)
|
||||
<option value="{{ $recipe->id }}">{{ $recipe->name }}</option>
|
||||
<option value="{{ $recipe->id }}">{{ $recipe->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="invalid-feedback">{{ $__t('You have to select a recipe') }}</div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/shoppinglocationpicker.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/shoppinglocationpicker.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php if(empty($prefillByName)) { $prefillByName = ''; } @endphp
|
||||
@@ -8,13 +8,22 @@
|
||||
@php if(empty($hint)) { $hint = ''; } @endphp
|
||||
@php if(empty($nextInputSelector)) { $nextInputSelector = ''; } @endphp
|
||||
|
||||
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-prefill-by-name="{{ $prefillByName }}" data-prefill-by-id="{{ $prefillById }}">
|
||||
<label for="shopping_location_id">{{ $__t($label) }} <span id="{{ $hintId }}" class="small text-muted">{{ $hint }}</span></label>
|
||||
<select class="form-control shopping-location-combobox" id="shopping_location_id" name="shopping_location_id" @if($isRequired) required @endif>
|
||||
<div class="form-group"
|
||||
data-next-input-selector="{{ $nextInputSelector }}"
|
||||
data-prefill-by-name="{{ $prefillByName }}"
|
||||
data-prefill-by-id="{{ $prefillById }}">
|
||||
<label for="shopping_location_id">{{ $__t($label) }} <span id="{{ $hintId }}"
|
||||
class="small text-muted">{{ $hint }}</span></label>
|
||||
<select class="form-control shopping-location-combobox"
|
||||
id="shopping_location_id"
|
||||
name="shopping_location_id"
|
||||
@if($isRequired)
|
||||
required
|
||||
@endif>
|
||||
<option value=""></option>
|
||||
@foreach($shoppinglocations as $shoppinglocation)
|
||||
<option value="{{ $shoppinglocation->id }}">{{ $shoppinglocation->name }}</option>
|
||||
<option value="{{ $shoppinglocation->id }}">{{ $shoppinglocation->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="invalid-feedback">{{ $__t('You have to select a store') }}</div>
|
||||
<div class="invalid-feedback">{{ $__t('You have to select a store') }}</div>
|
||||
</div>
|
||||
|
@@ -3,27 +3,33 @@
|
||||
@foreach($userfields as $userfield)
|
||||
|
||||
@if($userfield->show_as_column_in_tables == 1)
|
||||
@php $userfieldObject = FindObjectInArrayByPropertyValue($userfieldValues, 'name', $userfield->name) @endphp
|
||||
<td>
|
||||
@php $userfieldObject = FindObjectInArrayByPropertyValue($userfieldValues, 'name', $userfield->name) @endphp
|
||||
<td>
|
||||
@if($userfieldObject !== null)
|
||||
@if($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_CHECKBOX)
|
||||
@if($userfieldObject->value == 1)<i class="fas fa-check"></i>@endif
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_CHECKLIST)
|
||||
{!! str_replace(',', '<br>', $userfieldObject->value) !!}
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_LINK)
|
||||
<a href="{{ $userfieldObject->value }}" target="_blank">{{ $userfieldObject->value }}</a>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_FILE)
|
||||
<a class="show-as-dialog-link" href="{{ $U('/files/userfiles/'. $userfieldObject->value) }}" target="_blank">{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}</a>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_IMAGE)
|
||||
<a class="show-as-dialog-link" href="{{ $U('/files/userfiles/'. $userfieldObject->value . '?force_serve_as=picture') }}">
|
||||
<img src="{{ $U('/files/userfiles/'. $userfieldObject->value . '?force_serve_as=picture&best_fit_width=32&best_fit_height=32') }}"
|
||||
class="lazy" title="{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}" alt="{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}">
|
||||
</a>
|
||||
@else
|
||||
{{ $userfieldObject->value }}
|
||||
@endif
|
||||
@if($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_CHECKBOX)
|
||||
@if($userfieldObject->value == 1)<i class="fas fa-check"></i>@endif
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_CHECKLIST)
|
||||
{!! str_replace(',', '<br>', $userfieldObject->value) !!}
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_LINK)
|
||||
<a href="{{ $userfieldObject->value }}"
|
||||
target="_blank">{{ $userfieldObject->value }}</a>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_FILE)
|
||||
<a class="show-as-dialog-link"
|
||||
href="{{ $U('/files/userfiles/'. $userfieldObject->value) }}"
|
||||
target="_blank">{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}</a>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_IMAGE)
|
||||
<a class="show-as-dialog-link"
|
||||
href="{{ $U('/files/userfiles/'. $userfieldObject->value . '?force_serve_as=picture') }}">
|
||||
<img src="{{ $U('/files/userfiles/'. $userfieldObject->value . '?force_serve_as=picture&best_fit_width=32&best_fit_height=32') }}"
|
||||
class="lazy"
|
||||
title="{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}"
|
||||
alt="{{ base64_decode(explode('_', $userfieldObject->value)[1]) }}">
|
||||
</a>
|
||||
@else
|
||||
{{ $userfieldObject->value }}
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
@@ -3,7 +3,7 @@
|
||||
@foreach($userfields as $userfield)
|
||||
|
||||
@if($userfield->show_as_column_in_tables == 1)
|
||||
<th>{{ $userfield->caption }}</th>
|
||||
<th>{{ $userfield->caption }}</th>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
@@ -1,10 +1,13 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/userfieldsform.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/userfieldsform.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@if(count($userfields) > 0)
|
||||
|
||||
<div id="userfields-form" data-entity="{{ $entity }}" class="border border-info p-2 mb-2" novalidate>
|
||||
<div id="userfields-form"
|
||||
data-entity="{{ $entity }}"
|
||||
class="border border-info p-2 mb-2"
|
||||
novalidate>
|
||||
<h2 class="small">{{ $__t('Userfields') }}</h2>
|
||||
|
||||
@foreach($userfields as $userfield)
|
||||
@@ -12,114 +15,142 @@
|
||||
@if($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_SINGLE_LINE_TEXT)
|
||||
<div class="form-group">
|
||||
<label for="name">{{ $userfield->caption }}</label>
|
||||
<input type="text" class="form-control userfield-input" data-userfield-name="{{ $userfield->name }}">
|
||||
<input type="text"
|
||||
class="form-control userfield-input"
|
||||
data-userfield-name="{{ $userfield->name }}">
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_SINGLE_MULTILINE_TEXT)
|
||||
<div class="form-group">
|
||||
<label for="description">{{ $userfield->caption }}</label>
|
||||
<textarea class="form-control userfield-input" rows="4" data-userfield-name="{{ $userfield->name }}"></textarea>
|
||||
<textarea class="form-control userfield-input"
|
||||
rows="4"
|
||||
data-userfield-name="{{ $userfield->name }}"></textarea>
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_INTEGRAL_NUMBER)
|
||||
@include('components.numberpicker', array(
|
||||
'id' => $userfield->name,
|
||||
'label' => $userfield->caption,
|
||||
'noNameAttribute' => true,
|
||||
'min' => 0,
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'userfield-input',
|
||||
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'
|
||||
'id' => $userfield->name,
|
||||
'label' => $userfield->caption,
|
||||
'noNameAttribute' => true,
|
||||
'min' => 0,
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'userfield-input',
|
||||
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'
|
||||
))
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_DECIMAL_NUMBER)
|
||||
@include('components.numberpicker', array(
|
||||
'id' => '',
|
||||
'label' => $userfield->caption,
|
||||
'noNameAttribute' => true,
|
||||
'min' => 0,
|
||||
'step' => 0.01,
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'userfield-input',
|
||||
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'
|
||||
'id' => '',
|
||||
'label' => $userfield->caption,
|
||||
'noNameAttribute' => true,
|
||||
'min' => 0,
|
||||
'step' => 0.01,
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'userfield-input',
|
||||
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'
|
||||
))
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_DATE)
|
||||
@include('components.datetimepicker', array(
|
||||
'id' => $userfield->name,
|
||||
'label' => $userfield->caption,
|
||||
'noNameAttribute' => true,
|
||||
'format' => 'YYYY-MM-DD',
|
||||
'initWithNow' => false,
|
||||
'limitEndToNow' => false,
|
||||
'limitStartToNow' => false,
|
||||
'additionalGroupCssClasses' => 'date-only-datetimepicker',
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'userfield-input',
|
||||
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'
|
||||
'id' => $userfield->name,
|
||||
'label' => $userfield->caption,
|
||||
'noNameAttribute' => true,
|
||||
'format' => 'YYYY-MM-DD',
|
||||
'initWithNow' => false,
|
||||
'limitEndToNow' => false,
|
||||
'limitStartToNow' => false,
|
||||
'additionalGroupCssClasses' => 'date-only-datetimepicker',
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'userfield-input',
|
||||
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'
|
||||
))
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_DATETIME)
|
||||
@include('components.datetimepicker', array(
|
||||
'id' => $userfield->name,
|
||||
'label' => $userfield->caption,
|
||||
'noNameAttribute' => true,
|
||||
'format' => 'YYYY-MM-DD HH:mm:ss',
|
||||
'initWithNow' => false,
|
||||
'limitEndToNow' => false,
|
||||
'limitStartToNow' => false,
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'userfield-input',
|
||||
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'
|
||||
'id' => $userfield->name,
|
||||
'label' => $userfield->caption,
|
||||
'noNameAttribute' => true,
|
||||
'format' => 'YYYY-MM-DD HH:mm:ss',
|
||||
'initWithNow' => false,
|
||||
'limitEndToNow' => false,
|
||||
'limitStartToNow' => false,
|
||||
'isRequired' => false,
|
||||
'additionalCssClasses' => 'userfield-input',
|
||||
'additionalAttributes' => 'data-userfield-name="' . $userfield->name . '"'
|
||||
))
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_CHECKBOX)
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input userfield-input" type="checkbox" data-userfield-name="{{ $userfield->name }}" value="1">
|
||||
<label class="form-check-label" for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
<input class="form-check-input userfield-input"
|
||||
type="checkbox"
|
||||
data-userfield-name="{{ $userfield->name }}"
|
||||
value="1">
|
||||
<label class="form-check-label"
|
||||
for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
</div>
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_LIST)
|
||||
<div class="form-group">
|
||||
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
<select class="form-control userfield-input" data-userfield-name="{{ $userfield->name }}">
|
||||
<select class="form-control userfield-input"
|
||||
data-userfield-name="{{ $userfield->name }}">
|
||||
<option></option>
|
||||
@foreach(preg_split('/\r\n|\r|\n/', $userfield->config) as $option)
|
||||
<option value="{{ $option }}">{{ $option }}</option>
|
||||
<option value="{{ $option }}">{{ $option }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_PRESET_CHECKLIST)
|
||||
<div class="form-group">
|
||||
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
<select multiple class="form-control userfield-input selectpicker" data-userfield-name="{{ $userfield->name }}" data-actions-Box="true" data-live-search="true">
|
||||
<select multiple
|
||||
class="form-control userfield-input selectpicker"
|
||||
data-userfield-name="{{ $userfield->name }}"
|
||||
data-actions-Box="true"
|
||||
data-live-search="true">
|
||||
@foreach(preg_split('/\r\n|\r|\n/', $userfield->config) as $option)
|
||||
<option value="{{ $option }}">{{ $option }}</option>
|
||||
<option value="{{ $option }}">{{ $option }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_LINK)
|
||||
<div class="form-group">
|
||||
<label for="name">{{ $userfield->caption }}</label>
|
||||
<input type="link" class="form-control userfield-input" data-userfield-name="{{ $userfield->name }}">
|
||||
<input type="link"
|
||||
class="form-control userfield-input"
|
||||
data-userfield-name="{{ $userfield->name }}">
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_FILE)
|
||||
<div class="form-group">
|
||||
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
<input type="file" class="form-control userfield-input" data-userfield-name="{{ $userfield->name }}">
|
||||
<div class="d-none userfield-file">
|
||||
<a href="" class="userfield-current-file" data-uf-name="{{ $userfield->name }}"></a>
|
||||
<button type="button" class="userfield-current-file btn btn-danger userfield-file-delete" data-uf-name="{{ $userfield->name }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
<input type="file"
|
||||
class="form-control userfield-input"
|
||||
data-userfield-name="{{ $userfield->name }}">
|
||||
<div class="d-none userfield-file">
|
||||
<a href=""
|
||||
class="userfield-current-file"
|
||||
data-uf-name="{{ $userfield->name }}"></a>
|
||||
<button type="button"
|
||||
class="userfield-current-file btn btn-danger userfield-file-delete"
|
||||
data-uf-name="{{ $userfield->name }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_IMAGE)
|
||||
<div class="form-group">
|
||||
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
<input type="file" class="form-control userfield-input" data-userfield-name="{{ $userfield->name }}">
|
||||
<div class="d-none userfield-file">
|
||||
<img src="" alt="{{ $userfield->name }}" class="userfield-current-file" data-uf-name="{{ $userfield->name }}"/>
|
||||
<button type="button" class="userfield-current-file btn btn-danger userfield-file-delete" data-uf-name="{{ $userfield->name }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
|
||||
<input type="file"
|
||||
class="form-control userfield-input"
|
||||
data-userfield-name="{{ $userfield->name }}">
|
||||
<div class="d-none userfield-file">
|
||||
<img src=""
|
||||
alt="{{ $userfield->name }}"
|
||||
class="userfield-current-file"
|
||||
data-uf-name="{{ $userfield->name }}" />
|
||||
<button type="button"
|
||||
class="userfield-current-file btn btn-danger userfield-file-delete"
|
||||
data-uf-name="{{ $userfield->name }}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
@@ -1,15 +1,19 @@
|
||||
<label>
|
||||
<input type="checkbox" name="{{ $perm->permission_name }}" class="permission-cb" data-perm-id="{{ $perm->permission_id }}" @if($perm->has_permission) checked @endif autocomplete="off">
|
||||
<input type="checkbox"
|
||||
name="{{ $perm->permission_name }}"
|
||||
class="permission-cb"
|
||||
data-perm-id="{{ $perm->permission_id }}"
|
||||
@if($perm->has_permission) checked @endif autocomplete="off">
|
||||
{{ $__t($perm->permission_name) }}
|
||||
</label>
|
||||
<div id="permission-sub-{{ $perm->permission_name }}">
|
||||
<ul>
|
||||
@foreach($perm->uihelper_user_permissionsList(array('user_id' => $user->id))->via('parent') as $p)
|
||||
<li>
|
||||
@include('components.userpermission_select', array(
|
||||
'perm' => $p
|
||||
))
|
||||
</li>
|
||||
<li>
|
||||
@include('components.userpermission_select', array(
|
||||
'perm' => $p
|
||||
))
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
@@ -1,17 +1,23 @@
|
||||
@push('componentScripts')
|
||||
<script src="{{ $U('/viewjs/components/userpicker.js', true) }}?v={{ $version }}"></script>
|
||||
<script src="{{ $U('/viewjs/components/userpicker.js', true) }}?v={{ $version }}"></script>
|
||||
@endpush
|
||||
|
||||
@php if(empty($prefillByUsername)) { $prefillByUsername = ''; } @endphp
|
||||
@php if(empty($prefillByUserId)) { $prefillByUserId = ''; } @endphp
|
||||
@php if(!isset($nextInputSelector)) { $nextInputSelector = ''; } @endphp
|
||||
|
||||
<div class="form-group" data-next-input-selector="{{ $nextInputSelector }}" data-prefill-by-username="{{ $prefillByUsername }}" data-prefill-by-user-id="{{ $prefillByUserId }}">
|
||||
<div class="form-group"
|
||||
data-next-input-selector="{{ $nextInputSelector }}"
|
||||
data-prefill-by-username="{{ $prefillByUsername }}"
|
||||
data-prefill-by-user-id="{{ $prefillByUserId }}">
|
||||
<label for="user_id">{{ $__t($label) }}</label>
|
||||
<select class="form-control user-combobox" id="user_id" name="user_id">
|
||||
<select class="form-control user-combobox"
|
||||
id="user_id"
|
||||
name="user_id">
|
||||
<option value=""></option>
|
||||
@foreach($users as $user)
|
||||
<option data-additional-searchdata="{{ $user->username }}" value="{{ $user->id }}">{{ GetUserDisplayName($user) }}</option>
|
||||
<option data-additional-searchdata="{{ $user->username }}"
|
||||
value="{{ $user->id }}">{{ GetUserDisplayName($user) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user