mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Added a new config option for energy unit display (closes #2109)
This commit is contained in:
@@ -95,6 +95,7 @@
|
||||
Grocy.CurrentUrlRelative = "/" + window.location.href.split('?')[0].replace(Grocy.BaseUrl, "");
|
||||
Grocy.ActiveNav = '@yield('activeNav', '')';
|
||||
Grocy.Currency = '{{ GROCY_CURRENCY }}';
|
||||
Grocy.EnergyUnit = '{{ GROCY_ENERGY_UNIT }}';
|
||||
Grocy.CalendarFirstDayOfWeek = '{{ GROCY_CALENDAR_FIRST_DAY_OF_WEEK }}';
|
||||
Grocy.CalendarShowWeekNumbers = {{ BoolToString(GROCY_CALENDAR_SHOW_WEEK_OF_YEAR) }};
|
||||
Grocy.LocalizationStrings = {!! $LocalizationStrings !!};
|
||||
|
@@ -478,7 +478,7 @@
|
||||
@php if($mode == 'edit') { $value = $product->calories; } else { $value = 0; } @endphp
|
||||
@include('components.numberpicker', array(
|
||||
'id' => 'calories',
|
||||
'label' => 'Energy (kcal)',
|
||||
'label' => 'Energy',
|
||||
'min' => '0.' . str_repeat('0', $userSettings['stock_decimal_places_amounts']),
|
||||
'decimals' => $userSettings['stock_decimal_places_amounts'],
|
||||
'value' => $value,
|
||||
|
@@ -388,7 +388,7 @@
|
||||
<div class="row ml-1">
|
||||
@if(!empty($calories) && intval($calories) > 0)
|
||||
<div class="col-4">
|
||||
<label>{{ $__t('Energy (kcal)') }}</label>
|
||||
<label>{{ GROCY_ENERGY_UNIT }}</label>
|
||||
<i class="fa-solid fa-question-circle text-muted d-print-none"
|
||||
data-toggle="tooltip"
|
||||
data-trigger="hover click"
|
||||
|
Reference in New Issue
Block a user