UI test/review

This commit is contained in:
Bernd Bestel
2020-11-08 19:00:12 +01:00
parent d82fd09fba
commit 3e3321bf11
33 changed files with 796 additions and 640 deletions

View File

@@ -25,8 +25,8 @@
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<a class="btn btn-primary responsive-button permission-MASTER_DATA_EDIT m-1 mt-md-0 mb-md-0 float-right"
href="{{ $U('/battery/new') }}">
<a class="btn btn-primary responsive-button permission-MASTER_DATA_EDIT m-1 mt-md-0 mb-md-0 float-right show-as-dialog-link"
href="{{ $U('/battery/new?embedded') }}">
{{ $__t('Add') }}
</a>
<a class="btn btn-outline-secondary m-1 mt-md-0 mb-md-0 float-right"
@@ -86,8 +86,8 @@
@foreach($batteries as $battery)
<tr>
<td class="fit-content border-right">
<a class="btn btn-info btn-sm permission-MASTER_DATA_EDIT"
href="{{ $U('/battery/') }}{{ $battery->id }}">
<a class="btn btn-info btn-sm permission-MASTER_DATA_EDIT show-as-dialog-link"
href="{{ $U('/battery/') }}{{ $battery->id }}?embedded">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-danger btn-sm battery-delete-button permission-MASTER_DATA_EDIT"

View File

@@ -52,8 +52,10 @@
</div>
<div class="form-group">
<label for="period_type">{{ $__t('Period type') }} <span id="chore-period-type-info"
class="small text-muted"></span></label>
<label for="period_type">{{ $__t('Period type') }}&nbsp;<i id="chore-period-type-info"
class="fas fa-question-circle"
data-toggle="tooltip"
title=""></i></label>
<select required
class="form-control input-group-chore-period-type"
id="period_type"
@@ -79,61 +81,61 @@
))
<div class="form-group period-type-input period-type-weekly">
<div class="form-check form-check-inline">
<input class="form-check-input input-group-chore-period-type"
<div class="custom-control custom-checkbox custom-control-inline">
<input class="form-check-input custom-control-input input-group-chore-period-type"
type="checkbox"
id="monday"
value="monday">
<label class="form-check-label"
<label class="form-check-label custom-control-label"
for="monday">{{ $__t('Monday') }}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input input-group-chore-period-type"
<div class="custom-control custom-checkbox custom-control-inline">
<input class="form-check-input custom-control-input input-group-chore-period-type"
type="checkbox"
id="tuesday"
value="tuesday">
<label class="form-check-label"
<label class="form-check-label custom-control-label"
for="tuesday">{{ $__t('Tuesday') }}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input input-group-chore-period-type"
<div class="custom-control custom-checkbox custom-control-inline">
<input class="form-check-input custom-control-input input-group-chore-period-type"
type="checkbox"
id="wednesday"
value="wednesday">
<label class="form-check-label"
<label class="form-check-label custom-control-label"
for="wednesday">{{ $__t('Wednesday') }}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input input-group-chore-period-type"
<div class="custom-control custom-checkbox custom-control-inline">
<input class="form-check-input custom-control-input input-group-chore-period-type"
type="checkbox"
id="thursday"
value="thursday">
<label class="form-check-label"
<label class="form-check-label custom-control-label"
for="thursday">{{ $__t('Thursday') }}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input input-group-chore-period-type"
<div class="custom-control custom-checkbox custom-control-inline">
<input class="form-check-input custom-control-input input-group-chore-period-type"
type="checkbox"
id="friday"
value="friday">
<label class="form-check-label"
<label class="form-check-label custom-control-label"
for="friday">{{ $__t('Friday') }}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input input-group-chore-period-type"
<div class="custom-control custom-checkbox custom-control-inline">
<input class="form-check-input custom-control-input input-group-chore-period-type"
type="checkbox"
id="saturday"
value="saturday">
<label class="form-check-label"
for="saturday">{{ $__t('Saturday') }}</label>
<label class="form-check-label custom-control-label"
for="friday">{{ $__t('Saturday') }}</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input input-group-chore-period-type"
<div class="custom-control custom-checkbox custom-control-inline">
<input class="form-check-input custom-control-input input-group-chore-period-type"
type="checkbox"
id="sunday"
value="sunday">
<label class="form-check-label"
for="sunday">{{ $__t('Sunday') }}</label>
<label class="form-check-label custom-control-label"
for="friday">{{ $__t('Sunday') }}</label>
</div>
</div>
@@ -156,8 +158,10 @@
@if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)
<div class="form-group">
<label for="assignment_type">{{ $__t('Assignment type') }} <span id="chore-assignment-type-info"
class="small text-muted"></span></label>
<label for="assignment_type">{{ $__t('Assignment type') }} <i id="chore-assignment-type-info"
class="fas fa-question-circle"
data-toggle="tooltip"
title=""></i></label>
<select required
class="form-control input-group-chore-assignment-type"
id="assignment_type"
@@ -200,45 +204,49 @@
@endif
<div class="form-group">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="track_date_only"
value="0">
<input @if($mode=='edit'
&&
$chore->track_date_only == 1) checked @endif class="form-check-input" type="checkbox" id="track_date_only" name="track_date_only" value="1">
<label class="form-check-label"
$chore->track_date_only == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="track_date_only" name="track_date_only" value="1">
<label class="form-check-label custom-control-label"
for="track_date_only">{{ $__t('Track date only') }}
<span class="text-muted small">{{ $__t('When enabled only the day of an execution is tracked, not the time') }}</span>
&nbsp;<i class="fas fa-question-circle"
data-toggle="tooltip"
title="{{ $__t('When enabled only the day of an execution is tracked, not the time') }}"></i>
</label>
</div>
</div>
<div class="form-group">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="rollover"
value="0">
<input @if($mode=='edit'
&&
$chore->rollover == 1) checked @endif class="form-check-input" type="checkbox" id="rollover" name="rollover" value="1">
<label class="form-check-label"
$chore->rollover == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="rollover" name="rollover" value="1">
<label class="form-check-label custom-control-label"
for="rollover">{{ $__t('Due date rollover') }}
<span class="text-muted small">{{ $__t('When enabled the chore can never be overdue, the due date will shift forward each day when due') }}</span>
&nbsp;<i class="fas fa-question-circle"
data-toggle="tooltip"
title="{{ $__t('When enabled the chore can never be overdue, the due date will shift forward each day when due') }}"></i>
</label>
</div>
</div>
@if(GROCY_FEATURE_FLAG_STOCK)
<div class="form-group mt-4 mb-1">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="consume_product_on_execution"
value="0">
<input @if($mode=='edit'
&&
$chore->consume_product_on_execution == 1) checked @endif class="form-check-input" type="checkbox" id="consume_product_on_execution" name="consume_product_on_execution" value="1">
<label class="form-check-label"
$chore->consume_product_on_execution == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="consume_product_on_execution" name="consume_product_on_execution" value="1">
<label class="form-check-label custom-control-label"
for="consume_product_on_execution">{{ $__t('Consume product on chore execution') }}</label>
</div>
</div>

View File

@@ -76,12 +76,12 @@
))
@elseif($userfield->type == \Grocy\Services\UserfieldsService::USERFIELD_TYPE_CHECKBOX)
<div class="form-group">
<div class="form-check">
<input class="form-check-input userfield-input"
<div class="custom-control custom-checkbox">
<input class="form-check-input userfield-input custom-control-input"
type="checkbox"
data-userfield-name="{{ $userfield->name }}"
value="1">
<label class="form-check-label"
<label class="form-check-label custom-control-label"
for="{{ $userfield->name }}">{{ $userfield->caption }}</label>
</div>
</div>

View File

@@ -53,16 +53,18 @@
@if(GROCY_FEATURE_FLAG_STOCK_PRODUCT_FREEZING)
<div class="form-group">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="is_freezer"
value="0">
<input @if($mode=='edit'
&&
$location->is_freezer == 1) checked @endif class="form-check-input" type="checkbox" id="is_freezer" name="is_freezer" value="1">
<label class="form-check-label"
$location->is_freezer == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="is_freezer" name="is_freezer" value="1">
<label class="form-check-label custom-control-label"
for="is_freezer">{{ $__t('Is freezer') }}
<span class="text-muted small">{{ $__t('When moving products from/to a freezer location, the products best before date is automatically adjusted according to the product settings') }}</span>
&nbsp;<i class="fas fa-question-circle"
data-toggle="tooltip"
title="{{ $__t('When moving products from/to a freezer location, the products best before date is automatically adjusted according to the product settings') }}"></i>
</label>
</div>
</div>

View File

@@ -25,8 +25,8 @@
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<a class="btn btn-primary responsive-button m-1 mt-md-0 mb-md-0 float-right"
href="{{ $U('/location/new') }}">
<a class="btn btn-primary responsive-button m-1 mt-md-0 mb-md-0 float-right show-as-dialog-link"
href="{{ $U('/location/new?embedded') }}">
{{ $__t('Add') }}
</a>
<a class="btn btn-outline-secondary m-1 mt-md-0 mb-md-0 float-right"
@@ -84,8 +84,8 @@
@foreach($locations as $location)
<tr>
<td class="fit-content border-right">
<a class="btn btn-info btn-sm"
href="{{ $U('/location/') }}{{ $location->id }}">
<a class="btn btn-info btn-sm show-as-dialog-link"
href="{{ $U('/location/') }}{{ $location->id }}?embedded">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-danger btn-sm location-delete-button"

View File

@@ -11,7 +11,12 @@
@section('content')
<div class="row">
<div class="col">
<h2 class="title">@yield('title')</h2>
<div class="title-related-links">
<h2 class="title">@yield('title')</h2>
<h2>
<span class="text-muted small">{{ $__t('Barcode for product') }} <strong>{{ $product->name }}</strong></span>
</h2>
</div>
</div>
</div>
@@ -20,8 +25,6 @@
<div class="row">
<div class="col-lg-6 col-xs-12">
<h3 class="text-muted">{{ $__t('Barcode for product') }} <strong>{{ $product->name }}</strong></h3>
<script>
Grocy.EditMode = '{{ $mode }}';
</script>

View File

@@ -63,7 +63,7 @@
</div>
<div class="form-group">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="active"
value="1">
@@ -72,8 +72,8 @@
checked
@elseif($mode=='edit'
&&
$product->active == 1) checked @endif class="form-check-input" type="checkbox" id="active" name="active" value="1">
<label class="form-check-label"
$product->active == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="active" name="active" value="1">
<label class="form-check-label custom-control-label"
for="active">{{ $__t('Active') }}</label>
</div>
</div>
@@ -152,16 +152,18 @@
))
<div class="form-group">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="cumulate_min_stock_amount_of_sub_products"
value="0">
<input @if($mode=='edit'
&&
$product->cumulate_min_stock_amount_of_sub_products == 1) checked @endif class="form-check-input" type="checkbox" id="cumulate_min_stock_amount_of_sub_products" name="cumulate_min_stock_amount_of_sub_products" value="1">
<label class="form-check-label"
$product->cumulate_min_stock_amount_of_sub_products == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="cumulate_min_stock_amount_of_sub_products" name="cumulate_min_stock_amount_of_sub_products" value="1">
<label class="form-check-label custom-control-label"
for="cumulate_min_stock_amount_of_sub_products">{{ $__t('Accumulate sub products min. stock amount') }}
<span class="text-muted small">{{ $__t('If enabled, the min. stock amount of sub products will be accumulated into this product, means the sub product will never be "missing", only this product') }}</span>
&nbsp;<i class="fas fa-question-circle"
data-toggle="tooltip"
title="{{ $__t('If enabled, the min. stock amount of sub products will be accumulated into this product, means the sub product will never be "missing", only this product') }}"></i></span>
</label>
</div>
</div>
@@ -257,29 +259,31 @@
))
<div class="form-group">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="allow_partial_units_in_stock"
value="0">
<input @if($mode=='edit'
&&
$product->allow_partial_units_in_stock == 1) checked @endif class="form-check-input" type="checkbox" id="allow_partial_units_in_stock" name="allow_partial_units_in_stock" value="1">
<label class="form-check-label"
$product->allow_partial_units_in_stock == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="allow_partial_units_in_stock" name="allow_partial_units_in_stock" value="1">
<label class="form-check-label custom-control-label"
for="allow_partial_units_in_stock">{{ $__t('Allow partial units in stock') }}</label>
</div>
</div>
<div class="form-group mb-1">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="enable_tare_weight_handling"
value="0">
<input @if($mode=='edit'
&&
$product->enable_tare_weight_handling == 1) checked @endif class="form-check-input" type="checkbox" id="enable_tare_weight_handling" name="enable_tare_weight_handling" value="1">
<label class="form-check-label"
$product->enable_tare_weight_handling == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="enable_tare_weight_handling" name="enable_tare_weight_handling" value="1">
<label class="form-check-label custom-control-label"
for="enable_tare_weight_handling">{{ $__t('Enable tare weight handling') }}
<span class="text-muted small">{{ $__t('This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below') }}</span>
&nbsp;<i class="fas fa-question-circle"
data-toggle="tooltip"
title="{{ $__t('This is useful e.g. for flour in jars - on purchase/consume/inventory you always weigh the whole jar, the amount to be posted is then automatically calculated based on what is in stock and the tare weight defined below') }}"></i>
</label>
</div>
</div>
@@ -300,16 +304,18 @@
@if(GROCY_FEATURE_FLAG_RECIPES)
<div class="form-group">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="not_check_stock_fulfillment_for_recipes"
value="0">
<input @if($mode=='edit'
&&
$product->not_check_stock_fulfillment_for_recipes == 1) checked @endif class="form-check-input" type="checkbox" id="not_check_stock_fulfillment_for_recipes" name="not_check_stock_fulfillment_for_recipes" value="1">
<label class="form-check-label"
$product->not_check_stock_fulfillment_for_recipes == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="not_check_stock_fulfillment_for_recipes" name="not_check_stock_fulfillment_for_recipes" value="1">
<label class="form-check-label custom-control-label"
for="not_check_stock_fulfillment_for_recipes">{{ $__t('Disable stock fulfillment checking for this ingredient') }}
<span class="text-muted small">{{ $__t('This will be used as the default setting when adding this product as a recipe ingredient') }}</span>
&nbsp;<i class="fas fa-question-circle"
data-toggle="tooltip"
title="{{ $__t('This will be used as the default setting when adding this product as a recipe ingredient') }}"></i>
</label>
</div>
</div>
@@ -356,167 +362,217 @@
value="0">
@endif
<div class="form-group">
<label for="product-picture">{{ $__t('Product picture') }}
<span class="text-muted small">{{ $__t('If you don\'t select a file, the current picture will not be altered') }}</span>
</label>
<div class="custom-file">
<input type="file"
class="custom-file-input"
id="product-picture"
accept="image/*">
<label class="custom-file-label"
for="product-picture">{{ $__t('No file selected') }}</label>
</div>
</div>
@include('components.userfieldsform', array(
'userfields' => $userfields,
'entity' => 'products'
))
<button id="save-product-button"
class="btn btn-info mb-2">{{ $__t('Save') }}</button>
<small class="my-2 form-text text-muted @if($mode == 'edit') d-none @endif">{{ $__t('Save & continue to add quantity unit conversions & barcodes') }}</small>
<button class="save-product-button btn btn-success mb-2"
data-location="continue">{{ $__t('Save & continue') }}</button>
<button class="save-product-button btn btn-info mb-2"
data-location="return">{{ $__t('Save & return to products') }}</button>
</form>
</div>
<div class="col-lg-6 col-xs-12">
<h2>
{{ $__t('QU conversions') }}
<a class="btn btn-outline-dark show-as-dialog-link"
type="button"
href="{{ $U('/quantityunitconversion/new?embedded&product=' . $product->id ) }}">
<i class="fas fa-plus"></i> {{ $__t('Add') }}
</a>
</h2>
<h5 id="qu-conversion-headline-info"
class="text-muted font-italic"></h5>
<table id="qu-conversions-table"
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"></th>
<th>{{ $__t('Factor') }}</th>
<th>{{ $__t('Unit') }}</th>
<th class="d-none">Hidden group</th>
<th class="d-none">Hidden from_qu_id</th>
</tr>
</thead>
<tbody class="d-none">
@if($mode == "edit")
@foreach($quConversions as $quConversion)
@if($quConversion->product_id == $product->id || $quConversion->product_id == null)
<tr>
<td class="fit-content border-right">
<a class="btn btn-sm btn-info show-as-dialog-link @if($quConversion->product_id == null) disabled @endif"
href="{{ $U('/quantityunitconversion/' . $quConversion->id . '?embedded&product=' . $product->id ) }}">
<i class="fas fa-edit"></i>
<div class="col-lg-6 col-xs-12 @if($mode == 'create') d-none @endif">
<div class="row">
<div class="col">
<div class="title-related-links">
<h4>
{{ $__t('QU conversions') }}
</h4>
<button class="btn btn-outline-dark d-md-none mt-2 float-right order-1 order-md-3"
type="button"
data-toggle="collapse"
data-target="#related-links">
<i class="fas fa-ellipsis-v"></i>
</button>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<a class="btn btn-outline-primary btn-sm m-1 mt-md-0 mb-md-0 float-right show-as-dialog-link"
href="{{ $U('/quantityunitconversion/new?embedded&product=' . $product->id ) }}">
{{ $__t('Add') }}
</a>
<a class="btn btn-sm btn-danger qu-conversion-delete-button @if($quConversion->product_id == null) disabled @endif"
href="#"
data-qu-conversion-id="{{ $quConversion->id }}">
<i class="fas fa-trash"></i>
</a>
</td>
<td>
<span class="locale-number locale-number-quantity-amount">{{ $quConversion->factor }}</span>
</td>
<td>
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name }}
</td>
<td class="d-none">
@if($quConversion->product_id != null)
{{ $__t('Product overrides') }}
@else
{{ $__t('Default conversions') }}
@endif
</td>
<td class="d-none">
from_qu_id xx{{ $quConversion->from_qu_id }}xx
</td>
</tr>
@endif
@endforeach
@endif
</tbody>
</table>
</div>
</div>
<h2>
{{ $__t('Barcodes') }}
<a class="btn btn-outline-dark show-as-dialog-link"
type="button"
href="{{ $U('/productbarcodes/new?embedded&product=' . $product->id ) }}">
<i class="fas fa-plus"></i> {{ $__t('Add') }}
</a>
</h2>
<h5 id="barcode-headline-info"
class="text-muted font-italic"></h5>
<table id="barcode-table"
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"></th>
<th>{{ $__t('Barcode') }}</th>
<th>{{ $__t('Factor purchase to stock quantity unit') }}</th>
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
<th>{{ $__t('Store') }}</th>
@endif
</tr>
</thead>
<tbody class="d-none">
@if($mode == "edit")
@foreach($barcodes as $barcode)
@if($barcode->product_id == $product->id || $barcode->product_id == null)
<tr>
<td class="fit-content border-right">
<a class="btn btn-sm btn-info show-as-dialog-link @if($barcode->product_id == null) disabled @endif"
href="{{ $U('/productbarcodes/' . $barcode->id . '?embedded&product=' . $product->id ) }}">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-sm btn-danger barcode-delete-button @if($barcode->product_id == null) disabled @endif"
href="#"
data-barcode-id="{{ $barcode->id }}"
data-barcode="{{ $barcode->barcode }}"
data-product-barcode="{{ $product->barcode }}"
data-product-id="{{ $product->id }}">
<i class="fas fa-trash"></i>
</a>
</td>
<td>
{{ $barcode->barcode }}
</td>
<td>
<span class="locale-number locale-number-quantity-amount">{{ $barcode->qu_factor_purchase_to_stock }}</span>
</td>
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
<td id="barcode-shopping-location">
@if (FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $barcode->shopping_location_id) !== null)
{{ FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $barcode->shopping_location_id)->name }}
@endif
</td>
@endif
</tr>
@endif
@endforeach
@endif
</tbody>
</table>
<h5 id="qu-conversion-headline-info"
class="text-muted font-italic"></h5>
<div class="pt-5">
<label class="mt-2">{{ $__t('Picture') }}</label>
<button id="delete-current-product-picture-button"
class="btn btn-sm btn-danger @if(empty($product->picture_file_name)) disabled @endif"><i class="fas fa-trash"></i> {{ $__t('Delete') }}</button>
@if(!empty($product->picture_file_name))
<p><img id="current-product-picture"
<table id="qu-conversions-table"
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"></th>
<th>{{ $__t('Factor') }}</th>
<th>{{ $__t('Unit') }}</th>
<th class="d-none">Hidden group</th>
<th class="d-none">Hidden from_qu_id</th>
</tr>
</thead>
<tbody class="d-none">
@if($mode == "edit")
@foreach($quConversions as $quConversion)
@if($quConversion->product_id == $product->id || $quConversion->product_id == null)
<tr>
<td class="fit-content border-right">
<a class="btn btn-sm btn-info show-as-dialog-link @if($quConversion->product_id == null) disabled @endif"
href="{{ $U('/quantityunitconversion/' . $quConversion->id . '?embedded&product=' . $product->id ) }}">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-sm btn-danger qu-conversion-delete-button @if($quConversion->product_id == null) disabled @endif"
href="#"
data-qu-conversion-id="{{ $quConversion->id }}">
<i class="fas fa-trash"></i>
</a>
</td>
<td>
<span class="locale-number locale-number-quantity-amount">{{ $quConversion->factor }}</span>
</td>
<td>
{{ FindObjectInArrayByPropertyValue($quantityunits, 'id', $quConversion->to_qu_id)->name }}
</td>
<td class="d-none">
@if($quConversion->product_id != null)
{{ $__t('Product overrides') }}
@else
{{ $__t('Default conversions') }}
@endif
</td>
<td class="d-none">
from_qu_id xx{{ $quConversion->from_qu_id }}xx
</td>
</tr>
@endif
@endforeach
@endif
</tbody>
</table>
</div>
</div>
<div class="row mt-5">
<div class="col">
<div class="title-related-links">
<h4>
{{ $__t('Barcodes') }}
</h4>
<button class="btn btn-outline-dark d-md-none mt-2 float-right order-1 order-md-3"
type="button"
data-toggle="collapse"
data-target="#related-links">
<i class="fas fa-ellipsis-v"></i>
</button>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<a class="btn btn-outline-primary btn-sm m-1 mt-md-0 mb-md-0 float-right show-as-dialog-link"
href="{{ $U('/productbarcodes/new?embedded&product=' . $product->id ) }}">
{{ $__t('Add') }}
</a>
</div>
</div>
<h5 id="barcode-headline-info"
class="text-muted font-italic"></h5>
<table id="barcode-table"
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"></th>
<th>{{ $__t('Barcode') }}</th>
<th>{{ $__t('Factor purchase to stock quantity unit') }}</th>
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
<th>{{ $__t('Store') }}</th>
@endif
</tr>
</thead>
<tbody class="d-none">
@if($mode == "edit")
@foreach($barcodes as $barcode)
@if($barcode->product_id == $product->id || $barcode->product_id == null)
<tr>
<td class="fit-content border-right">
<a class="btn btn-sm btn-info show-as-dialog-link @if($barcode->product_id == null) disabled @endif"
href="{{ $U('/productbarcodes/' . $barcode->id . '?embedded&product=' . $product->id ) }}">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-sm btn-danger barcode-delete-button @if($barcode->product_id == null) disabled @endif"
href="#"
data-barcode-id="{{ $barcode->id }}"
data-barcode="{{ $barcode->barcode }}"
data-product-barcode="{{ $product->barcode }}"
data-product-id="{{ $product->id }}">
<i class="fas fa-trash"></i>
</a>
</td>
<td>
{{ $barcode->barcode }}
</td>
<td>
<span class="locale-number locale-number-quantity-amount">{{ $barcode->qu_factor_purchase_to_stock }}</span>
</td>
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
<td id="barcode-shopping-location">
@if (FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $barcode->shopping_location_id) !== null)
{{ FindObjectInArrayByPropertyValue($shoppinglocations, 'id', $barcode->shopping_location_id)->name }}
@endif
</td>
@endif
</tr>
@endif
@endforeach
@endif
</tbody>
</table>
</div>
</div>
<div class="row mt-5">
<div class="col">
<div class="title-related-links">
<h4>
{{ $__t('Picture') }}
</h4>
<div class="form-group w-75 m-0">
<div class="input-group">
<div class="custom-file">
<input type="file"
class="custom-file-input"
id="product-picture"
accept="image/*">
<label id="product-picture-label"
class="custom-file-label @if(empty($product->picture_file_name)) d-none @endif"
for="product-picture">
{{ $product->picture_file_name }}
</label>
<label id="product-picture-label-none"
class="custom-file-label @if(!empty($product->picture_file_name)) d-none @endif"
for="product-picture">
{{ $__t('No file selected') }}
</label>
</div>
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-trash"
id="delete-current-product-picture-button"></i></span>
</div>
</div>
</div>
</div>
@if(!empty($product->picture_file_name))
<img id="current-product-picture"
data-src="{{ $U('/api/files/productpictures/' . base64_encode($product->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
class="img-fluid img-thumbnail mt-2 lazy"></p>
<p id="delete-current-product-picture-on-save-hint"
class="form-text text-muted font-italic d-none">{{ $__t('The current picture will be deleted when you save the product') }}</p>
@else
<p id="no-current-product-picture-hint"
class="form-text text-muted font-italic">{{ $__t('No picture available') }}</p>
@endif
class="img-fluid img-thumbnail mt-2 lazy mb-5">
<p id="delete-current-product-picture-on-save-hint"
class="form-text text-muted font-italic d-none mb-5">{{ $__t('The current picture will be deleted when you save the product') }}</p>
@else
<p id="no-current-product-picture-hint"
class="form-text text-muted font-italic mb-5">{{ $__t('No picture available') }}</p>
@endif
</div>
</div>
</div>
</div>

View File

@@ -11,7 +11,16 @@
@section('content')
<div class="row">
<div class="col">
<h2 class="title">@yield('title')</h2>
<div class="title-related-links">
<h2 class="title">@yield('title')</h2>
<h2>
@if($product != null)
<span class="text-muted small">{{ $__t('Override for product') }} <strong>{{ $product->name }}</strong></span>
@else
<span class="text-muted small">{{ $__t('Default for QU') }} <strong>{{ $defaultQuUnit->name }}</strong></span>
@endif
</h2>
</div>
</div>
</div>
@@ -20,12 +29,6 @@
<div class="row">
<div class="col-lg-6 col-xs-12">
@if($product != null)
<h3 class="text-muted">{{ $__t('Override for product') }} <strong>{{ $product->name }}</strong></h3>
@else
<h3 class="text-muted">{{ $__t('Default for QU') }} <strong>{{ $defaultQuUnit->name }}</strong></h3>
@endif
<script>
Grocy.EditMode = '{{ $mode }}';
</script>
@@ -92,15 +95,19 @@
'additionalCssClasses' => 'input-group-qu'
))
<div class="checkbox @if($mode == 'edit') d-none @endif">
<label for="create_inverse">
<input type="checkbox"
id="create_inverse"
<div class="form-group @if($mode == 'edit') d-none @endif">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="create_inverse:skip"
checked> {{ $__t('Create inverse QU conversion') }}
value="0">
<input @if($mode=='edit'
&&
$product->create_inverse == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="create_inverse" name="create_inverse:skip" value="1">
<label class="form-check-label custom-control-label"
for="create_inverse">{{ $__t('Create inverse QU conversion') }}</label>
<span id="qu-conversion-inverse-info"
class="form-text text-info d-none"></span>
</label>
</div>
</div>
@include('components.userfieldsform', array(

View File

@@ -82,8 +82,12 @@
'entity' => 'quantity_units'
))
<button id="save-quantityunit-button"
class="btn btn-success">{{ $__t('Save') }}</button>
<small class="my-2 form-text text-muted @if($mode == 'edit') d-none @endif">{{ $__t('Save & continue to add conversions') }}</small>
<button class="save-quantityunit-button btn btn-success mb-2"
data-location="continue">{{ $__t('Save & continue') }}</button>
<button class="save-quantityunit-button btn btn-info mb-2"
data-location="return">{{ $__t('Save & return to quantity units') }}</button>
@if(intval($pluralCount) > 2)
<button id="test-quantityunit-plural-forms-button"
@@ -93,53 +97,69 @@
</form>
</div>
<div class="col-lg-6 col-xs-12">
<h2>
{{ $__t('Default conversions') }}
<a id="qu-conversion-add-button"
class="btn btn-outline-dark"
href="#">
<i class="fas fa-plus"></i> {{ $__t('Add') }}
</a>
</h2>
<h5 id="qu-conversion-headline-info"
class="text-muted font-italic"></h5>
<table id="qu-conversions-table"
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"></th>
<th>{{ $__t('Factor') }}</th>
<th>{{ $__t('Unit') }}</th>
</tr>
</thead>
<tbody class="d-none">
@if($mode == "edit")
@foreach($defaultQuConversions as $defaultQuConversion)
<tr>
<td class="fit-content border-right">
<a class="btn btn-sm btn-info qu-conversion-edit-button"
href="#"
data-qu-conversion-id="{{ $defaultQuConversion->id }}">
<i class="fas fa-edit"></i>
<div class="col-lg-6 col-xs-12 @if($mode == 'create') d-none @endif">
<div class="row">
<div class="col">
<div class="title-related-links">
<h4>
{{ $__t('Default conversions') }}
</h4>
<button class="btn btn-outline-dark d-md-none mt-2 float-right order-1 order-md-3"
type="button"
data-toggle="collapse"
data-target="#related-links">
<i class="fas fa-ellipsis-v"></i>
</button>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<a class="btn btn-outline-primary btn-sm m-1 mt-md-0 mb-md-0 float-right show-as-dialog-link"
href="{{ $U('/quantityunitconversion/new?embedded&qu-unit=' . $quantityUnit->id ) }}">
{{ $__t('Add') }}
</a>
<a class="btn btn-sm btn-danger qu-conversion-delete-button"
href="#"
data-qu-conversion-id="{{ $defaultQuConversion->id }}">
<i class="fas fa-trash"></i>
</a>
</td>
<td>
{{ $defaultQuConversion->factor }}
</td>
<td>
{{ FindObjectInArrayByPropertyValue($quantityUnits, 'id', $defaultQuConversion->to_qu_id)->name }}
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
<h5 id="qu-conversion-headline-info"
class="text-muted font-italic"></h5>
<table id="qu-conversions-table"
class="table table-sm table-striped nowrap w-100">
<thead>
<tr>
<th class="border-right"></th>
<th>{{ $__t('Factor') }}</th>
<th>{{ $__t('Unit') }}</th>
</tr>
</thead>
<tbody class="d-none">
@if($mode == "edit")
@foreach($defaultQuConversions as $defaultQuConversion)
<tr>
<td class="fit-content border-right">
<a class="btn btn-sm btn-info show-as-dialog-link"
href="{{ $U('/quantityunitconversion/' . $defaultQuConversion->id . '?embedded&qu-unit=' . $quantityUnit->id ) }}"
data-qu-conversion-id="{{ $defaultQuConversion->id }}">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-sm btn-danger qu-conversion-delete-button"
href="#"
data-qu-conversion-id="{{ $defaultQuConversion->id }}">
<i class="fas fa-trash"></i>
</a>
</td>
<td>
{{ $defaultQuConversion->factor }}
</td>
<td>
{{ FindObjectInArrayByPropertyValue($quantityUnits, 'id', $defaultQuConversion->to_qu_id)->name }}
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</div>
</div>
</div>
@stop

View File

@@ -61,34 +61,6 @@
<div class="invalid-feedback">{{ $__t('A name is required') }}</div>
</div>
<div class="form-group">
<label for="recipe-picture">
{{ $__t('Picture') }}
</label>
<div class="input-group">
<div class="custom-file">
<input type="file"
class="custom-file-input"
id="recipe-picture"
accept="image/*">
<label id="recipe-picture-label"
class="custom-file-label @if(empty($recipe->picture_file_name)) d-none @endif"
for="recipe-picture">
{{ $recipe->picture_file_name }}
</label>
<label id="recipe-picture-label-none"
class="custom-file-label @if(!empty($recipe->picture_file_name)) d-none @endif"
for="recipe-picture">
{{ $__t('No file selected') }}
</label>
</div>
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-trash"
id="delete-current-recipe-picture-button"></i></span>
</div>
</div>
</div>
@php if($mode == 'edit') { $value = $recipe->base_servings; } else { $value = 1; } @endphp
@include('components.numberpicker', array(
'id' => 'base_servings',
@@ -113,7 +85,7 @@
{{ $__t('Do not check against the shopping list when adding missing items to it') }}&nbsp;
<i class="fas fa-question-circle"
data-toggle="tooltip"
title="{{ $__t('By default the amount to be added to the shopping list is `needed amount - stock amount - shopping list amount` - when this is enabled, it is only checked against the stock amount, not against what is already on the shopping list') }}"></i>
title="{{ $__t('By default the amount to be added to the shopping list is "needed amount - stock amount - shopping list amount" - when this is enabled, it is only checked against the stock amount, not against what is already on the shopping list') }}"></i>
</label>
</div>
</div>
@@ -149,21 +121,6 @@
</div>
<div class="col-xs-12 col-md-5 pb-3 @if($mode == 'create') d-none @endif">
<div class="row">
<div class="col">
@if(!empty($recipe->picture_file_name))
<img id="current-recipe-picture"
data-src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
class="img-fluid img-thumbnail mt-2 lazy mb-5">
<p id="delete-current-recipe-picture-on-save-hint"
class="form-text text-muted font-italic d-none mb-5">{{ $__t('The current picture will be deleted when you save the recipe') }}</p>
@else
<p id="no-current-recipe-picture-hint"
class="form-text text-muted font-italic mb-5">{{ $__t('No picture available') }}</p>
@endif
</div>
</div>
<div class="row">
<div class="col">
<div class="title-related-links">
@@ -325,6 +282,50 @@
</table>
</div>
</div>
<div class="row mt-5">
<div class="col">
<div class="title-related-links">
<h4>
{{ $__t('Picture') }}
</h4>
<div class="form-group w-75 m-0">
<div class="input-group">
<div class="custom-file">
<input type="file"
class="custom-file-input"
id="recipe-picture"
accept="image/*">
<label id="recipe-picture-label"
class="custom-file-label @if(empty($recipe->picture_file_name)) d-none @endif"
for="recipe-picture">
{{ $recipe->picture_file_name }}
</label>
<label id="recipe-picture-label-none"
class="custom-file-label @if(!empty($recipe->picture_file_name)) d-none @endif"
for="recipe-picture">
{{ $__t('No file selected') }}
</label>
</div>
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-trash"
id="delete-current-recipe-picture-button"></i></span>
</div>
</div>
</div>
</div>
@if(!empty($recipe->picture_file_name))
<img id="current-recipe-picture"
data-src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
class="img-fluid img-thumbnail mt-2 lazy mb-5">
<p id="delete-current-recipe-picture-on-save-hint"
class="form-text text-muted font-italic d-none mb-5">{{ $__t('The current picture will be deleted when you save the recipe') }}</p>
@else
<p id="no-current-recipe-picture-hint"
class="form-text text-muted font-italic mb-5">{{ $__t('No picture available') }}</p>
@endif
</div>
</div>
</div>
</div>

View File

@@ -11,7 +11,12 @@
@section('content')
<div class="row">
<div class="col">
<h2 class="title">@yield('title')</h2>
<div class="title-related-links">
<h2 class="title">@yield('title')</h2>
<h2>
<span class="text-muted small">{{ $__t('Recipe') }} <strong>{{ $recipe->name }}</strong></span>
</h2>
</div>
</div>
</div>
@@ -19,8 +24,6 @@
<div class="row">
<div class="col-xs-12 col-md-6 col-xl-5 pb-3">
<h3 class="text-muted">{{ $__t('Recipe') }} <strong>{{ $recipe->name }}</strong></h3>
<script>
Grocy.EditMode = '{{ $mode }}';
Grocy.EditObjectParentId = {{ $recipe->id }};
@@ -45,15 +48,17 @@
<div class="row">
<div class="col">
<div class="form-check form-group mb-1">
<input type="hidden"
name="only_check_single_unit_in_stock"
value="0">
<input @if($mode=='edit'
&&
$recipePos->only_check_single_unit_in_stock == 1) checked @endif class="form-check-input" type="checkbox" id="only_check_single_unit_in_stock" name="only_check_single_unit_in_stock" value="1">
<label class="form-check-label"
for="only_check_single_unit_in_stock">{{ $__t('Only check if a single unit is in stock (a different quantity can then be used above)') }}</label>
<div class="form-group">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="only_check_single_unit_in_stock"
value="0">
<input @if($mode=='edit'
&&
$recipePos->only_check_single_unit_in_stock == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="only_check_single_unit_in_stock" name="only_check_single_unit_in_stock" value="1">
<label class="form-check-label custom-control-label"
for="only_check_single_unit_in_stock">{{ $__t('Only check if a single unit is in stock (a different quantity can then be used below)') }}</label>
</div>
</div>
</div>
</div>
@@ -67,7 +72,9 @@
))
<div class="form-group">
<label for="variable_amount">{{ $__t('Variable amount') }}&nbsp;&nbsp;<span class="small text-muted">{{ $__t('When this is not empty, it will be shown instead of the amount entered above while the amount there will still be used for stock fulfillment checking') }}</span></label>
<label for="variable_amount">{{ $__t('Variable amount') }}&nbsp;<i class="fas fa-question-circle"
data-toggle="tooltip"
title="{{ $__t('When this is not empty, it will be shown instead of the amount entered above while the amount there will still be used for stock fulfillment checking') }}"></i></label>
<input type="text"
class="form-control"
id="variable_amount"
@@ -75,19 +82,23 @@
value="@if($mode == 'edit'){{ $recipePos->variable_amount }}@endif">
</div>
<div class="form-check mb-3">
<input type="hidden"
name="not_check_stock_fulfillment"
value="0">
<input @if($mode=='edit'
&&
($recipePos->not_check_stock_fulfillment == 1 || FindObjectInArrayByPropertyValue($products, 'id', $recipePos->product_id)->not_check_stock_fulfillment_for_recipes == 1)) checked @endif class="form-check-input" type="checkbox" id="not_check_stock_fulfillment" name="not_check_stock_fulfillment" value="1">
<label class="form-check-label"
for="not_check_stock_fulfillment">{{ $__t('Disable stock fulfillment checking for this ingredient') }}</label>
<div class="form-group">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="not_check_stock_fulfillment"
value="0">
<input @if($mode=='edit'
&&
($recipePos->not_check_stock_fulfillment == 1 || FindObjectInArrayByPropertyValue($products, 'id', $recipePos->product_id)->not_check_stock_fulfillment_for_recipes == 1)) checked @endif class="form-check-input custom-control-input" type="checkbox" id="not_check_stock_fulfillment" name="not_check_stock_fulfillment" value="1">
<label class="form-check-label custom-control-label"
for="not_check_stock_fulfillment">{{ $__t('Disable stock fulfillment checking for this ingredient') }}</label>
</div>
</div>
<div class="form-group">
<label for="ingredient_group">{{ $__t('Group') }}&nbsp;&nbsp;<span class="small text-muted">{{ $__t('This will be used as a headline to group ingredients together') }}</span></label>
<label for="ingredient_group">{{ $__t('Group') }}&nbsp;<i class="fas fa-question-circle"
data-toggle="tooltip"
title="{{ $__t('This will be used as a headline to group ingredients together') }}"></i></label>
<input type="text"
class="form-control"
id="ingredient_group"

View File

@@ -67,7 +67,7 @@
</div>
<div class="col">
<div class="float-right">
<div class="float-right mt-1">
<a id="clear-filter-button"
class="btn btn-sm btn-outline-info"
href="#">

View File

@@ -90,11 +90,12 @@
value="1">
@endif
</div>
<div id="related-links"
class="border-top border-bottom my-2 py-1 collapse">
<div data-status-filter="belowminstockamount"
class="normal-message status-filter-message responsive-button @if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif"><span class="d-block d-md-none">{{count($missingProducts)}} <i class="fas fa-exclamation-circle"></i></span><span class="d-none d-md-block">{{ $__n(count($missingProducts), '%s product is below defined min. stock amount', '%s products are below defined min. stock amount') }}</span></div>
<div class="float-right mt-2">
<div class="border-top border-bottom my-2 py-1">
<div id="table-filter-row"
data-status-filter="belowminstockamount"
class="collapse d-md-inline-block normal-message status-filter-message responsive-button @if(!GROCY_FEATURE_FLAG_STOCK) d-none @endif"><span class="d-block d-md-none">{{count($missingProducts)}} <i class="fas fa-exclamation-circle"></i></span><span class="d-none d-md-block">{{ $__n(count($missingProducts), '%s product is below defined min. stock amount', '%s products are below defined min. stock amount') }}</span></div>
<div id="related-links"
class="float-right mt-2 collapse d-md-block">
<a class="btn btn-primary responsive-button btn-sm mb-1 show-as-dialog-link"
href="{{ $U('/shoppinglistitem/new?embedded&list=' . $selectedShoppingListId) }}">
{{ $__t('Add item') }}

View File

@@ -25,8 +25,8 @@
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<a class="btn btn-primary responsive-button m-1 mt-md-0 mb-md-0 float-right"
href="{{ $U('/shoppinglocation/new') }}">
<a class="btn btn-primary responsive-button m-1 mt-md-0 mb-md-0 float-right show-as-dialog-link"
href="{{ $U('/shoppinglocation/new?embedded') }}">
{{ $__t('Add') }}
</a>
<a class="btn btn-outline-secondary m-1 mt-md-0 mb-md-0 float-right"
@@ -84,8 +84,8 @@
@foreach($shoppinglocations as $shoppinglocation)
<tr>
<td class="fit-content border-right">
<a class="btn btn-info btn-sm"
href="{{ $U('/shoppinglocation/') }}{{ $shoppinglocation->id }}">
<a class="btn btn-info btn-sm show-as-dialog-link"
href="{{ $U('/shoppinglocation/') }}{{ $shoppinglocation->id }}?embedded">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-danger btn-sm shoppinglocation-delete-button"

View File

@@ -25,8 +25,8 @@
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100"
id="related-links">
<a class="btn btn-primary responsive-button m-1 mt-md-0 mb-md-0 float-right"
href="{{ $U('/taskcategory/new') }}">
<a class="btn btn-primary responsive-button m-1 mt-md-0 mb-md-0 float-right show-as-dialog-link"
href="{{ $U('/taskcategory/new?embedded') }}">
{{ $__t('Add') }}
</a>
<a class="btn btn-outline-secondary"
@@ -84,8 +84,8 @@
@foreach($taskCategories as $taskCategory)
<tr>
<td class="fit-content border-right">
<a class="btn btn-info btn-sm"
href="{{ $U('/taskcategory/') }}{{ $taskCategory->id }}">
<a class="btn btn-info btn-sm show-as-dialog-link"
href="{{ $U('/taskcategory/') }}{{ $taskCategory->id }}?embedded">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-danger btn-sm task-category-delete-button"

View File

@@ -25,8 +25,8 @@
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100 m-1 mt-md-0 mb-md-0 float-right"
id="related-links">
<a class="btn btn-primary responsive-button"
href="{{ $U('/userentity/new') }}">
<a class="btn btn-primary responsive-button show-as-dialog-link"
href="{{ $U('/userentity/new?embedded') }}">
{{ $__t('Add') }}
</a>
</div>
@@ -75,8 +75,8 @@
@foreach($userentities as $userentity)
<tr>
<td class="fit-content border-right">
<a class="btn btn-info btn-sm"
href="{{ $U('/userentity/') }}{{ $userentity->id }}">
<a class="btn btn-info btn-sm show-as-dialog-link"
href="{{ $U('/userentity/') }}{{ $userentity->id }}?embedded">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-danger btn-sm userentity-delete-button"

View File

@@ -68,14 +68,14 @@
</div>
<div class="form-group">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="show_in_sidebar_menu"
value="0">
<input @if($mode=='edit'
&&
$userentity->show_in_sidebar_menu == 1) checked @endif class="form-check-input" type="checkbox" id="show_in_sidebar_menu" name="show_in_sidebar_menu" value="1">
<label class="form-check-label"
$userentity->show_in_sidebar_menu == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="show_in_sidebar_menu" name="show_in_sidebar_menu" value="1">
<label class="form-check-label custom-control-label"
for="show_in_sidebar_menu">{{ $__t('Show in sidebar menu') }}</label>
</div>
</div>

View File

@@ -97,14 +97,14 @@
</div>
<div class="form-group">
<div class="form-check">
<div class="custom-control custom-checkbox">
<input type="hidden"
name="show_as_column_in_tables"
value="0">
<input @if($mode=='edit'
&&
$userfield->show_as_column_in_tables == 1) checked @endif class="form-check-input" type="checkbox" id="show_as_column_in_tables" name="show_as_column_in_tables" value="1">
<label class="form-check-label"
$userfield->show_as_column_in_tables == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="show_as_column_in_tables" name="show_as_column_in_tables" value="1">
<label class="form-check-label custom-control-label"
for="show_as_column_in_tables">{{ $__t('Show as column in tables') }}</label>
</div>
</div>

View File

@@ -25,8 +25,8 @@
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100 m-1 mt-md-0 mb-md-0 float-right"
id="related-links">
<a class="btn btn-primary responsive-button"
href="{{ $U('/userfield/new') }}">
<a class="btn btn-primary responsive-button show-as-dialog-link"
href="{{ $U('/userfield/new?embedded') }}">
{{ $__t('Add') }}
</a>
</div>
@@ -91,8 +91,8 @@
@foreach($userfields as $userfield)
<tr>
<td class="fit-content border-right">
<a class="btn btn-info btn-sm"
href="{{ $U('/userfield/') }}{{ $userfield->id }}">
<a class="btn btn-info btn-sm show-as-dialog-link"
href="{{ $U('/userfield/') }}{{ $userfield->id }}?embedded">
<i class="fas fa-edit"></i>
</a>
<a class="btn btn-danger btn-sm userfield-delete-button"

View File

@@ -8,8 +8,10 @@
<div class="row">
<div class="col">
<div class="title-related-links">
<h2 class="title">
<h2 class="title mr-2 order-0">
@yield('title')
</h2>
<h2 class="mb-0 mr-auto order-3 order-md-1 width-xs-sm-100">
<span class="text-muted small">{{ $userentity->description }}</span>
</h2>
<div class="float-right">
@@ -28,7 +30,7 @@
</div>
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100 m-1 mt-md-0 mb-md-0 float-right"
id="related-links">
<a class="btn btn-primary responsive-button"
<a class="btn btn-primary responsive-button mr-1"
href="{{ $U('/userobject/' . $userentity->name . '/new') }}">
{{ $__t('Add') }}
</a>