Calendar V3
This commit is contained in:
@@ -37,21 +37,25 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
|
||||
'calendar_general_username',
|
||||
'calendar_general_password',
|
||||
'calendar_general_color',
|
||||
'calendar_general_display',
|
||||
'calendar_maintenance_file',
|
||||
'calendar_maintenance_caldav_url',
|
||||
'calendar_maintenance_username',
|
||||
'calendar_maintenance_password',
|
||||
'calendar_maintenance_color',
|
||||
'calendar_maintenance_display',
|
||||
'calendar_slot3_file',
|
||||
'calendar_slot3_caldav_url',
|
||||
'calendar_slot3_username',
|
||||
'calendar_slot3_password',
|
||||
'calendar_slot3_color',
|
||||
'calendar_slot3_display',
|
||||
'calendar_slot4_file',
|
||||
'calendar_slot4_caldav_url',
|
||||
'calendar_slot4_username',
|
||||
'calendar_slot4_password',
|
||||
'calendar_slot4_color',
|
||||
'calendar_slot4_display',
|
||||
'pagelink_search_depth',
|
||||
];
|
||||
|
||||
@@ -119,6 +123,7 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
|
||||
$newConf['calendar_' . $slot . '_username'] = trim($INPUT->str('calendar_' . $slot . '_username'));
|
||||
$newConf['calendar_' . $slot . '_password'] = trim($INPUT->str('calendar_' . $slot . '_password'));
|
||||
$newConf['calendar_' . $slot . '_color'] = trim($INPUT->str('calendar_' . $slot . '_color'));
|
||||
$newConf['calendar_' . $slot . '_display'] = trim($INPUT->str('calendar_' . $slot . '_display'));
|
||||
}
|
||||
|
||||
$depth = (int)$INPUT->int('pagelink_search_depth');
|
||||
@@ -274,6 +279,13 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
|
||||
'slot3' => 'Slot 3',
|
||||
'slot4' => 'Slot 4',
|
||||
];
|
||||
$displayOptions = [
|
||||
'none' => (string)$this->getLang('calendar_slot_display_none'),
|
||||
'top-left' => (string)$this->getLang('calendar_slot_display_top_left'),
|
||||
'top-right' => (string)$this->getLang('calendar_slot_display_top_right'),
|
||||
'bottom-left' => (string)$this->getLang('calendar_slot_display_bottom_left'),
|
||||
'bottom-right' => (string)$this->getLang('calendar_slot_display_bottom_right'),
|
||||
];
|
||||
foreach ($this->calendarSlotKeys as $slot) {
|
||||
echo '<h2>' . hsc($this->getLang('calendar_slot_heading') . ': ' . $slotLabels[$slot]) . '</h2>';
|
||||
|
||||
@@ -298,6 +310,18 @@ class admin_plugin_luxtools_main extends DokuWiki_Admin_Plugin
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('calendar_slot_color')) . '</span> ';
|
||||
echo '<input type="color" name="' . hsc($prefix . 'color') . '" value="' . hsc((string)$this->getConf($prefix . 'color') ?: '#999999') . '" />';
|
||||
echo '</label><br />';
|
||||
|
||||
$currentDisplay = (string)$this->getConf($prefix . 'display');
|
||||
if ($currentDisplay === '') $currentDisplay = 'none';
|
||||
echo '<label class="block"><span>' . hsc($this->getLang('calendar_slot_display')) . '</span> ';
|
||||
echo '<select name="' . hsc($prefix . 'display') . '" class="edit">';
|
||||
foreach ($displayOptions as $value => $label) {
|
||||
if ($label === '') $label = $value;
|
||||
$selected = ($currentDisplay === $value) ? ' selected="selected"' : '';
|
||||
echo '<option value="' . hsc($value) . '"' . $selected . '>' . hsc($label) . '</option>';
|
||||
}
|
||||
echo '</select>';
|
||||
echo '</label><br />';
|
||||
}
|
||||
|
||||
// CalDAV Sync button (outside the save form, separate action)
|
||||
|
||||
Reference in New Issue
Block a user