navigation MDL-22322 Icons not used for navigation branches and fixed indenting of navigation items

This commit is contained in:
Sam Hemelryk
2010-05-05 05:59:57 +00:00
parent bfe6fe455e
commit 7081714dc4
7 changed files with 52 additions and 17 deletions
+9 -8
View File
@@ -153,14 +153,15 @@ class navigation_node implements renderable {
if (array_key_exists('shorttext', $properties)) {
$this->shorttext = $properties['shorttext'];
}
if (array_key_exists('icon', $properties)) {
$this->icon = $properties['icon'];
if ($this->icon instanceof pix_icon) {
if (empty($this->icon->attributes['class'])) {
$this->icon->attributes['class'] = 'navicon';
} else {
$this->icon->attributes['class'] .= ' navicon';
}
if (!array_key_exists('icon', $properties)) {
$properties['icon'] = new pix_icon('i/navigationitem', 'moodle');
}
$this->icon = $properties['icon'];
if ($this->icon instanceof pix_icon) {
if (empty($this->icon->attributes['class'])) {
$this->icon->attributes['class'] = 'navicon';
} else {
$this->icon->attributes['class'] .= ' navicon';
}
}
if (array_key_exists('type', $properties)) {