|
@@ -68,6 +68,13 @@ trait CalendarHomepageItem
|
|
|
'value' => $this->config['calendarTimeFormat'],
|
|
'value' => $this->config['calendarTimeFormat'],
|
|
|
'options' => $this->timeFormatOptions()
|
|
'options' => $this->timeFormatOptions()
|
|
|
),
|
|
),
|
|
|
|
|
+ array(
|
|
|
|
|
+ 'type' => 'select',
|
|
|
|
|
+ 'name' => 'calendarLocale',
|
|
|
|
|
+ 'label' => 'Locale',
|
|
|
|
|
+ 'value' => $this->config['calendarLocale'],
|
|
|
|
|
+ 'options' => $this->calendarLocaleOptions()
|
|
|
|
|
+ ),
|
|
|
array(
|
|
array(
|
|
|
'type' => 'select',
|
|
'type' => 'select',
|
|
|
'name' => 'calendarLimit',
|
|
'name' => 'calendarLimit',
|
|
@@ -87,6 +94,12 @@ trait CalendarHomepageItem
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public function loadCalendarJS()
|
|
|
|
|
+ {
|
|
|
|
|
+ $locale = ($this->config['calendarLocale'] !== 'en') ?? false;
|
|
|
|
|
+ return ($locale) ? '<script src="plugins/bower_components/calendar/dist/lang-all.js"></script>' : '';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public function getCalendar()
|
|
public function getCalendar()
|
|
|
{
|
|
{
|
|
|
$startDate = date('Y-m-d', strtotime("-" . $this->config['calendarStart'] . " days"));
|
|
$startDate = date('Y-m-d', strtotime("-" . $this->config['calendarStart'] . " days"));
|