From aa9d72f9c505ee6ec756ff6c62aa8bd498a5fc81 Mon Sep 17 00:00:00 2001 From: Alex Aragon Date: Mon, 12 Jun 2017 18:59:52 -0500 Subject: [PATCH 1/3] lessons with accordion mode category - refs BT#12880 --- app/Resources/public/css/base.css | 12 ++ main/template/default/learnpath/list.tpl | 172 ++++++++++++++++++++++- 2 files changed, 181 insertions(+), 3 deletions(-) diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index e70870d7ce..185abbe3db 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -6239,6 +6239,18 @@ ul#toolnavbox-two li a.btn{ input[type=checkbox]{ margin: 8px 0 0; } +.lp-accordeon .panel-heading .panel-title{ + width: 100%; + display: inline-block; +} +.lp-accordeon .panel-heading .panel-title a{ + width: 100%; + display: block; +} +.lp-accordeon .panel-heading .tools-actions{ + position: relative; + top: -30px; +} /* CSS NEW TOP ******************************************************************************/ /* CSS Responsive */ @media (min-width: 1025px) and (max-width: 1200px) { diff --git a/main/template/default/learnpath/list.tpl b/main/template/default/learnpath/list.tpl index cfa5872e53..390c270307 100644 --- a/main/template/default/learnpath/list.tpl +++ b/main/template/default/learnpath/list.tpl @@ -10,15 +10,20 @@ {{ introduction_section }} +{% set configuration = 'lp_category_accordeon'|api_get_configuration_value %} + {% for lp_data in data %} {% set show_category = true %} {% if filtered_category and filtered_category != lp_data.category.id %} {% set show_category = false %} {% endif %} - + {% if show_category %} + {% if configuration == 0 %} + {% if categories|length > 1 and lp_data.category.id %} + {% if is_allowed_to_edit %} {% endif %} + {% endif %} {% if lp_data.lp_list %} @@ -165,7 +171,167 @@ {% endif %} - {% endif %} + + {% else %} + +
+
+ +
+
+ {% if lp_data.lp_list %} +
+ + + + + {% if is_allowed_to_edit %} + + + + + {% else %} + {% if not is_invitee %} + + {% endif %} + + + {% endif %} + + + + {% for row in lp_data.lp_list %} + + + {% if is_allowed_to_edit %} + + + + {% else %} + {% if not is_invitee %} + + {% endif %} + {% endif %} + + + + {% endfor %} + +
{{ "Title"|get_lang }}{{ "PublicationDate"|get_lang }}{{ "ExpirationDate"|get_lang }}{{ "Progress"|get_lang }}{{ "AuthoringOptions"|get_lang }}{{ "Progress"|get_lang }}{{ "Actions"|get_lang }}
+ {{ row.learnpath_icon }} + + {{ row.title }} + {{ row.session_image }} + {{ row.extra }} + + + {% if row.start_time %} + {{ row.start_time }} + {% endif %} + + {{ row.end_time }} + + {{ row.dsp_progress }} + + {{ row.dsp_progress }} + + {{ row.action_build }} + {{ row.action_edit }} + {{ row.action_visible }} + {{ row.action_tracking }} + {{ row.action_publish }} + {{ row.action_subscribe_users }} + {{ row.action_serious_game }} + {{ row.action_reinit }} + {{ row.action_default_view }} + {{ row.action_debug }} + {{ row.action_export }} + {{ row.action_copy }} + {{ row.action_auto_launch }} + {{ row.action_pdf }} + {{ row.action_delete }} + {{ row.action_order }} +
+
+ {% endif %} +
+
+
+
+ + {% endif %} + {% endif %} {% endfor %} {% if is_allowed_to_edit and not lp_is_shown %} @@ -178,4 +344,4 @@ -{% endif %} +{% endif %} \ No newline at end of file From baf6811153642fe5a883e1c6076df5be4bce2680 Mon Sep 17 00:00:00 2001 From: Alex Aragon Date: Mon, 12 Jun 2017 19:09:50 -0500 Subject: [PATCH 2/3] lessons with accordion mode category - refs BT#12880 --- main/template/default/learnpath/list.tpl | 377 ++++++++++++++--------- 1 file changed, 228 insertions(+), 149 deletions(-) diff --git a/main/template/default/learnpath/list.tpl b/main/template/default/learnpath/list.tpl index 390c270307..154727d5de 100644 --- a/main/template/default/learnpath/list.tpl +++ b/main/template/default/learnpath/list.tpl @@ -11,7 +11,7 @@ {{ introduction_section }} {% set configuration = 'lp_category_accordeon'|api_get_configuration_value %} - +
{% for lp_data in data %} {% set show_category = true %} @@ -173,167 +173,246 @@ {% endif %} {% else %} - -
-
- -
- + {% endif %} {% endif %} {% endfor %} - +
{% if is_allowed_to_edit and not lp_is_shown %}

{{ "LearningPaths"|get_lang }}

From 4010a60aeb45da2ca52c486b83c78802d8c7f933 Mon Sep 17 00:00:00 2001 From: Alex Aragon Date: Mon, 12 Jun 2017 19:13:29 -0500 Subject: [PATCH 3/3] lessons with accordion mode category - refs BT#12880 --- app/Resources/public/css/base.css | 6 +++--- main/install/configuration.dist.php | 3 ++- main/template/default/learnpath/list.tpl | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 185abbe3db..8afd5e7610 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -6239,15 +6239,15 @@ ul#toolnavbox-two li a.btn{ input[type=checkbox]{ margin: 8px 0 0; } -.lp-accordeon .panel-heading .panel-title{ +.lp-accordion .panel-heading .panel-title{ width: 100%; display: inline-block; } -.lp-accordeon .panel-heading .panel-title a{ +.lp-accordion .panel-heading .panel-title a{ width: 100%; display: block; } -.lp-accordeon .panel-heading .tools-actions{ +.lp-accordion .panel-heading .tools-actions{ position: relative; top: -30px; } diff --git a/main/install/configuration.dist.php b/main/install/configuration.dist.php index 214605bc9b..711e66b5c2 100755 --- a/main/install/configuration.dist.php +++ b/main/install/configuration.dist.php @@ -394,7 +394,8 @@ $_configuration['agenda_legend'] = [ //$_configuration['tracking_skip_generic_data'] = false; // Show question feedback (requires DB change: "ALTER TABLE c_quiz_question ADD COLUMN feedback text;") //$_configuration['allow_quiz_question_feedback'] = false; - +// Show view accordion lp_category +//$_configuration['lp_category_accordion'] = false; // HTTP headers security // This section relates to options to increase the security of your Chamilo // portal against attacks specifically focused on HTTP headers vulnerabilities diff --git a/main/template/default/learnpath/list.tpl b/main/template/default/learnpath/list.tpl index 154727d5de..d17fcbcb8d 100644 --- a/main/template/default/learnpath/list.tpl +++ b/main/template/default/learnpath/list.tpl @@ -10,8 +10,8 @@ {{ introduction_section }} -{% set configuration = 'lp_category_accordeon'|api_get_configuration_value %} -
+{% set configuration = 'lp_category_accordion'|api_get_configuration_value %} +
{% for lp_data in data %} {% set show_category = true %}