Minor - format code.

pull/2487/head
jmontoyaa 8 years ago
parent 90c3827792
commit e6a5928ac4
  1. 7
      main/admin/course_list.php
  2. 5
      main/admin/skill_badge_list.php
  3. 19
      main/admin/skill_level.php
  4. 6
      main/admin/user_list.php

@ -149,7 +149,12 @@ function get_course_data($from, $number_of_items, $column, $direction)
while ($course = Database::fetch_array($res)) {
// Place colour icons in front of courses.
$show_visual_code = $course['visual_code'] != $course[2] ? Display::label($course['visual_code'], 'info') : null;
$course[1] = get_course_visibility_icon($course[8]).'<a href="'.api_get_path(WEB_COURSE_PATH).$course[9].'/index.php">'.$course[1].'</a> '.$show_visual_code;
$course[1] = get_course_visibility_icon($course[8]).
'<a href="'.api_get_path(WEB_COURSE_PATH).$course[9].'/index.php">'.
Security::remove_XSS($course[1]).
'</a> '.
$show_visual_code
;
$course[5] = $course[5] == SUBSCRIBE_ALLOWED ? get_lang('Yes') : get_lang('No');
$course[6] = $course[6] == UNSUBSCRIBE_ALLOWED ? get_lang('Yes') : get_lang('No');
$language = isset($languages[$course[3]]) ? $languages[$course[3]] : $course[3];

@ -43,10 +43,11 @@ $toolbar = Display::url(
'list_badges.png',
get_lang('ManageSkills'),
null,
ICON_SIZE_MEDIUM),
ICON_SIZE_MEDIUM
),
api_get_path(WEB_CODE_PATH).'admin/skill_list.php',
['title' => get_lang('ManageSkills')]
);
);
$tpl = new Template(get_lang('Skills'));
$tpl->assign('errorMessage', $errorMessage);

@ -73,17 +73,17 @@ switch ($action) {
header('Location: '.$listAction);
exit;
}
$toolbarAction = Display::url(
Display::return_icon(
'list_badges.png',
get_lang('List'),
null,
ICON_SIZE_MEDIUM
),
),
$listAction,
['title' => get_lang('List')]
);
);
break;
case 'edit':
$tpl->assign('form', $formToDisplay);
@ -93,10 +93,10 @@ switch ($action) {
get_lang('List'),
null,
ICON_SIZE_MEDIUM
),
),
$listAction,
['title' => get_lang('List')]
);
);
if ($form->validate()) {
$values = $form->exportValues();
@ -119,10 +119,10 @@ switch ($action) {
get_lang('List'),
null,
ICON_SIZE_MEDIUM
),
),
$listAction,
['title' => get_lang('List')]
);
);
$em->remove($item);
$em->flush();
header('Location: '.$listAction);
@ -136,11 +136,10 @@ switch ($action) {
get_lang('Add'),
null,
ICON_SIZE_MEDIUM
),
),
api_get_self().'?action=add',
['title' => get_lang('Add')]
);
);
}
$tpl->assign('list', $list);

@ -961,7 +961,11 @@ if ($table->get_total_number_of_items() == 0) {
}
}
}
$toolbarActions = Display::toolbarAction('toolbarUser', [$actionsLeft, $actionsCenter, $actionsRight], [4, 4, 4]);
$toolbarActions = Display::toolbarAction(
'toolbarUser',
[$actionsLeft, $actionsCenter, $actionsRight],
[4, 4, 4]
);
$tpl = new Template($tool_name);
$tpl->assign('actions', $toolbarActions);

Loading…
Cancel
Save