Varios small UI changes / improve UI consistency

This commit is contained in:
Bernd Bestel
2019-03-04 17:43:12 +01:00
parent 8020f92d6b
commit 77b0bc675c
47 changed files with 430 additions and 195 deletions

View File

@@ -12,6 +12,10 @@
</div>
<div class="row my-3">
<div class="col-xs-12 col-md-6 col-xl-3">
<label for="search">{{ $L('Search') }}</label> <i class="fas fa-search"></i>
<input type="text" class="form-control" id="search">
</div>
<div class="col-xs-12 col-md-6 col-xl-3">
<label for="battery-filter">{{ $L('Filter by battery') }}</label> <i class="fas fa-filter"></i>
<select class="form-control" id="battery-filter">
@@ -21,10 +25,6 @@
@endforeach
</select>
</div>
<div class="col-xs-12 col-md-6 col-xl-3">
<label for="search">{{ $L('Search') }}</label> <i class="fas fa-search"></i>
<input type="text" class="form-control" id="search">
</div>
</div>
<div class="row">

View File

@@ -50,7 +50,7 @@
'min' => '0',
'additionalCssClasses' => 'input-group-chore-period-type',
'invalidFeedback' => $L('This cannot be negative'),
'additionalHtmlElements' => '<p id="chore-period-type-info" class="form-text text-muted small d-none"></p>'
'hintId' => 'chore-period-type-info'
))
<button id="save-chore-button" class="btn btn-success">{{ $L('Save') }}</button>

View File

@@ -12,6 +12,10 @@
</div>
<div class="row my-3">
<div class="col-xs-12 col-md-6 col-xl-3">
<label for="search">{{ $L('Search') }}</label> <i class="fas fa-search"></i>
<input type="text" class="form-control" id="search">
</div>
<div class="col-xs-12 col-md-6 col-xl-3">
<label for="chore-filter">{{ $L('Filter by chore') }}</label> <i class="fas fa-filter"></i>
<select class="form-control" id="chore-filter">
@@ -21,10 +25,6 @@
@endforeach
</select>
</div>
<div class="col-xs-12 col-md-6 col-xl-3">
<label for="search">{{ $L('Search') }}</label> <i class="fas fa-search"></i>
<input type="text" class="form-control" id="search">
</div>
</div>
<div class="row">

View File

@@ -6,7 +6,12 @@
@php if(!isset($initialValue)) { $initialValue = ''; } @endphp
<div class="form-group">
<label for="{{ $id }}">{{ $L($label) }} <span class="small text-muted"><time id="datetimepicker-timeago" class="timeago timeago-contextual"></time>@if(!empty($hint))<br>{{ $L($hint) }}@endif</span></label>
<label for="{{ $id }}">{{ $L($label) }}
<span class="small text-muted">
@if(!empty($hint)){{ $L($hint) }}@endif
<time id="datetimepicker-timeago" class="timeago timeago-contextual"></time>
</span>
</label>
<div class="input-group">
<div class="input-group date datetimepicker @if(!empty($additionalCssClasses)){{ $additionalCssClasses }}@endif" id="{{ $id }}" data-target-input="nearest">
<input type="text" @if($isRequired) required @endif class="form-control datetimepicker-input"

View File

@@ -0,0 +1,19 @@
@push('componentScripts')
<script src="{{ $U('/viewjs/components/locationpicker.js', true) }}?v={{ $version }}"></script>
@endpush
@php if(empty($prefillByName)) { $prefillByName = ''; } @endphp
@php if(empty($prefillById)) { $prefillById = ''; } @endphp
@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">{{ $L('Location') }}&nbsp;&nbsp;<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>
@endforeach
</select>
<div class="invalid-feedback">{{ $L('You have to select a location') }}</div>
</div>

View File

@@ -29,11 +29,11 @@
<div class="form-group">
<label for="use_specific_stock_entry">
<input type="checkbox" id="use_specific_stock_entry" name="use_specific_stock_entry"> {{ $L('Use a specific stock item') }}
<span class="small text-muted">{{ $L('The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"') }}</span>
</label>
<select disabled class="form-control" id="specific_stock_entry" name="specific_stock_entry">
<option></option>
</select>
<span class="small text-muted">{{ $L('The first item in this list would be picked by the default rule which is "First expiring first, then first in first out"') }}</span>
</div>
<div class="checkbox">

View File

@@ -42,12 +42,13 @@
</div>
<div class="form-group">
<label for="instruction-manual">{{ $L('Instruction manual') }} (PDF)</label>
<label for="instruction-manual">{{ $L('Instruction manual') }} (PDF)
<span class="text-muted small">{{ $L('If you don\'t select a file, the current instruction manual will not be altered') }}</span>
</label>
<div class="custom-file">
<input type="file" class="custom-file-input" id="instruction-manual" accept="application/pdf">
<label class="custom-file-label" for="instruction-manual">{{ $L('No file selected') }}</label>
</div>
<p class="form-text text-muted small">{{ $L('If you don\'t select a file, the current instruction manual will not be altered') }}</p>
</div>
<div class="form-group">
@@ -61,8 +62,8 @@
</div>
<div class="col-lg-6 col-xs-12">
<label class="mt-2">{{ $L('Current instruction manual') }}</label>
<button id="delete-current-instruction-manual-button" class="btn btn-sm btn-danger @if(empty($equipment->instruction_manual_file_name)) disabled @endif"><i class="fas fa-trash"></i> {{ $L('Delete') }}</button>
<label class="mt-2">{{ $L('Instruction manual') }}</label>
<button id="delete-current-instruction-manual-button" class="btn btn-sm btn-danger mb-1 @if(empty($equipment->instruction_manual_file_name)) disabled @endif"><i class="fas fa-trash"></i> {{ $L('Delete') }}</button>
@if(!empty($equipment->instruction_manual_file_name))
<embed id="current-equipment-instruction-manual" class="embed-responsive embed-responsive-4by3" src="{{ $U('/api/files/equipmentmanuals/' . base64_encode($equipment->instruction_manual_file_name)) }}" type="application/pdf">
<p id="delete-current-instruction-manual-on-save-hint" class="form-text text-muted font-italic d-none">{{ $L('The current instruction manual will be deleted when you save the equipment') }}</p>

View File

@@ -135,12 +135,13 @@
</div>
<div class="form-group">
<label for="product-picture">{{ $L('Product picture') }}</label>
<label for="product-picture">{{ $L('Product picture') }}
<span class="text-muted small">{{ $L('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">{{ $L('No file selected') }}</label>
</div>
<p class="form-text text-muted small">{{ $L('If you don\'t select a file, the current picture will not be altered') }}</p>
</div>
<button id="save-product-button" class="btn btn-success">{{ $L('Save') }}</button>
@@ -148,7 +149,7 @@
</div>
<div class="col-lg-6 col-xs-12">
<label class="mt-2">{{ $L('Current picture') }}</label>
<label class="mt-2">{{ $L('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> {{ $L('Delete') }}</button>
@if(!empty($product->picture_file_name))
<p><img id="current-product-picture" src="{{ $U('/api/files/productpictures/' . base64_encode($product->picture_file_name)) }}" class="img-fluid img-thumbnail mt-2"></p>

View File

@@ -49,16 +49,11 @@
'isRequired' => false
))
<div class="form-group">
<label for="location_id">{{ $L('Location') }}</label>
<select required class="form-control" id="location_id" name="location_id">
<option></option>
@foreach($locations as $location)
<option value="{{ $location->id }}">{{ $location->name }}</option>
@endforeach
</select>
<div class="invalid-feedback">{{ $L('A location is required') }}</div>
</div>
@include('components.locationpicker', array(
'locations' => $locations,
'isRequired' => false,
'hint' => $L('This is for statistical purposes only')
))
<button id="save-purchase-button" class="btn btn-success">{{ $L('OK') }}</button>

View File

@@ -73,12 +73,13 @@
</div>
<div class="form-group">
<label for="recipe-picture">{{ $L('Picture') }}</label>
<label for="recipe-picture">{{ $L('Picture') }}
<span class="text-muted small">{{ $L('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="recipe-picture" accept="image/*">
<label class="custom-file-label" for="recipe-picture">{{ $L('No file selected') }}</label>
</div>
<p class="form-text text-muted small">{{ $L('If you don\'t select a file, the current picture will not be altered') }}</p>
</div>
<button id="save-recipe-button" class="btn btn-success">{{ $L('Save') }}</button>
@@ -180,7 +181,7 @@
<div class="row mt-5">
<div class="col">
<label class="mt-2">{{ $L('Current picture') }}</label>
<label class="mt-2">{{ $L('Picture') }}</label>
<button id="delete-current-recipe-picture-button" class="btn btn-sm btn-danger @if(empty($recipe->picture_file_name)) disabled @endif"><i class="fas fa-trash"></i> {{ $L('Delete') }}</button>
@if(!empty($recipe->picture_file_name))
<p><img id="current-recipe-picture" src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name)) }}" class="img-fluid img-thumbnail mt-2"></p>

View File

@@ -12,6 +12,10 @@
</div>
<div class="row my-3">
<div class="col-xs-12 col-md-6 col-xl-3">
<label for="search">{{ $L('Search') }}</label> <i class="fas fa-search"></i>
<input type="text" class="form-control" id="search">
</div>
<div class="col-xs-12 col-md-6 col-xl-3">
<label for="product-filter">{{ $L('Filter by product') }}</label> <i class="fas fa-filter"></i>
<select class="form-control" id="product-filter">
@@ -21,10 +25,6 @@
@endforeach
</select>
</div>
<div class="col-xs-12 col-md-6 col-xl-3">
<label for="search">{{ $L('Search') }}</label> <i class="fas fa-search"></i>
<input type="text" class="form-control" id="search">
</div>
</div>
<div class="row">