Improve UI (breadcrumb, page title)

pull/2487/head
jmontoyaa 9 years ago
parent c56513c41b
commit a3b5dfd40f
  1. 8
      main/admin/gradebook_dependency.php
  2. 16
      main/admin/gradebook_list.php
  3. 8
      main/template/default/admin/gradebook_dependency.tpl

@ -35,7 +35,12 @@ $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
$currentUrl = api_get_self().'?';
$table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY);
$tpl = new Template(get_lang('Gradebook'));
$interbreadcrumb[] = array(
'url' => api_get_path(WEB_CODE_PATH).'admin/gradebook_list.php',
'name' => get_lang('Gradebook')
);
$tpl = new Template(get_lang('CourseList'));
$toolbar = Display::url(
Display::return_icon('back.png', get_lang('Add'), [], ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'admin/gradebook_list.php'
@ -89,6 +94,7 @@ $tpl->assign(
)
);
$tpl->assign('gradebook_category', $category);
$tpl->assign('courses', $courseList);
$layout = $tpl->get_template('admin/gradebook_dependency.tpl');
$tpl->display($layout);

@ -44,7 +44,20 @@ $toolbar = Display::url(
$currentUrl.'&action=add'
);
$tpl = new Template(get_lang('Gradebook'));
$toolName = get_lang('Gradebook');
switch ($action) {
case 'add':
case 'edit':
$interbreadcrumb[] = array(
'url' => $currentUrl,
'name' => get_lang('Gradebook')
);
$toolName = get_lang(ucfirst($action));
break;
}
$tpl = new Template($toolName);
switch ($action) {
case 'add':
@ -236,7 +249,6 @@ switch ($action) {
// pagination.tpl needs current_url with out "page" param
$pagination->setCustomParameters(['current_url' => $currentUrl]);
$pagination->renderer = function ($data) use ($tpl) {
foreach ($data as $key => $value) {
$tpl->assign($key, $value);

@ -1,10 +1,14 @@
{% extends template ~ "/layout/layout_1_col.tpl" %}
{% block content %}
<h3>
{{ gradebook_category.name }} ({{ gradebook_category.courseCode }})
</h3>
<hr>
{% for course in courses %}
<h3>
<h4>
{{ course.title }} ({{ course.code }})
</h3>
</h4>
{% if course.users %}
<table class="table">

Loading…
Cancel
Save