From 49b2199874e11885b8b1cc456af7ceba86d36b5a Mon Sep 17 00:00:00 2001 From: aragonc Date: Thu, 3 Sep 2015 15:59:15 -0500 Subject: [PATCH] fix input select and actions bar agenda CT#7539 --- app/Resources/public/css/base.css | 3 +++ main/calendar/agenda_js.php | 2 +- main/inc/lib/agenda.lib.php | 32 ++++++++++++-------------- main/template/default/agenda/month.tpl | 1 + 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 237da3bfdb..df897455a1 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -6220,6 +6220,9 @@ div#chat-remote-video video { text-align: left; padding-left: 15px; } +#toolbar-agenda .show-tick{ + width: 420px; +} .tab-wrapper .tab-content{ padding: 25px; } diff --git a/main/calendar/agenda_js.php b/main/calendar/agenda_js.php index fc32d7d91e..e56828336a 100755 --- a/main/calendar/agenda_js.php +++ b/main/calendar/agenda_js.php @@ -155,7 +155,7 @@ $tpl->assign( $actions = $agenda->displayActions('calendar', $userId); -$tpl->assign('actions', $actions); +$tpl->assign('toolbar', $actions); // Calendar Type : course, admin, personal $tpl->assign('type', $type); diff --git a/main/inc/lib/agenda.lib.php b/main/inc/lib/agenda.lib.php index dec03bcb94..ae7bb860db 100644 --- a/main/inc/lib/agenda.lib.php +++ b/main/inc/lib/agenda.lib.php @@ -2461,8 +2461,8 @@ class Agenda { $courseInfo = api_get_course_info(); - $toolbar = ''; - $toolbar .= "". + $actionsLeft = ''; + $actionsLeft .= "". Display::return_icon('calendar.png', get_lang('Calendar'), '', ICON_SIZE_MEDIUM).""; $courseCondition = ''; @@ -2470,7 +2470,7 @@ class Agenda $courseCondition = api_get_cidreq(); } - $toolbar .= "". + $actionsLeft .= "". Display::return_icon('week.png', get_lang('AgendaList'), '', ICON_SIZE_MEDIUM).""; $form = ''; @@ -2480,9 +2480,9 @@ class Agenda GroupManager::user_has_access(api_get_user_id(), api_get_group_id(), GroupManager::GROUP_TOOL_CALENDAR) && GroupManager::is_tutor_of_group(api_get_user_id(), api_get_group_id()) ) { - $toolbar .= "". + $actionsLeft .= "". Display::return_icon('new_event.png', get_lang('AgendaAdd'), '', ICON_SIZE_MEDIUM).""; - $toolbar .= "". + $actionsLeft .= "". Display::return_icon('import_calendar.png', get_lang('ICalFileImport'), '', ICON_SIZE_MEDIUM).""; if ($this->type == 'course') { @@ -2537,27 +2537,25 @@ class Agenda 'session_id', get_lang('Session'), $sessions, - ['id' => 'session_id'] + ['id' => 'session_id', 'onchange' => 'submit();'] ); - $form->addButtonFilter(get_lang('Filter')); + //$form->addButtonFilter(get_lang('Filter')); + //$renderer = $form->defaultRenderer(); + //$renderer->setCustomElementTemplate('
{element}
'); + $form->addButtonReset(get_lang('Reset')); $form = $form->returnForm(); } } } - $actions = '
'; - $actions .= '
'; + if ($view == 'calendar') { - $actions .= $form; + $actionsRigth .= $form; } - $actions .= '
'; - $actions .= '
'; - $actions .= $toolbar; - $actions .= '
'; - $actions .= '
'; - - return $actions; + + $toolbar = Display::toolbarAction('toolbar-agenda', array( 0 => $actionsLeft, 1 => $actionsRigth), 2, false); + return $toolbar; } /** diff --git a/main/template/default/agenda/month.tpl b/main/template/default/agenda/month.tpl index 02494d1a13..221b4875ab 100755 --- a/main/template/default/agenda/month.tpl +++ b/main/template/default/agenda/month.tpl @@ -533,6 +533,7 @@ $(document).ready(function() { }); {{ actions_div }} +{{ toolbar }}