Improve course categories to display in homepage - refs BT#12841

remotes/angel/1.11.x
Angel Fernando Quiroz Campos 8 years ago
parent 730b63ab6d
commit 4784f95c2e
  1. 16
      main/admin/configure_homepage.php

@ -1153,19 +1153,21 @@ switch ($action) {
echo '<div class="actions">';
echo '<a href="course_category.php">'.Display::return_icon('edit.png', get_lang('Edit')).'&nbsp;'.get_lang('EditCategories').'</a>';
echo '</div>';
}
echo '<ul class="list-group">';
if ($access_url_id == 1) {
if (sizeof($Categories)) {
echo '<ul class="list-group">';
if (count($Categories)) {
foreach ($Categories as $enreg) {
echo '<li class="list-group-item">'.Display::return_icon('folder.png', $enreg['name']).'&nbsp;'.$enreg['name'].'</li>';
echo '<li class="list-group-item">'
.Display::return_icon('folder.png', get_lang('CourseCategory')).' '.$enreg['name']
.'</li>';
}
unset($Categories);
} else {
echo get_lang('NoCategories');
echo '<li class="list-group-item">'.get_lang('NoCategories').'</li>';
}
echo '</ul>';
}
echo '</ul>';
?>
<?php

Loading…
Cancel
Save