diff --git a/main/admin/configure_plugin.php b/main/admin/configure_plugin.php index ba2607763a..67c02658c0 100755 --- a/main/admin/configure_plugin.php +++ b/main/admin/configure_plugin.php @@ -5,7 +5,6 @@ * @author Angel Fernando Quiroz Campos * @package chamilo.admin */ -use \ChamiloSession as Session; $cidReset = true; require_once '../inc/global.inc.php'; @@ -24,10 +23,7 @@ if (!in_array($pluginName, $installedPlugins) || empty($pluginInfo)) { } global $_configuration; - -$message = ''; $content = ''; - $currentUrl = api_get_self() . "?name=$pluginName"; if (isset($pluginInfo['settings_form'])) { @@ -46,7 +42,9 @@ if (isset($pluginInfo['settings_form'])) { $content .= $form->toHtml(); } } else { - $message = Display::return_message(get_lang('NoConfigurationSettingsForThisPlugin'), 'warning'); + Display::addFlash( + Display::return_message(get_lang('NoConfigurationSettingsForThisPlugin'), 'warning') + ); } if (isset($form)) { @@ -108,8 +106,6 @@ $interbreadcrumb[] = array( ); $tpl = new Template($pluginName, true, true, false, true, false); -$tpl->assign('message', ''); $tpl->assign('content', $content); $tpl->display_one_col_template(); -Session::erase('message'); diff --git a/main/admin/skill_list.php b/main/admin/skill_list.php index 7f672cc41d..70f3aaef1e 100644 --- a/main/admin/skill_list.php +++ b/main/admin/skill_list.php @@ -1,11 +1,13 @@ * @package chamilo.admin */ -use ChamiloSession as Session; $cidReset = true; @@ -27,7 +29,7 @@ $entityManager = Database::getManager(); switch ($action) { case 'enable': $skill = $entityManager->find('ChamiloCoreBundle:Skill', $skillId); - + if (is_null($skill)) { Display::addFlash( Display::return_message( @@ -60,7 +62,7 @@ switch ($action) { break; case 'disable': $skill = $entityManager->find('ChamiloCoreBundle:Skill', $skillId); - + if (is_null($skill)) { Display::addFlash( Display::return_message( @@ -81,7 +83,7 @@ switch ($action) { $skillObj = new Skill(); $childrens = $skillObj->get_children($skill->getId()); - + foreach ($childrens as $children) { $skill = $entityManager->find( 'ChamiloCoreBundle:Skill', @@ -116,8 +118,6 @@ switch ($action) { default: $interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin')); - $message = Session::has('message') ? Session::read('message') : null; - $toolbar = Display::toolbarButton( get_lang('CreateSkill'), api_get_path(WEB_CODE_PATH) . 'admin/skill_create.php', @@ -157,7 +157,6 @@ switch ($action) { /* View */ $skill = new Skill(); $skillList = $skill->get_all(); - $extraFieldSearchTagId = isset($_REQUEST['tag_id']) ? $_REQUEST['tag_id'] : 0; if ($extraFieldSearchTagId) { @@ -173,7 +172,6 @@ switch ($action) { } $tpl = new Template(get_lang('ManageSkills')); - $tpl->assign('message', $message); $tpl->assign('skills', $skillList); $tpl->assign('current_tag_id', $extraFieldSearchTagId); $tpl->assign('tags', $tags); @@ -184,6 +182,5 @@ switch ($action) { $tpl->assign('content', $content); $tpl->display_one_col_template(); - Session::erase('message'); break; } diff --git a/main/calendar/agenda.php b/main/calendar/agenda.php index d7ebbde71c..e04564be6e 100755 --- a/main/calendar/agenda.php +++ b/main/calendar/agenda.php @@ -1,8 +1,6 @@ -"; +"; + $htmlHeadXtra[] = ''; +}); +'; $extra .= '
'; $form = new FormValidator('report', 'post', null, null, array('class' => 'form-vertical')); @@ -193,14 +191,28 @@ if ($is_allowedToEdit || $is_tutor) { // Column config // @todo fix search firstname/lastname that doesn't work. rmove search for the moment - $column_model = array( - array('name'=>'firstname', 'index'=>'firstname', 'width'=>'50', 'align'=>'left', 'search' => 'false'), - array('name'=>'lastname', 'index'=>'lastname', 'width'=>'50', 'align'=>'left', 'formatter'=>'action_formatter', 'search' => 'false'), - array('name'=>'login', 'hidden'=>'true', 'index'=>'username', 'width'=>'40', 'align'=>'left', 'search' => 'false'), - array('name'=>'group_name', 'index'=>'group_id', 'width'=>'40', 'align'=>'left', 'search' => 'false'), - array('name'=>'exe_date', 'index'=>'exe_date', 'width'=>'60', 'align'=>'left', 'search' => 'false'), - array('name'=>'score', 'index'=>'exe_result', 'width'=>'50', 'align'=>'left', 'search' => 'false'), - array('name'=>'actions', 'index'=>'actions', 'width'=>'60', 'align'=>'left', 'search' => 'false') + $column_model = array( + array('name' => 'firstname', 'index' => 'firstname', 'width' => '50', 'align' => 'left', 'search' => 'false'), + array( + 'name' => 'lastname', + 'index' => 'lastname', + 'width' => '50', + 'align' => 'left', + 'formatter' => 'action_formatter', + 'search' => 'false', + ), + array( + 'name' => 'login', + 'hidden' => 'true', + 'index' => 'username', + 'width' => '40', + 'align' => 'left', + 'search' => 'false', + ), + array('name' => 'group_name', 'index' => 'group_id', 'width' => '40', 'align' => 'left', 'search' => 'false'), + array('name' => 'exe_date', 'index' => 'exe_date', 'width' => '60', 'align' => 'left', 'search' => 'false'), + array('name' => 'score', 'index' => 'exe_result', 'width' => '50', 'align' => 'left', 'search' => 'false'), + array('name' => 'actions', 'index' => 'actions', 'width' => '60', 'align' => 'left', 'search' => 'false'), ); $action_links = ' @@ -223,10 +235,10 @@ if ($is_allowedToEdit || $is_tutor) { //Column config // @todo fix search firstname/lastname that doesn't work. rmove search for the moment - $column_model = array( - array('name'=>'exe_date', 'index'=>'exe_date', 'width'=>'60', 'align'=>'left', 'search' => 'false'), - array('name'=>'score', 'index'=>'exe_result', 'width'=>'50', 'align'=>'left', 'search' => 'false'), - array('name'=>'actions', 'index'=>'actions', 'width'=>'60', 'align'=>'left', 'search' => 'false') + $column_model = array( + array('name' => 'exe_date', 'index' => 'exe_date', 'width' => '60', 'align' => 'left', 'search' => 'false'), + array('name' => 'score', 'index' => 'exe_result', 'width' => '50', 'align' => 'left', 'search' => 'false'), + array('name' => 'actions', 'index' => 'actions', 'width' => '60', 'align' => 'left', 'search' => 'false'), ); } @@ -313,8 +325,5 @@ $(function() { type, + api_get_self().'?action=importical&type='.$this->type, array('enctype' => 'multipart/form-data') ); $form->addElement('header', get_lang('ICalFileImport')); diff --git a/main/inc/lib/api.lib.php b/main/inc/lib/api.lib.php index 6ad7880d5e..93fc3aa668 100644 --- a/main/inc/lib/api.lib.php +++ b/main/inc/lib/api.lib.php @@ -2921,7 +2921,6 @@ function api_display_tool_view_option() { $sourceurl = api_get_self().'?'.api_get_cidreq(); } else { $sourceurl = $_SERVER['REQUEST_URI']; - //$sourceurl = str_replace('&', '&', $sourceurl); } } diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 1883bb90e0..d55b67d96b 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -66,6 +66,7 @@ class Display self::$global_template = new Template($tool_name, $showHeader, $showHeader); + // Fixing tools with any help it takes xxx part of main/xxx/index.php if (empty($help)) { $currentURL = api_get_self(); @@ -84,13 +85,13 @@ class Display } self::$global_template->setHelp($help); - if (!empty(self::$preview_style)) { self::$global_template->preview_theme = self::$preview_style; self::$global_template->setCssFiles(); self::$global_template->set_js_files(); self::$global_template->setCssCustomFiles(); } + if (!empty($page_header)) { self::$global_template->assign('header', $page_header); } diff --git a/main/template/default/layout/show_header.tpl b/main/template/default/layout/show_header.tpl index 717f4b7fcf..01bff4126c 100755 --- a/main/template/default/layout/show_header.tpl +++ b/main/template/default/layout/show_header.tpl @@ -12,7 +12,7 @@ {% if show_header == true %} -
+
{% if displayCookieUsageWarning == true %}