diff --git a/main/course_home/activity.php b/main/course_home/activity.php index 6f2b61ba29..6f5fff6f4f 100644 --- a/main/course_home/activity.php +++ b/main/course_home/activity.php @@ -114,6 +114,12 @@ if (api_is_allowed_to_edit(null, true) && !api_is_coach()) { } function return_block($title, $content) { - $html = '
'.$content.'
'; + global $app; + $rowDiv = '
'; + if ($app['full_width']) { + $rowDiv = '
'; + } + $html = $rowDiv.'
+
'.$rowDiv.$content.'
'; return $html; -} \ No newline at end of file +} diff --git a/main/css/base.css b/main/css/base.css index 3ffef7d07f..c7a75a8115 100644 --- a/main/css/base.css +++ b/main/css/base.css @@ -5276,3 +5276,8 @@ i.size-32.icon-new-work { #question_admin_form .media, #edit_question .media{ display:none; } + +.activity_content { + margin-left:120px; + +} diff --git a/main/inc/global.inc.php b/main/inc/global.inc.php index c8d55d16d6..bda1057242 100644 --- a/main/inc/global.inc.php +++ b/main/inc/global.inc.php @@ -194,6 +194,9 @@ require_once __DIR__.'/../../src/ChamiloLMS/Resources/config/dev.php'; // Classic way of render pages or the Controller approach $app['classic_layout'] = false; + +$app['full_width'] = false; + $app['breadcrumb'] = array(); // The script is allowed? This setting is modified when calling api_is_not_allowed() diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php index 35664928f4..941997483a 100644 --- a/main/inc/lib/course.lib.php +++ b/main/inc/lib/course.lib.php @@ -2519,6 +2519,12 @@ class CourseManager * @todo use Twig */ public static function course_item_html($params, $is_sub_content = false) { + global $app; + if ($app['full_width']) { + $rowDiv = '
'; + } else { + $rowDiv = '
'; + } $html = ''; $class = "well course-box"; if ($is_sub_content) { @@ -2528,9 +2534,9 @@ class CourseManager $class .= " session-item"; } $html .= '
'; - $html .= '
'; + $html .= $rowDiv; $html .= '
'; - $html .= '
'; + $html .= $rowDiv; $html .= '
'; if (!empty($params['link'])) { $html .= ''; diff --git a/main/inc/lib/course_home.lib.php b/main/inc/lib/course_home.lib.php index ba827caaf6..149ce97b9d 100644 --- a/main/inc/lib/course_home.lib.php +++ b/main/inc/lib/course_home.lib.php @@ -576,6 +576,7 @@ class CourseHome { * @return void */ public static function show_tools_category($all_tools_list, $rows = false) { + $rowDiv = '
'; $theme = api_get_setting('homepage_view'); if ($theme == 'vertical_activity') { //ordering by get_lang name @@ -698,30 +699,32 @@ class CourseHome { //$tool['link'] = htmlspecialchars($tool['link']) ; //@todo this visio stuff should be removed if (strpos($tool['name'],'visio_') !== false) { - $tool_link_params = array('id' => 'tooldesc_'.$tool["id"], - 'href' => '"javascript: void(0);"', - 'class' => $class, - 'onclick' => 'javascript: window.open(\'' . $tool['link'] . '\',\'window_visio'.$_SESSION['_cid'].'\',config=\'height=\'+730+\', width=\'+1020+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')', - 'target' => $tool['target']); + $tool_link_params = array( + 'id' => 'tooldesc_'.$tool["id"], + 'href' => '"javascript: void(0);"', + 'class' => $class, + 'onclick' => 'javascript: window.open(\'' . $tool['link'] . '\',\'window_visio'.$_SESSION['_cid'].'\',config=\'height=\'+730+\', width=\'+1020+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')', + 'target' => $tool['target']); } elseif (strpos($tool['name'], 'chat') !== false && api_get_course_setting('allow_open_chat_window')) { - $tool_link_params = array('id' => 'tooldesc_'.$tool["id"], - 'class' => $class, - 'href' => 'javascript: void(0);', - 'onclick' => 'javascript: window.open(\'' . $tool['link'] . '\',\'window_chat'.$_SESSION['_cid'].'\',config=\'height=\'+380+\', width=\'+625+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')', - 'target' => $tool['target']); + $tool_link_params = array( + 'id' => 'tooldesc_'.$tool["id"], + 'class' => $class, + 'href' => 'javascript: void(0);', + 'onclick' => 'javascript: window.open(\'' . $tool['link'] . '\',\'window_chat'.$_SESSION['_cid'].'\',config=\'height=\'+380+\', width=\'+625+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')', + 'target' => $tool['target']); } else { if (count(explode('type=classroom',$tool['link'])) == 2 || count(explode('type=conference', $tool['link'])) == 2) { - $tool_link_params = array('id' => 'tooldesc_'.$tool["id"], - 'href' => $tool['link'], - 'class' => $class, - 'target' => '_blank'); - - + $tool_link_params = array( + 'id' => 'tooldesc_'.$tool["id"], + 'href' => $tool['link'], + 'class' => $class, + 'target' => '_blank'); } else { - $tool_link_params = array('id' => 'tooldesc_'.$tool["id"], - 'href' => $tool['link'], - 'class' => $class, - 'target' => $tool['target']); + $tool_link_params = array( + 'id' => 'tooldesc_'.$tool["id"], + 'href' => $tool['link'], + 'class' => $class, + 'target' => $tool['target']); } } @@ -761,12 +764,18 @@ class CourseHome { $i = 0; $html = ''; + $counter = 0; if (!empty($items)) { foreach ($items as $item) { switch ($theme) { case 'activity_big': $data = ''; + + if ($counter == 0) { + $html .= $rowDiv; + } + $html .= '
'; $image = (substr($item['tool']['image'], 0, strpos($item['tool']['image'], '.'))).'.png'; @@ -795,14 +804,33 @@ class CourseHome { $html .= Display::div($data, array('class'=>'big_icon')); //box-image reflection $html .= Display::div('

'.$item['visibility'].$item['extra'].$item['link'].'

', array('class'=>'content')); $html .= '
'; + + if ($counter == 2) { + $html .= '
'; + $counter = -1; + } + $counter++; + break; case 'activity': - $html .= '
'; - $html .= $item['extra']; - $html .= $item['visibility']; - $html .= $item['icon']; - $html .= $item['link']; + + if ($counter == 0) { + $html .= $rowDiv; + } + + $html .= '
'; + $content = $item['extra']; + $content .= $item['visibility']; + $content .= $item['icon']; + $content .= $item['link']; + $html .= Display::div($content, array('class'=>'activity_content')); $html .= '
'; + + if ($counter == 1) { + $html .= '
'; + $counter = -1; + } + $counter++; break; case 'vertical_activity': if ($i == 0) { diff --git a/main/inc/lib/introductionSection.inc.php b/main/inc/lib/introductionSection.inc.php index f18a969569..a54df3dbc6 100644 --- a/main/inc/lib/introductionSection.inc.php +++ b/main/inc/lib/introductionSection.inc.php @@ -217,14 +217,14 @@ $introduction_section .= '
'; $introduction_section .= $thematic_description_html; $introduction_section .= '
'; -$introduction_section .= '
'; +//$introduction_section .= '
'; if ($intro_dispDefault) { $intro_content = $intro_content; if (!empty($intro_content)) { $introduction_section .= $intro_content; } } -$introduction_section .= '
'; +//$introduction_section .= '
'; if ($intro_dispCommand) { if (empty($intro_content)) { diff --git a/main/template/default/layout/main_header.tpl b/main/template/default/layout/main_header.tpl index 0921cf50a5..3b5c6749e3 100644 --- a/main/template/default/layout/main_header.tpl +++ b/main/template/default/layout/main_header.tpl @@ -42,7 +42,11 @@ {# topbar #} {% include app.template_style ~ "/layout/topbar.tpl" %} -
+ {% if app.full_width == 1 %} +
+ {% else %} +
+ {% endif %}
@@ -97,7 +101,12 @@ {{ breadcrumb }}
-
+ + {% if app.full_width == 1 %} +
+ {% else %} +
+ {% endif %} {# course navigation links/shortcuts need to be activated by the admin #} {% include app.template_style ~ "/layout/course_navigation.tpl" %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/main/template/default/layout/menu.tpl b/main/template/default/layout/menu.tpl index ca1438eac4..263fde1cda 100644 --- a/main/template/default/layout/menu.tpl +++ b/main/template/default/layout/menu.tpl @@ -2,7 +2,11 @@