mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +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)
|
- Fixed that the Userfield type "Preset list" had always the caption "Product group" instead of the configured one (thanks @oncleben31)
|
||||||
|
|
||||||
### General improvements/fixes
|
### 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)
|
- 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)
|
- 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
|
- 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
|
# Needs to be a number where Sunday = 0, Monday = 1 and so forth
|
||||||
Setting('CALENDAR_FIRST_DAY_OF_WEEK', '');
|
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,
|
# To keep it simple: grocy does not handle any currency conversions,
|
||||||
# this here is used to format all money values,
|
# this here is used to format all money values,
|
||||||
# so doesn't matter really matter, but should be the
|
# so doesn't matter really matter, but should be the
|
||||||
|
@ -11,7 +11,7 @@ $("#calendar").fullCalendar({
|
|||||||
"center": "title",
|
"center": "title",
|
||||||
"right": "prev,next"
|
"right": "prev,next"
|
||||||
},
|
},
|
||||||
"weekNumbers": true,
|
"weekNumbers": Grocy.CalendarShowWeekNumbers,
|
||||||
"firstDay": firstDay,
|
"firstDay": firstDay,
|
||||||
"eventLimit": true,
|
"eventLimit": true,
|
||||||
"eventSources": fullcalendarEventSources
|
"eventSources": fullcalendarEventSources
|
||||||
|
@ -84,7 +84,7 @@ Grocy.Components.DateTimePicker.Init = function()
|
|||||||
showToday: true,
|
showToday: true,
|
||||||
showClose: true
|
showClose: true
|
||||||
},
|
},
|
||||||
calendarWeeks: true,
|
calendarWeeks: Grocy.CalendarShowWeekNumbers,
|
||||||
maxDate: limitDate,
|
maxDate: limitDate,
|
||||||
locale: moment.locale(),
|
locale: moment.locale(),
|
||||||
defaultDate: startDate,
|
defaultDate: startDate,
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
Grocy.Culture = '{{ GROCY_CULTURE }}';
|
Grocy.Culture = '{{ GROCY_CULTURE }}';
|
||||||
Grocy.Currency = '{{ GROCY_CURRENCY }}';
|
Grocy.Currency = '{{ GROCY_CURRENCY }}';
|
||||||
Grocy.CalendarFirstDayOfWeek = '{{ GROCY_CALENDAR_FIRST_DAY_OF_WEEK }}';
|
Grocy.CalendarFirstDayOfWeek = '{{ GROCY_CALENDAR_FIRST_DAY_OF_WEEK }}';
|
||||||
|
Grocy.CalendarShowWeekNumbers = {{ BoolToString(GROCY_CALENDAR_SHOW_WEEK_OF_YEAR) }};
|
||||||
Grocy.GettextPo = {!! $GettextPo !!};
|
Grocy.GettextPo = {!! $GettextPo !!};
|
||||||
Grocy.UserSettings = {!! json_encode($userSettings) !!};
|
Grocy.UserSettings = {!! json_encode($userSettings) !!};
|
||||||
Grocy.FeatureFlags = {!! json_encode($featureFlags) !!};
|
Grocy.FeatureFlags = {!! json_encode($featureFlags) !!};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user