From d702205891e8bc14a7be73d40324febc3ce030ee Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Fri, 4 Aug 2017 15:11:48 +0200 Subject: [PATCH] Fix wrong use of templates, avoid mix use of template and display::header --- main/admin/career_dashboard.php | 4 - .../default/admin/career_dashboard.tpl | 99 ++++++++++--------- 2 files changed, 50 insertions(+), 53 deletions(-) diff --git a/main/admin/career_dashboard.php b/main/admin/career_dashboard.php index 4fa391d29f..c78169aebd 100755 --- a/main/admin/career_dashboard.php +++ b/main/admin/career_dashboard.php @@ -28,8 +28,6 @@ $interbreadcrumb[] = array( ); $tpl = new Template(get_lang('CareersAndPromotions')); -Display :: display_header(null); - $html = null; $form = new FormValidator('filter_form', 'GET', api_get_self()); @@ -150,5 +148,3 @@ $tpl->assign('form_filter', $html); $tpl->assign('data', $careers); $layout = $tpl->get_template('admin/career_dashboard.tpl'); $tpl->display($layout); - -Display::display_footer(); diff --git a/main/template/default/admin/career_dashboard.tpl b/main/template/default/admin/career_dashboard.tpl index c382da7db3..35b822bf9e 100644 --- a/main/template/default/admin/career_dashboard.tpl +++ b/main/template/default/admin/career_dashboard.tpl @@ -1,60 +1,61 @@ +{% extends template ~ "/layout/layout_1_col.tpl" %} -{{ actions }} +{% block content %} + {{ form_filter }} -{{ form_filter }} - -{% for item in data %} -
- -
- {{ item.description }} - - - - - - - {% for promotions in item.career %} - {% for prom in promotions %} - {% set line = prom.sessions|length + 1 %} - - - - {% if line == 1 %} - - {% endif %} - - {% for session in prom.sessions %} - {% set sessionid = session.data.id %} + {% for item in data %} +
+ +
+ {{ item.description }} +
{{ 'Promotions' | get_lang }}{{ 'StudyCycle' | get_lang }} {{ 'Courses' | get_lang }}
-

- - {{ prom.name }} - -

-
  
+ + + + + + {% for promotions in item.career %} + {% for prom in promotions %} + {% set line = prom.sessions|length + 1 %} - - + {% if line == 1 %} + + {% endif %} + {% for session in prom.sessions %} + {% set sessionid = session.data.id %} + + + + + {% endfor %} {% endfor %} {% endfor %} - {% endfor %} -
{{ 'Promotions' | get_lang }}{{ 'StudyCycle' | get_lang }} {{ 'Courses' | get_lang }}
-

- - {{ session.data.name }} + +

+

+ + {{ prom.name }}

- -   
+

+ + {{ session.data.name }} + +

+
+ +
+ +
- -{% endfor %} + {% endfor %} +{% endblock %}