Added localization support

This commit is contained in:
Bernd Bestel
2018-04-16 19:11:32 +02:00
parent 4949913ccb
commit 4656a85732
64 changed files with 1112 additions and 878 deletions

View File

@@ -1,6 +1,6 @@
@extends('layout.default')
@section('title', 'Batteries')
@section('title', $L('Batteries'))
@section('activeNav', 'batteries')
@section('viewJsName', 'batteries')
@@ -8,9 +8,9 @@
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
<h1 class="page-header">
Batteries
@yield('title')
<a class="btn btn-default" href="/battery/new" role="button">
<i class="fa fa-plus"></i>&nbsp;Add
<i class="fa fa-plus"></i>&nbsp;{{ $L('Add') }}
</a>
</h1>
@@ -19,9 +19,9 @@
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Description</th>
<th>Used in</th>
<th>{{ $L('Name') }}</th>
<th>{{ $L('Description') }}</th>
<th>{{ $L('Used in') }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,21 +1,21 @@
@extends('layout.default')
@section('title', 'Batteries overview')
@section('title', $L('Batteries overview'))
@section('activeNav', 'batteriesoverview')
@section('viewJsName', 'batteriesoverview')
@section('content')
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
<h1 class="page-header">Batteries overview</h1>
<h1 class="page-header">@yield('title')</h1>
<div class="table-responsive">
<table id="batteries-overview-table" class="table table-striped">
<thead>
<tr>
<th>Battery</th>
<th>Last charged</th>
<th>Next planned charge cycle</th>
<th>{{ $L('Battery') }}</th>
<th>{{ $L('Last charged') }}</th>
<th>{{ $L('Next planned charge cycle') }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,9 +1,9 @@
@extends('layout.default')
@if($mode == 'edit')
@section('title', 'Edit battery')
@section('title', $L('Edit battery'))
@else
@section('title', 'Create battery')
@section('title', $L('Create battery'))
@endif
@section('viewJsName', 'batteryform')
@@ -22,22 +22,22 @@
<form id="battery-form">
<div class="form-group">
<label for="name">Name</label>
<label for="name">{{ $L('Name') }}</label>
<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $battery->name }}@endif">
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="description">Description</label>
<label for="description">{{ $L('Description') }}</label>
<input type="text" class="form-control" id="description" name="description" value="@if($mode == 'edit'){{ $battery->description }}@endif">
</div>
<div class="form-group">
<label for="name">Used in</label>
<label for="name">{{ $L('Used in') }}</label>
<input type="text" class="form-control" id="used_in" name="used_in" value="@if($mode == 'edit'){{ $battery->used_in }}@endif">
</div>
<button id="save-battery-button" type="submit" class="btn btn-default">Save</button>
<button id="save-battery-button" type="submit" class="btn btn-default">{{ $L('Save') }}</button>
</form>

View File

@@ -1,18 +1,18 @@
@extends('layout.default')
@section('title', 'Battery tracking')
@section('title', $L('Battery tracking'))
@section('activeNav', 'batterytracking')
@section('viewJsName', 'batterytracking')
@section('content')
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2">
<h1 class="page-header">Battery tracking</h1>
<h1 class="page-header">@yield('title')</h1>
<form id="batterytracking-form">
<div class="form-group">
<label for="battery_id">Battery</label>
<label for="battery_id">{{ $L('Battery') }}</label>
<select class="form-control combobox" id="battery_id" name="battery_id" required>
<option value=""></option>
@foreach($batteries as $battery)
@@ -23,7 +23,7 @@
</div>
<div class="form-group">
<label for="tracked_time">Tracked time</label>
<label for="tracked_time">{{ $L('Tracked time') }}</label>
<div class="input-group date datetimepicker">
<input type="text" class="form-control" id="tracked_time" name="tracked_time" required >
<span class="input-group-addon">
@@ -33,7 +33,7 @@
<div class="help-block with-errors"></div>
</div>
<button id="save-batterytracking-button" type="submit" class="btn btn-default">OK</button>
<button id="save-batterytracking-button" type="submit" class="btn btn-default">{{ $L('OK') }}</button>
</form>

View File

@@ -4,11 +4,12 @@
<div class="main well">
<h3>Battery overview <strong><span id="batterycard-battery-name"></span></strong></h3>
<h3>{{ $L('Battery overview') }} <strong><span id="batterycard-battery-name"></span></strong></h3>
<p>
<strong>Charge cycles count:</strong> <span id="batterycard-battery-charge-cycles-count"></span><br>
<strong>Last charged:</strong> <span id="batterycard-battery-last-charged"></span> <time id="batterycard-battery-last-charged-timeago" class="timeago timeago-contextual"></time><br>
<strong>{{ $L('Used in') }}:</strong> <span id="batterycard-battery-used_in"></span><br>
<strong>{{ $L('Charge cycles count') }}:</strong> <span id="batterycard-battery-charge-cycles-count"></span><br>
<strong>{{ $L('Last charged') }}:</strong> <span id="batterycard-battery-last-charged"></span> <time id="batterycard-battery-last-charged-timeago" class="timeago timeago-contextual"></time><br>
</p>
</div>

View File

@@ -3,7 +3,7 @@
@endpush
<div class="form-group">
<label for="{{ $id }}">{!! $label !!}&nbsp;&nbsp;<span class="small text-muted"><time id="datepicker-timeago" class="timeago timeago-contextual"></time></span></label>
<label for="{{ $id }}">{{ $L($label) }}&nbsp;&nbsp;<span class="small text-muted"><time id="datepicker-timeago" class="timeago timeago-contextual"></time>@if(!empty($hint))<br>{{ $L($hint) }}@endif</span></label>
<div class="input-group date">
<input type="text" data-isodate="isodate" class="form-control datepicker" id="{{ $id }}" name="{{ $id }}" required autocomplete="off">
<div id="datepicker-button" class="input-group-addon">

View File

@@ -3,7 +3,7 @@
@endpush
<div class="form-group">
<label for="{{ $id }}">{{ $label }}</label>
<label for="{{ $id }}">{{ $L($label) }}</label>
<div class="input-group date datetimepicker">
<input type="text" class="form-control" id="{{ $id }}" name="{{ $id }}" required>
<span class="input-group-addon">

View File

@@ -4,11 +4,11 @@
<div class="main well">
<h3>Habit overview <strong><span id="habitcard-habit-name"></span></strong></h3>
<h3>{{ $L('Habit overview') }} <strong><span id="habitcard-habit-name"></span></strong></h3>
<p>
<strong>Tracked count:</strong> <span id="habitcard-habit-tracked-count"></span><br>
<strong>Last tracked:</strong> <span id="habitcard-habit-last-tracked"></span> <time id="habitcard-habit-last-tracked-timeago" class="timeago timeago-contextual"></time><br>
<strong>{{ $L('Tracked count') }}:</strong> <span id="habitcard-habit-tracked-count"></span><br>
<strong>{{ $L('Last tracked') }}:</strong> <span id="habitcard-habit-last-tracked"></span> <time id="habitcard-habit-last-tracked-timeago" class="timeago timeago-contextual"></time><br>
</p>
</div>

View File

@@ -4,13 +4,13 @@
<div class="main well">
<h3>Product overview <strong><span id="productcard-product-name"></span></strong></h3>
<h4><strong>Stock quantity unit:</strong> <span id="productcard-product-stock-qu-name"></span></h4>
<h3>{{ $L('Product overview') }} <strong><span id="productcard-product-name"></span></strong></h3>
<h4><strong>{{ $L('Stock quantity unit') }}:</strong> <span id="productcard-product-stock-qu-name"></span></h4>
<p>
<strong>Stock amount:</strong> <span id="productcard-product-stock-amount"></span> <span id="productcard-product-stock-qu-name2"></span><br>
<strong>Last purchased:</strong> <span id="productcard-product-last-purchased"></span> <time id="productcard-product-last-purchased-timeago" class="timeago timeago-contextual"></time><br>
<strong>Last used:</strong> <span id="productcard-product-last-used"></span> <time id="productcard-product-last-used-timeago" class="timeago timeago-contextual"></time>
<strong>{{ $L('Stock amount') }}:</strong> <span id="productcard-product-stock-amount"></span> <span id="productcard-product-stock-qu-name2"></span><br>
<strong>{{ $L('Last purchased') }}:</strong> <span id="productcard-product-last-purchased"></span> <time id="productcard-product-last-purchased-timeago" class="timeago timeago-contextual"></time><br>
<strong>{{ $L('Last used') }}:</strong> <span id="productcard-product-last-used"></span> <time id="productcard-product-last-used-timeago" class="timeago timeago-contextual"></time>
</p>
</div>

View File

@@ -1,18 +1,18 @@
@extends('layout.default')
@section('title', 'Consume')
@section('title', $L('Consume'))
@section('activeNav', 'consume')
@section('viewJsName', 'consume')
@section('content')
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2">
<h1 class="page-header">Consume</h1>
<h1 class="page-header">@yield('title')</h1>
<form id="consume-form">
<div class="form-group">
<label for="product_id">Product&nbsp;&nbsp;<i class="fa fa-barcode"></i></label>
<label for="product_id">{{ $L('Product') }}&nbsp;&nbsp;<i class="fa fa-barcode"></i></label>
<select class="form-control combobox" id="product_id" name="product_id" required>
<option value=""></option>
@foreach($products as $product)
@@ -23,18 +23,18 @@
</div>
<div class="form-group">
<label for="amount">Amount&nbsp;&nbsp;<span id="amount_qu_unit" class="small text-muted"></span></label>
<label for="amount">{{ $L('Amount') }}&nbsp;&nbsp;<span id="amount_qu_unit" class="small text-muted"></span></label>
<input type="number" class="form-control" id="amount" name="amount" value="1" min="1" required>
<div class="help-block with-errors"></div>
</div>
<div class="checkbox">
<label for="spoiled">
<input type="checkbox" id="spoiled" name="spoiled"> Spoiled
<input type="checkbox" id="spoiled" name="spoiled"> {{ $L('Spoiled') }}
</label>
</div>
<button id="save-consume-button" type="submit" class="btn btn-default">OK</button>
<button id="save-consume-button" type="submit" class="btn btn-default">{{ $L('OK') }}</button>
</form>

View File

@@ -1,9 +1,9 @@
@extends('layout.default')
@if($mode == 'edit')
@section('title', 'Edit habit')
@section('title', $L('Edit habit'))
@else
@section('title', 'Create habit')
@section('title', $L('Create habit'))
@endif
@section('viewJsName', 'habitform')
@@ -22,35 +22,35 @@
<form id="habit-form">
<div class="form-group">
<label for="name">Name</label>
<label for="name">{{ $L('Name') }}</label>
<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $habit->name }}@endif">
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="description">Description</label>
<label for="description">{{ $L('Description') }}</label>
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $habit->description }}@endif</textarea>
</div>
<div class="form-group">
<label for="period_type">Period type</label>
<label for="period_type">{{ $L('Period type') }}</label>
<select required class="form-control input-group-habit-period-type" id="period_type" name="period_type">
@foreach($periodTypes as $periodType)
<option @if($mode == 'edit' && $periodType == $habit->period_type) selected="selected" @endif value="{{ $periodType }}">{{ $periodType }}</option>
<option @if($mode == 'edit' && $periodType == $habit->period_type) selected="selected" @endif value="{{ $periodType }}">{{ $L($periodType) }}</option>
@endforeach
</select>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="period_days">Period days</label>
<label for="period_days">{{ $L('Period days') }}</label>
<input type="number" class="form-control input-group-habit-period-type" id="period_days" name="period_days" value="@if($mode == 'edit'){{ $habit->period_days }}@endif">
<div class="help-block with-errors"></div>
</div>
<p id="habit-period-type-info" class="help-block text-muted"></p>
<button id="save-habit-button" type="submit" class="btn btn-default">Save</button>
<button id="save-habit-button" type="submit" class="btn btn-default">{{ $L('Save') }}</button>
</form>

View File

@@ -1,6 +1,6 @@
@extends('layout.default')
@section('title', 'Habits')
@section('title', $L('Habits'))
@section('activeNav', 'habits')
@section('viewJsName', 'habits')
@@ -8,9 +8,9 @@
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
<h1 class="page-header">
Habits
@yield('title')
<a class="btn btn-default" href="/habit/new" role="button">
<i class="fa fa-plus"></i>&nbsp;Add
<i class="fa fa-plus"></i>&nbsp;{{ $L('Add') }}
</a>
</h1>
@@ -19,10 +19,10 @@
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Period type</th>
<th>Period days</th>
<th>Description</th>
<th>{{ $L('Name') }}</th>
<th>{{ $L('Period type') }}</th>
<th>{{ $L('Period days') }}</th>
<th>{{ $L('Description') }}</th>
</tr>
</thead>
<tbody>
@@ -40,7 +40,7 @@
{{ $habit->name }}
</td>
<td>
{{ $habit->period_type }}
{{ $L($habit->period_type) }}
</td>
<td>
{{ $habit->period_days }}

View File

@@ -1,21 +1,21 @@
@extends('layout.default')
@section('title', 'Habits overview')
@section('title', $L('Habits overview'))
@section('activeNav', 'habitsoverview')
@section('viewJsName', 'habitsoverview')
@section('content')
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
<h1 class="page-header">Habits overview</h1>
<h1 class="page-header">@yield('title')</h1>
<div class="table-responsive">
<table id="habits-overview-table" class="table table-striped">
<thead>
<tr>
<th>Habit</th>
<th>Next estimated tracking</th>
<th>Last tracked</th>
<th>{{ $L('Habit') }}</th>
<th>{{ $L('Next estimated tracking') }}</th>
<th>{{ $L('Last tracked') }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,18 +1,18 @@
@extends('layout.default')
@section('title', 'Habit tracking')
@section('title', $L('Habit tracking'))
@section('activeNav', 'habittracking')
@section('viewJsName', 'habittracking')
@section('content')
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2">
<h1 class="page-header">Habit tracking</h1>
<h1 class="page-header">@yield('title')</h1>
<form id="habittracking-form">
<div class="form-group">
<label for="habit_id">Habit</label>
<label for="habit_id">{{ $L('Habit') }}</label>
<select class="form-control combobox" id="habit_id" name="habit_id" required>
<option value=""></option>
@foreach($habits as $habit)
@@ -27,7 +27,7 @@
'label' => 'Tracked time'
))
<button id="save-habittracking-button" type="submit" class="btn btn-default">OK</button>
<button id="save-habittracking-button" type="submit" class="btn btn-default">{{ $L('OK') }}</button>
</form>

View File

@@ -1,18 +1,18 @@
@extends('layout.default')
@section('title', 'Inventory')
@section('title', $L('Inventory'))
@section('activeNav', 'inventory')
@section('viewJsName', 'inventory')
@section('content')
<div class="col-sm-4 col-sm-offset-3 col-md-3 col-md-offset-2">
<h1 class="page-header">Inventory</h1>
<h1 class="page-header">@yield('title')</h1>
<form id="inventory-form">
<div class="form-group">
<label for="product_id">Product&nbsp;&nbsp;<i class="fa fa-barcode"></i><span id="barcode-lookup-disabled-hint" class="small text-muted hide">&nbsp;&nbsp;Barcode lookup is disabled</span></label>
<label for="product_id">{{ $L('Product') }}&nbsp;&nbsp;<i class="fa fa-barcode"></i><span id="barcode-lookup-disabled-hint" class="small text-muted hide">&nbsp;&nbsp;{{ $L('Barcode lookup is disabled') }}</span></label>
<select class="form-control combobox" id="product_id" name="product_id" required>
<option value=""></option>
@foreach($products as $product)
@@ -20,11 +20,11 @@
@endforeach
</select>
<div class="help-block with-errors"></div>
<div id="flow-info-addbarcodetoselection" class="text-muted small hide"><strong><span id="addbarcodetoselection"></span></strong> will be added to the list of barcodes for the selected product on submit.</div>
<div id="flow-info-addbarcodetoselection" class="text-muted small hide"><strong><span id="addbarcodetoselection"></span></strong> {{ $L('will be added to the list of barcodes for the selected product on submit') }}</div>
</div>
<div class="form-group">
<label for="new_amount">New amount&nbsp;&nbsp;<span id="new_amount_qu_unit" class="small text-muted"></span></label>
<label for="new_amount">{{ $L('New amount') }}&nbsp;&nbsp;<span id="new_amount_qu_unit" class="small text-muted"></span></label>
<input type="number" data-notequal="notequal" class="form-control" id="new_amount" name="new_amount" min="0" not-equal="-1" required>
<div class="help-block with-errors"></div>
<div id="inventory-change-info" class="help-block text-muted"></div>
@@ -32,10 +32,11 @@
@include('components.datepicker', array(
'id' => 'best_before_date',
'label' => 'Best before&nbsp;&nbsp;<span class="small text-muted">This will apply to added products</span>'
'label' => 'Best before',
'hint' => 'This will apply to added products'
))
<button id="save-inventory-button" type="submit" class="btn btn-default">OK</button>
<button id="save-inventory-button" type="submit" class="btn btn-default">{{ $L('OK') }}</button>
</form>

View File

@@ -25,10 +25,12 @@
<link href="/components_unmanaged/noto-sans-v6-latin/noto-sans-v6-latin.css?v={{ $version }}" rel="stylesheet">
<link href="/css/grocy.css?v={{ $version }}" rel="stylesheet">
<script src="/bower_components/jquery/dist/jquery.min.js?v={{ $version }}"></script>
<script src="/js/extensions.js?v={{ $version }}"></script>
<script src="/js/grocy.js?v={{ $version }}"></script>
<script>Grocy.ActiveNav = '@yield('activeNav', '')';</script>
<script>
var Grocy = { };
Grocy.Components = { };
Grocy.LocalizationStrings = {!! json_encode($localizationStrings) !!};
Grocy.ActiveNav = '@yield('activeNav', '')';
</script>
</head>
<body>
@@ -46,7 +48,7 @@
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a class="discrete-link logout-button" href="/logout"><i class="fa fa-sign-out fa-fw"></i>&nbsp;Logout</a>
<a class="discrete-link logout-button" href="/logout"><i class="fa fa-sign-out fa-fw"></i>&nbsp;{{ $L('Logout') }}</a>
</li>
</ul>
</div>
@@ -55,60 +57,60 @@
<ul class="nav navbar-nav navbar-right">
<li data-nav-for-page="stockoverview">
<a class="discrete-link" href="/stockoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;Stock overview</a>
<a class="discrete-link" href="/stockoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;{{ $L('Stock overview') }}</a>
</li>
<li data-nav-for-page="habitsoverview">
<a class="discrete-link" href="/habitsoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;Habits overview</a>
<a class="discrete-link" href="/habitsoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;{{ $L('Habits overview') }}</a>
</li>
<li data-nav-for-page="batteriesoverview">
<a class="discrete-link" href="/batteriesoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;Batteries overview</a>
<a class="discrete-link" href="/batteriesoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;{{ $L('Batteries overview') }}</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="disabled"><a href="#"><strong>Record data</strong></a></li>
<li class="disabled"><a href="#"><strong>{{ $L('Record data') }}</strong></a></li>
<li data-nav-for-page="purchase">
<a class="discrete-link" href="/purchase"><i class="fa fa-shopping-cart fa-fw"></i>&nbsp;Purchase</a>
<a class="discrete-link" href="/purchase"><i class="fa fa-shopping-cart fa-fw"></i>&nbsp;{{ $L('Purchase') }}</a>
</li>
<li data-nav-for-page="consume">
<a class="discrete-link" href="/consume"><i class="fa fa-cutlery fa-fw"></i>&nbsp;Consume</a>
</li>
<li data-nav-for-page="inventory">
<a class="discrete-link" href="/inventory"><i class="fa fa-list fa-fw"></i>&nbsp;Inventory</a>
<a class="discrete-link" href="/consume"><i class="fa fa-cutlery fa-fw"></i>&nbsp;{{ $L('Consume') }}</a>
</li>
<li data-nav-for-page="shoppinglist">
<a class="discrete-link" href="/shoppinglist"><i class="fa fa-shopping-bag fa-fw"></i>&nbsp;Shopping list</a>
<a class="discrete-link" href="/shoppinglist"><i class="fa fa-shopping-bag fa-fw"></i>&nbsp;{{ $L('Shopping list') }}</a>
</li>
<li data-nav-for-page="inventory">
<a class="discrete-link" href="/inventory"><i class="fa fa-list fa-fw"></i>&nbsp;{{ $L('Inventory') }}</a>
</li>
<li data-nav-for-page="habittracking">
<a class="discrete-link" href="/habittracking"><i class="fa fa-play fa-fw"></i>&nbsp;Habit tracking</a>
<a class="discrete-link" href="/habittracking"><i class="fa fa-play fa-fw"></i>&nbsp;{{ $L('Habit tracking') }}</a>
</li>
<li data-nav-for-page="batterytracking">
<a class="discrete-link" href="/batterytracking"><i class="fa fa-fire fa-fw"></i>&nbsp;Battery tracking</a>
<a class="discrete-link" href="/batterytracking"><i class="fa fa-fire fa-fw"></i>&nbsp;{{ $L('Battery tracking') }}</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="disabled"><a href="#"><strong>Manage master data</strong></a></li>
<li class="disabled"><a href="#"><strong>{{ $L('Manage master data') }}</strong></a></li>
<li data-nav-for-page="products">
<a class="discrete-link" href="/products"><i class="fa fa-product-hunt fa-fw"></i>&nbsp;Products</a>
<a class="discrete-link" href="/products"><i class="fa fa-product-hunt fa-fw"></i>&nbsp;{{ $L('Products') }}</a>
</li>
<li data-nav-for-page="locations">
<a class="discrete-link" href="/locations"><i class="fa fa-map-marker fa-fw"></i>&nbsp;Locations</a>
<a class="discrete-link" href="/locations"><i class="fa fa-map-marker fa-fw"></i>&nbsp;{{ $L('Locations') }}</a>
</li>
<li data-nav-for-page="quantityunits">
<a class="discrete-link" href="/quantityunits"><i class="fa fa-balance-scale fa-fw"></i>&nbsp;Quantity units</a>
<a class="discrete-link" href="/quantityunits"><i class="fa fa-balance-scale fa-fw"></i>&nbsp;{{ $L('Quantity units') }}</a>
</li>
<li data-nav-for-page="habits">
<a class="discrete-link" href="/habits"><i class="fa fa-refresh fa-fw"></i>&nbsp;Habits</a>
<a class="discrete-link" href="/habits"><i class="fa fa-refresh fa-fw"></i>&nbsp;{{ $L('Habits') }}</a>
</li>
<li data-nav-for-page="batteries">
<a class="discrete-link" href="/batteries"><i class="fa fa-battery-three-quarters fa-fw"></i>&nbsp;Batteries</a>
<a class="discrete-link" href="/batteries"><i class="fa fa-battery-three-quarters fa-fw"></i>&nbsp;{{ $L('Batteries') }}</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a class="discrete-link logout-button" href="/logout"><i class="fa fa-sign-out fa-fw"></i>&nbsp;Logout</a>
<a class="discrete-link logout-button" href="/logout"><i class="fa fa-sign-out fa-fw"></i>&nbsp;{{ $L('Logout') }}</a>
</li>
</ul>
@@ -138,54 +140,54 @@
<ul class="nav nav-sidebar">
<li data-nav-for-page="stockoverview">
<a class="discrete-link" href="/stockoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;Stock overview</a>
<a class="discrete-link" href="/stockoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;{{ $L('Stock overview') }}</a>
</li>
<li data-nav-for-page="habitsoverview">
<a class="discrete-link" href="/habitsoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;Habits overview</a>
<a class="discrete-link" href="/habitsoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;{{ $L('Habits overview') }}</a>
</li>
<li data-nav-for-page="batteriesoverview">
<a class="discrete-link" href="/batteriesoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;Batteries overview</a>
<a class="discrete-link" href="/batteriesoverview"><i class="fa fa-tachometer fa-fw"></i>&nbsp;{{ $L('Batteries overview') }}</a>
</li>
</ul>
<ul class="nav nav-sidebar">
<li class="disabled"><a href="#"><strong>Record data</strong></a></li>
<li class="disabled"><a href="#"><strong>{{ $L('Record data') }}</strong></a></li>
<li data-nav-for-page="purchase">
<a class="discrete-link" href="/purchase"><i class="fa fa-shopping-cart fa-fw"></i>&nbsp;Purchase</a>
<a class="discrete-link" href="/purchase"><i class="fa fa-shopping-cart fa-fw"></i>&nbsp;{{ $L('Purchase') }}</a>
</li>
<li data-nav-for-page="consume">
<a class="discrete-link" href="/consume"><i class="fa fa-cutlery fa-fw"></i>&nbsp;Consume</a>
</li>
<li data-nav-for-page="inventory">
<a class="discrete-link" href="/inventory"><i class="fa fa-list fa-fw"></i>&nbsp;Inventory</a>
<a class="discrete-link" href="/consume"><i class="fa fa-cutlery fa-fw"></i>&nbsp;{{ $L('Consume') }}</a>
</li>
<li data-nav-for-page="shoppinglist">
<a class="discrete-link" href="/shoppinglist"><i class="fa fa-shopping-bag fa-fw"></i>&nbsp;Shopping list</a>
<a class="discrete-link" href="/shoppinglist"><i class="fa fa-shopping-bag fa-fw"></i>&nbsp;{{ $L('Shopping list') }}</a>
</li>
<li data-nav-for-page="inventory">
<a class="discrete-link" href="/inventory"><i class="fa fa-list fa-fw"></i>&nbsp;{{ $L('Inventory') }}</a>
</li>
<li data-nav-for-page="habittracking">
<a class="discrete-link" href="/habittracking"><i class="fa fa-play fa-fw"></i>&nbsp;Habit tracking</a>
<a class="discrete-link" href="/habittracking"><i class="fa fa-play fa-fw"></i>&nbsp;{{ $L('Habit tracking') }}</a>
</li>
<li data-nav-for-page="batterytracking">
<a class="discrete-link" href="/batterytracking"><i class="fa fa-fire fa-fw"></i>&nbsp;Battery tracking</a>
<a class="discrete-link" href="/batterytracking"><i class="fa fa-fire fa-fw"></i>&nbsp;{{ $L('Battery tracking') }}</a>
</li>
</ul>
<ul class="nav nav-sidebar">
<li class="disabled"><a href="#"><strong>Manage master data</strong></a></li>
<li class="disabled"><a href="#"><strong>{{ $L('Manage master data') }}</strong></a></li>
<li data-nav-for-page="products">
<a class="discrete-link" href="/products"><i class="fa fa-product-hunt fa-fw"></i>&nbsp;Products</a>
<a class="discrete-link" href="/products"><i class="fa fa-product-hunt fa-fw"></i>&nbsp;{{ $L('Products') }}</a>
</li>
<li data-nav-for-page="locations">
<a class="discrete-link" href="/locations"><i class="fa fa-map-marker fa-fw"></i>&nbsp;Locations</a>
<a class="discrete-link" href="/locations"><i class="fa fa-map-marker fa-fw"></i>&nbsp;{{ $L('Locations') }}</a>
</li>
<li data-nav-for-page="quantityunits">
<a class="discrete-link" href="/quantityunits"><i class="fa fa-balance-scale fa-fw"></i>&nbsp;Quantity units</a>
<a class="discrete-link" href="/quantityunits"><i class="fa fa-balance-scale fa-fw"></i>&nbsp;{{ $L('Quantity units') }}</a>
</li>
<li data-nav-for-page="habits">
<a class="discrete-link" href="/habits"><i class="fa fa-refresh fa-fw"></i>&nbsp;Habits</a>
<a class="discrete-link" href="/habits"><i class="fa fa-refresh fa-fw"></i>&nbsp;{{ $L('Habits') }}</a>
</li>
<li data-nav-for-page="batteries">
<a class="discrete-link" href="/batteries"><i class="fa fa-battery-three-quarters fa-fw"></i>&nbsp;Batteries</a>
<a class="discrete-link" href="/batteries"><i class="fa fa-battery-three-quarters fa-fw"></i>&nbsp;{{ $L('Batteries') }}</a>
</li>
</ul>
@@ -211,11 +213,14 @@
</div>
</div>
<script src="/bower_components/jquery/dist/jquery.min.js?v={{ $version }}"></script>
<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js?v={{ $version }}"></script>
<script src="/bower_components/bootbox/bootbox.js?v={{ $version }}"></script>
<script src="/bower_components/jquery.serializeJSON/jquery.serializejson.min.js?v={{ $version }}"></script>
<script src="/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js?v={{ $version }}"></script>
@if(!empty($L('bootstrap_datepicker_locale')))<script src="/bower_components/bootstrap-datepicker/dist/locales/bootstrap-datepicker.{{ $L('bootstrap_datepicker_locale') }}.min.js?v={{ $version }}"></script>@endif
<script src="/bower_components/moment/min/moment.min.js?v={{ $version }}"></script>
@if(!empty($L('moment_locale')))<script src="/bower_components/moment/locale/{{ $L('moment_locale') }}.js?v={{ $version }}"></script>@endif
<script src="/bower_components/bootstrap-validator/dist/validator.min.js?v={{ $version }}"></script>
<script src="/bower_components/bootstrap-combobox/js/bootstrap-combobox.js?v={{ $version }}"></script>
<script src="/bower_components/datatables.net/js/jquery.dataTables.min.js?v={{ $version }}"></script>
@@ -223,10 +228,13 @@
<script src="/bower_components/datatables.net-responsive/js/dataTables.responsive.min.js?v={{ $version }}"></script>
<script src="/bower_components/datatables.net-responsive-bs/js/responsive.bootstrap.min.js?v={{ $version }}"></script>
<script src="/bower_components/jquery-timeago/jquery.timeago.js?v={{ $version }}"></script>
<script src="/bower_components/jquery-timeago/locales/jquery.timeago.{{ $L('timeago_locale') }}.js?v={{ $version }}"></script>
<script src="/bower_components/toastr/toastr.min.js?v={{ $version }}"></script>
<script src="/bower_components/tagmanager/tagmanager.js?v={{ $version }}"></script>
<script src="/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js?v={{ $version }}"></script>
<script src="/js/extensions.js?v={{ $version }}"></script>
<script src="/js/grocy.js?v={{ $version }}"></script>
<script src="/viewjs/@yield('viewJsName').js"></script>
@stack('componentScripts')

View File

@@ -1,9 +1,9 @@
@extends('layout.default')
@if($mode == 'edit')
@section('title', 'Edit location')
@section('title', $L('Edit location'))
@else
@section('title', 'Create location')
@section('title', $L('Create location'))
@endif
@section('viewJsName', 'locationform')
@@ -22,17 +22,17 @@
<form id="location-form">
<div class="form-group">
<label for="name">Name</label>
<label for="name">{{ $L('Name') }}</label>
<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $location->name }}@endif">
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="description">Description</label>
<label for="description">{{ $L('Description') }}</label>
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $location->description }}@endif</textarea>
</div>
<button id="save-location-button" type="submit" class="btn btn-default">Save</button>
<button id="save-location-button" type="submit" class="btn btn-default">{{ $L('Save') }}</button>
</form>

View File

@@ -1,6 +1,6 @@
@extends('layout.default')
@section('title', 'Locations')
@section('title', $L('Locations'))
@section('activeNav', 'locations')
@section('viewJsName', 'locations')
@@ -8,9 +8,9 @@
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
<h1 class="page-header">
Locations
@yield('title')
<a class="btn btn-default" href="/location/new" role="button">
<i class="fa fa-plus"></i>&nbsp;Add
<i class="fa fa-plus"></i>&nbsp;{{ $L('Add') }}
</a>
</h1>
@@ -19,8 +19,8 @@
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Description</th>
<th>{{ $L('Name') }}</th>
<th>{{ $L('Description') }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,28 +1,28 @@
@extends('layout.default')
@section('title', 'Login')
@section('title', $L('Login'))
@section('viewJsName', 'login')
@section('content')
<div class="col-md-4 col-md-offset-5">
<h1 class="page-header text-center">Login</h1>
<h1 class="page-header text-center">@yield('title')</h1>
<form method="post" action="/login" id="login-form">
<div class="form-group">
<label for="name">Username</label>
<label for="name">{{ $L('Username') }}</label>
<input type="text" class="form-control" required id="username" name="username">
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="name">Password</label>
<label for="name">{{ $L('Password') }}</label>
<input type="password" class="form-control" required id="password" name="password">
<div id="login-error" class="help-block with-errors"></div>
</div>
<button id="login-button" type="submit" class="btn btn-default">Login</button>
<button id="login-button" type="submit" class="btn btn-default">{{ $L('OK') }}</button>
</form>

View File

@@ -1,9 +1,9 @@
@extends('layout.default')
@if($mode == 'edit')
@section('title', 'Edit product')
@section('title', $L('Edit product'))
@else
@section('title', 'Create product')
@section('title', $L('Create product'))
@endif
@section('viewJsName', 'productform')
@@ -22,24 +22,24 @@
<form id="product-form">
<div class="form-group">
<label for="name">Name</label>
<label for="name">{{ $L('Name') }}</label>
<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $product->name}}@endif">
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="description">Description</label>
<label for="description">{{ $L('Description') }}</label>
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $product->description }}@endif</textarea>
</div>
<div class="form-group tm-group">
<label for="barcode-taginput">Barcode(s)&nbsp;&nbsp;<i class="fa fa-barcode"></i></label>
<label for="barcode-taginput">{{ $L('Barcode(s)') }}&nbsp;&nbsp;<i class="fa fa-barcode"></i></label>
<input type="text" class="form-control tm-input" id="barcode-taginput">
<div id="barcode-taginput-container"></div>
</div>
<div class="form-group">
<label for="location_id">Location</label>
<label for="location_id">{{ $L('Location') }}</label>
<select required class="form-control" id="location_id" name="location_id">
@foreach($locations as $location)
<option @if($mode == 'edit' && $location->id == $product->location_id) selected="selected" @endif value="{{ $location->id }}">{{ $location->name }}</option>
@@ -49,19 +49,19 @@
</div>
<div class="form-group">
<label for="min_stock_amount">Minimum stock amount</label>
<label for="min_stock_amount">{{ $L('Minimum stock amount') }}</label>
<input required min="0" type="number" class="form-control" id="min_stock_amount" name="min_stock_amount" value="@if($mode == 'edit'){{ $product->min_stock_amount }}@else{{0}}@endif">
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="default_best_before_days">Default best before days<br><span class="small text-muted">For purchases this amount of days will be added to today for the best before date suggestion</span></label>
<label for="default_best_before_days">{{ $L('Default best before days') }}<br><span class="small text-muted">{{ $L('For purchases this amount of days will be added to today for the best before date suggestion') }}</span></label>
<input required min="0" type="number" class="form-control" id="default_best_before_days" name="default_best_before_days" value="@if($mode == 'edit'){{ $product->default_best_before_days }}@else{{0}}@endif">
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="qu_id_purchase">Quantity unit purchase</label>
<label for="qu_id_purchase">{{ $L('Quantity unit purchase') }}</label>
<select required class="form-control input-group-qu" id="qu_id_purchase" name="qu_id_purchase">
@foreach($quantityunits as $quantityunit)
<option @if($mode == 'edit' && $quantityunit->id == $product->qu_id_purchase) selected="selected" @endif value="{{ $quantityunit->id }}">{{ $quantityunit->name }}</option>
@@ -71,7 +71,7 @@
</div>
<div class="form-group">
<label for="qu_id_stock">Quantity unit stock</label>
<label for="qu_id_stock">{{ $L('Quantity unit stock') }}</label>
<select required class="form-control input-group-qu" id="qu_id_stock" name="qu_id_stock">
@foreach($quantityunits as $quantityunit)
<option @if($mode == 'edit' && $quantityunit->id == $product->qu_id_stock) selected="selected" @endif value="{{ $quantityunit->id }}">{{ $quantityunit->name }}</option>
@@ -81,14 +81,14 @@
</div>
<div class="form-group">
<label for="qu_factor_purchase_to_stock">Factor purchase to stock quantity unit</label>
<label for="qu_factor_purchase_to_stock">{{ $L('Factor purchase to stock quantity unit') }}</label>
<input required min="1" type="number" class="form-control input-group-qu" id="qu_factor_purchase_to_stock" name="qu_factor_purchase_to_stock" value="@if ($mode == 'edit'){{ $product->qu_factor_purchase_to_stock }}@else{{1}}@endif">
<div class="help-block with-errors"></div>
</div>
<p id="qu-conversion-info" class="help-block text-muted"></p>
<button id="save-product-button" type="submit" class="btn btn-default">Save</button>
<button id="save-product-button" type="submit" class="btn btn-default">{{ $L('Save') }}</button>
</form>
</div>

View File

@@ -1,6 +1,6 @@
@extends('layout.default')
@section('title', 'Products')
@section('title', $L('Products'))
@section('activeNav', 'products')
@section('viewJsName', 'products')
@@ -8,9 +8,9 @@
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
<h1 class="page-header">
Products
@yield('title')
<a class="btn btn-default" href="/product/new" role="button">
<i class="fa fa-plus"></i>&nbsp;Add
<i class="fa fa-plus"></i>&nbsp;{{ $L('Add') }}
</a>
</h1>
@@ -19,13 +19,13 @@
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Location</th>
<th>Min. stock amount</th>
<th>QU purchase</th>
<th>QU stock</th>
<th>QU factor</th>
<th>Description</th>
<th>{{ $L('Name') }}</th>
<th>{{ $L('Location') }}</th>
<th>{{ $L('Min. stock amount') }}</th>
<th>{{ $L('QU purchase') }}</th>
<th>{{ $L('QU stock') }}</th>
<th>{{ $L('QU factor') }}</th>
<th>{{ $L('Description') }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,18 +1,18 @@
@extends('layout.default')
@section('title', 'Purchase')
@section('title', $L('Purchase'))
@section('activeNav', 'purchase')
@section('viewJsName', 'purchase')
@section('content')
<div class="col-sm-4 col-sm-offset-3 col-md-3 col-md-offset-2">
<h1 class="page-header">Purchase</h1>
<h1 class="page-header">@yield('title')</h1>
<form id="purchase-form">
<div class="form-group">
<label for="product_id">Product&nbsp;&nbsp;<i class="fa fa-barcode"></i><span id="barcode-lookup-disabled-hint" class="small text-muted hide">&nbsp;&nbsp;Barcode lookup is disabled</span></label>
<label for="product_id">{{ $L('Product') }}&nbsp;&nbsp;<i class="fa fa-barcode"></i><span id="barcode-lookup-disabled-hint" class="small text-muted hide">&nbsp;&nbsp;Barcode lookup is disabled</span></label>
<select class="form-control combobox" id="product_id" name="product_id" required>
<option value=""></option>
@foreach($products as $product)
@@ -29,12 +29,12 @@
))
<div class="form-group">
<label for="amount">Amount&nbsp;&nbsp;<span id="amount_qu_unit" class="small text-muted"></span></label>
<label for="amount">{{ $L('Amount') }}&nbsp;&nbsp;<span id="amount_qu_unit" class="small text-muted"></span></label>
<input type="number" class="form-control" id="amount" name="amount" value="1" min="1" required>
<div class="help-block with-errors"></div>
</div>
<button id="save-purchase-button" type="submit" class="btn btn-default">OK</button>
<button id="save-purchase-button" type="submit" class="btn btn-default">{{ $L('OK') }}</button>
</form>

View File

@@ -1,9 +1,9 @@
@extends('layout.default')
@if($mode == 'edit')
@section('title', 'Edit quantity unit')
@section('title', $L('Edit quantity unit'))
@else
@section('title', 'Create quantity unit')
@section('title', $L('Create quantity unit'))
@endif
@section('viewJsName', 'quantityunitform')
@@ -22,17 +22,17 @@
<form id="quantityunit-form">
<div class="form-group">
<label for="name">Name</label>
<label for="name">{{ $L('Name') }}</label>
<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $quantityunit->name }}@endif">
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="description">Description</label>
<label for="description">{{ $L('Description') }}</label>
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $quantityunit->description }}@endif</textarea>
</div>
<button id="save-quantityunit-button" type="submit" class="btn btn-default">Save</button>
<button id="save-quantityunit-button" type="submit" class="btn btn-default">{{ $L('Save') }}</button>
</form>

View File

@@ -1,6 +1,6 @@
@extends('layout.default')
@section('title', 'Quantity units')
@section('title', $L('Quantity units'))
@section('activeNav', 'quantityunits')
@section('viewJsName', 'quantityunits')
@@ -8,7 +8,7 @@
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
<h1 class="page-header">
Quantity units
@yield('title')
<a class="btn btn-default" href="/quantityunit/new" role="button">
<i class="fa fa-plus"></i>&nbsp;Add
</a>
@@ -19,8 +19,8 @@
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Description</th>
<th>{{ $L('Name') }}</th>
<th>{{ $L('Description') }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,6 +1,6 @@
@extends('layout.default')
@section('title', 'Shopping list')
@section('title', $L('Shopping list'))
@section('activeNav', 'shoppinglist')
@section('viewJsName', 'shoppinglist')
@@ -8,12 +8,12 @@
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
<h1 class="page-header">
Shopping list
@yield('title')
<a class="btn btn-default" href="/shoppinglistitem/new" role="button">
<i class="fa fa-plus"></i>&nbsp;Add
<i class="fa fa-plus"></i>&nbsp;{{ $L('Add') }}
</a>
<a id="add-products-below-min-stock-amount" class="btn btn-info" href="#" role="button">
<i class="fa fa-plus"></i>&nbsp;Add products that are below defined min. stock amount
<i class="fa fa-plus"></i>&nbsp;{{ $L('Add products that are below defined min. stock amount') }}
</a>
</h1>
@@ -22,8 +22,8 @@
<thead>
<tr>
<th>#</th>
<th>Product / <em>Note</em></th>
<th>Amount</th>
<th>{{ $L('Product') }} / <em>{{ $L('Note') }}</em></th>
<th>{{ $L('Amount') }}</th>
</tr>
</thead>
<tbody>

View File

@@ -1,9 +1,9 @@
@extends('layout.default')
@if($mode == 'edit')
@section('title', 'Edit shopping list item')
@section('title', $L('Edit shopping list item'))
@else
@section('title', 'Create shopping list item')
@section('title', $L('Create shopping list item'))
@endif
@section('viewJsName', 'shoppinglistform')
@@ -22,7 +22,7 @@
<form id="shoppinglist-form">
<div class="form-group">
<label for="product_id">Product&nbsp;&nbsp;<i class="fa fa-barcode"></i></label>
<label for="product_id">{{ $L('Product') }}&nbsp;&nbsp;<i class="fa fa-barcode"></i></label>
<select class="form-control combobox" id="product_id" name="product_id" value="@if($mode == 'edit') {{ $listItem->product_id }} @endif">
<option value=""></option>
@foreach($products as $product)
@@ -33,30 +33,23 @@
</div>
<div class="form-group">
<label for="amount">Amount&nbsp;&nbsp;<span id="amount_qu_unit" class="small text-muted"></span><br><span class="small text-warning">@if($mode == 'edit' && $listItem->amount_autoadded > 0){{ $listItem->amount_autoadded }} units were automatically added and will apply in addition to the amount entered here.@endif</span></label>
<label for="amount">{{ $L('Amount') }}&nbsp;&nbsp;<span id="amount_qu_unit" class="small text-muted"></span><br><span class="small text-warning">@if($mode == 'edit' && $listItem->amount_autoadded > 0){{ $L('#1 units were automatically added and will apply in addition to the amount entered here', $listItem->amount_autoadded) }}@endif</span></label>
<input type="number" class="form-control" id="amount" name="amount" value="@if($mode == 'edit'){{ $listItem->amount }}@else{{1}}@endif" min="0" required>
<div class="help-block with-errors"></div>
</div>
<div class="form-group">
<label for="note">Note</label>
<label for="note">{{ $L('Note') }}</label>
<textarea class="form-control" rows="2" id="note" name="note">@if($mode == 'edit'){{ $listItem->note }}@endif</textarea>
</div>
<button id="save-shoppinglist-button" type="submit" class="btn btn-default">Save</button>
<button id="save-shoppinglist-button" type="submit" class="btn btn-default">{{ $L('Save') }}</button>
</form>
</div>
<div class="col-sm-6 col-md-5 col-lg-3 main well">
<h3>Product overview <strong><span id="selected-product-name"></span></strong></h3>
<h4><strong>Stock quantity unit:</strong> <span id="selected-product-stock-qu-name"></span></h4>
<p>
<strong>Stock amount:</strong> <span id="selected-product-stock-amount"></span> <span id="selected-product-stock-qu-name2"></span><br>
<strong>Last purchased:</strong> <span id="selected-product-last-purchased"></span> <time id="selected-product-last-purchased-timeago" class="timeago timeago-contextual"></time><br>
<strong>Last used:</strong> <span id="selected-product-last-used"></span> <time id="selected-product-last-used-timeago" class="timeago timeago-contextual"></time>
</p>
<div class="col-sm-6 col-md-5 col-lg-3">
@include('components.productcard')
</div>
@stop

View File

@@ -1,19 +1,19 @@
@extends('layout.default')
@section('title', 'Stock overview')
@section('title', $L('Stock overview'))
@section('activeNav', 'stockoverview')
@section('viewJsName', 'stockoverview')
@section('content')
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
<h1 class="page-header">Stock overview <span class="text-muded small"><strong>{{ count($currentStock) }}</strong> products with <strong>{{ SumArrayValue($currentStock, 'amount') }}</strong> units in stock</span></h1>
<h1 class="page-header">{{ $L('Stock overview') }} <span class="text-muded small">{{ $L('#1 products with #2 units in stock', count($currentStock), SumArrayValue($currentStock, 'amount')) }}</span></h1>
<div class="container-fluid">
<div class="row">
<p class="btn btn-lg btn-warning no-real-button"><strong>{{ count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('+5 days')), '<')) }}</strong> products expiring within the next 5 days</p>
<p class="btn btn-lg btn-danger no-real-button"><strong>{{ count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('-1 days')), '<')) }}</strong> products are already expired</p>
<p class="btn btn-lg btn-info no-real-button"><strong>{{ count($missingProducts) }}</strong> products are below defined min. stock amount</p>
<p class="btn btn-lg btn-warning no-real-button">{{ $L('#1 products expiring within the next #2 days', count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('+5 days')), '<')), 5) }}</p>
<p class="btn btn-lg btn-danger no-real-button">{{ $L('#1 products are already expired', count(FindAllObjectsInArrayByPropertyValue($currentStock, 'best_before_date', date('Y-m-d', strtotime('-1 days')), '<'))) }}</p>
<p class="btn btn-lg btn-info no-real-button">{{ $L('#1 products are below defined min. stock amount', count($missingProducts)) }}</p>
</div>
</div>
@@ -23,9 +23,9 @@
<table id="stock-overview-table" class="table table-striped">
<thead>
<tr>
<th>Product</th>
<th>Amount</th>
<th>Next best before date</th>
<th>{{ $L('Product') }}</th>
<th>{{ $L('Amount') }}</th>
<th>{{ $L('Next best before date') }}</th>
</tr>
</thead>
<tbody>