From bcfa72ed310f05dc9a5fca9e724c07b7216aa7fd Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 27 Nov 2015 22:45:28 +0100 Subject: move events tools to aside widget --- include/widgets.php | 16 +++++++++++++++- view/css/mod_events.css | 18 ++++++++++++++++++ view/pdl/mod_events.pdl | 1 + view/tpl/events-js.tpl | 16 ---------------- view/tpl/events_side.tpl | 8 -------- 5 files changed, 34 insertions(+), 25 deletions(-) delete mode 100755 view/tpl/events_side.tpl diff --git a/include/widgets.php b/include/widgets.php index a3f7444ec..d4f3d32e1 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -666,7 +666,7 @@ function widget_eventsmenu($arr) { if (! local_channel()) return; - return replace_macros(get_markup_template('events_side.tpl'), array( + return replace_macros(get_markup_template('events_menu_side.tpl'), array( '$title' => t('Events Menu'), '$day' => t('Day View'), '$week' => t('Week View'), @@ -677,6 +677,18 @@ function widget_eventsmenu($arr) { )); } +function widget_eventstools($arr) { + if (! local_channel()) + return; + + return replace_macros(get_markup_template('events_tools_side.tpl'), array( + '$title' => t('Events Tools'), + '$export' => t('Export Calendar'), + '$import' => t('Import Calendar'), + '$submit' => t('Submit') + )); +} + function widget_design_tools($arr) { $a = get_app(); @@ -1147,6 +1159,8 @@ function widget_forums($arr) { function widget_tasklist($arr) { + if (! local_channel()) + return; require_once('include/event.php'); $o .= ''; diff --git a/view/css/mod_events.css b/view/css/mod_events.css index dd1b8afd4..dc1dc902f 100644 --- a/view/css/mod_events.css +++ b/view/css/mod_events.css @@ -4,6 +4,16 @@ margin-bottom: -1px; } +.fc-unthemed th, +.fc-unthemed td, +.fc-unthemed thead, +.fc-unthemed tbody, +.fc-unthemed .fc-divider, +.fc-unthemed .fc-row, +.fc-unthemed .fc-popover { + border-color: #ccc !important; +} + #events-spinner .spinner { margin-top: 9px; margin-bottom: -9px; @@ -32,3 +42,11 @@ .event-description { margin-top: 10px; } + +#event-upload-form { + margin-top: 10px; +} + +#event-upload-choose { + width: 100%; +} diff --git a/view/pdl/mod_events.pdl b/view/pdl/mod_events.pdl index 5a71d88d9..a3bc0c019 100644 --- a/view/pdl/mod_events.pdl +++ b/view/pdl/mod_events.pdl @@ -1,4 +1,5 @@ [region=aside] [widget=eventsmenu][/widget] +[widget=eventstools][/widget] [widget=tasklist][/widget] [/region] diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index 2b6170ff4..08c8aa64a 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -1,10 +1,7 @@
- - -
@@ -17,19 +14,6 @@ -
diff --git a/view/tpl/events_side.tpl b/view/tpl/events_side.tpl deleted file mode 100755 index b9a9062b1..000000000 --- a/view/tpl/events_side.tpl +++ /dev/null @@ -1,8 +0,0 @@ -
-

{{$title}}

- -
-- cgit v1.2.3