mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
Make it configurable if calendars shows week numbers or not (closes #333)
This commit is contained in:
parent
ca470ed4ee
commit
ce12202c86
@ -38,6 +38,7 @@
|
||||
- Fixed that the Userfield type "Preset list" had always the caption "Product group" instead of the configured one (thanks @oncleben31)
|
||||
|
||||
### General improvements/fixes
|
||||
- Added a new `config.php` setting `CALENDAR_SHOW_WEEK_OF_YEAR` to configure if calendars should show week numbers (defaults to `true`)
|
||||
- Improved the handling which entry page to use with disabled feature flags (thanks @nielstholenaar)
|
||||
- Boolean settings provided via environment variables (so the strings `true` and `false`) are now parsed correctly (thanks @mduret)
|
||||
- All uploaded pictures (currently for products and recipes) are now automatically downscaled to the appropriate size when serving them to improve page load times
|
||||
|
@ -26,6 +26,9 @@ Setting('CULTURE', 'en');
|
||||
# Needs to be a number where Sunday = 0, Monday = 1 and so forth
|
||||
Setting('CALENDAR_FIRST_DAY_OF_WEEK', '');
|
||||
|
||||
# If calendars should show week numbers
|
||||
Setting('CALENDAR_SHOW_WEEK_OF_YEAR', true);
|
||||
|
||||
# To keep it simple: grocy does not handle any currency conversions,
|
||||
# this here is used to format all money values,
|
||||
# so doesn't matter really matter, but should be the
|
||||
|
@ -11,7 +11,7 @@ $("#calendar").fullCalendar({
|
||||
"center": "title",
|
||||
"right": "prev,next"
|
||||
},
|
||||
"weekNumbers": true,
|
||||
"weekNumbers": Grocy.CalendarShowWeekNumbers,
|
||||
"firstDay": firstDay,
|
||||
"eventLimit": true,
|
||||
"eventSources": fullcalendarEventSources
|
||||
|
@ -84,7 +84,7 @@ Grocy.Components.DateTimePicker.Init = function()
|
||||
showToday: true,
|
||||
showClose: true
|
||||
},
|
||||
calendarWeeks: true,
|
||||
calendarWeeks: Grocy.CalendarShowWeekNumbers,
|
||||
maxDate: limitDate,
|
||||
locale: moment.locale(),
|
||||
defaultDate: startDate,
|
||||
|
@ -55,6 +55,7 @@
|
||||
Grocy.Culture = '{{ GROCY_CULTURE }}';
|
||||
Grocy.Currency = '{{ GROCY_CURRENCY }}';
|
||||
Grocy.CalendarFirstDayOfWeek = '{{ GROCY_CALENDAR_FIRST_DAY_OF_WEEK }}';
|
||||
Grocy.CalendarShowWeekNumbers = {{ BoolToString(GROCY_CALENDAR_SHOW_WEEK_OF_YEAR) }};
|
||||
Grocy.GettextPo = {!! $GettextPo !!};
|
||||
Grocy.UserSettings = {!! json_encode($userSettings) !!};
|
||||
Grocy.FeatureFlags = {!! json_encode($featureFlags) !!};
|
||||
|
Loading…
x
Reference in New Issue
Block a user