Skip to content

Commit

Permalink
MDL-61298 theme Boost: Nav drawer icon improvements - fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathrin84 authored and David Monllao committed Apr 12, 2018
1 parent 05dfaab commit 45ae297
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion course/classes/management_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function category_listitem(coursecat $category, array $subcategories, $to
);
} else {
$icon = $this->output->pix_icon(
'i/navigationitem',
'i/empty',
'',
'moodle',
array('class' => 'tree-icon', 'title' => get_string('showcategory', 'moodle', $text))
Expand Down
2 changes: 2 additions & 0 deletions lib/classes/output/icon_system_fontawesome.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public function get_core_icon_map() {
'theme:fp/view_icon_active' => 'fa-th',
'theme:fp/view_list_active' => 'fa-list',
'theme:fp/view_tree_active' => 'fa-folder',
'core:i/addblock' => 'fa-plus-square',
'core:i/assignroles' => 'fa-user-plus',
'core:i/backup' => 'fa-file-zip-o',
'core:i/badge' => 'fa-shield',
Expand All @@ -215,6 +216,7 @@ public function get_core_icon_map() {
'core:i/duration' => 'fa-clock-o',
'core:i/edit' => 'fa-pencil',
'core:i/email' => 'fa-envelope',
'core:i/empty' => 'fa-fw',
'core:i/enrolmentsuspended' => 'fa-pause',
'core:i/enrolusers' => 'fa-user-plus',
'core:i/expired' => 'fa-exclamation text-warning',
Expand Down
7 changes: 5 additions & 2 deletions lib/navigationlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,8 @@ public function __construct(moodle_page $page) {
'key' => 'home',
'type' => navigation_node::TYPE_SYSTEM,
'text' => get_string('home'),
'action' => new moodle_url('/')
'action' => new moodle_url('/'),
'icon' => new pix_icon('i/home', '')
);
} else {
// We are using the users my moodle for the root element
Expand Down Expand Up @@ -1207,7 +1208,8 @@ public function initialise() {
if (get_home_page() == HOMEPAGE_SITE) {
// The home element should be my moodle because the root element is the site
if (isloggedin() && !isguestuser()) { // Makes no sense if you aren't logged in
$this->rootnodes['home'] = $this->add(get_string('myhome'), new moodle_url('/my/'), self::TYPE_SETTING, null, 'home');
$this->rootnodes['home'] = $this->add(get_string('myhome'), new moodle_url('/my/'),
self::TYPE_SETTING, null, 'home', new pix_icon('i/dashboard', ''));
$this->rootnodes['home']->showinflatnavigation = true;
}
} else {
Expand Down Expand Up @@ -3908,6 +3910,7 @@ public function initialise() {
$flat = new flat_navigation_node($addablock, 0);
$flat->set_showdivider(true);
$flat->key = 'addblock';
$flat->icon = new pix_icon('i/addblock', '');
$this->add($flat);
$blocks = [];
foreach ($addable as $block) {
Expand Down
Binary file added pix/i/addblock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pix/i/addblock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pix/i/emtpy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions pix/i/emtpy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 45ae297

Please sign in to comment.