-
Sub-task
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
2.3.2
-
MOODLE_23_STABLE
The navigation under site pages does not allow proper theming because the structure is different than on the other levels (under course for example).
- Add some activities which are expandable on site level (glossary, quiz, ...)
- Expand 'Site pages'
Expected:
- The icon is correctly aligned and the arrow to expand is visible
Actual:
- Alignment is wrong
I noticed that the logic between JavaScript and PHP is different (the item_with_icon is missing in PHP):
// navigation.js:331
|
if (icon && (!isbranch || this.get('type') == NODETYPE.ACTIVITY)) {
|
branchicon = Y.Node.create('<img alt="" />');
|
branchicon.setAttribute('src', M.util.image_url(icon.pix, icon.component));
|
branchli.addClass('item_with_icon');
|
|
// blocks/navigation/renderer.php:128
|
if ($isbranch) {
|
$liclasses[] = 'contains_branch';
|
$liexpandable = array('aria-expanded' => in_array('collapsed', $liclasses) ? "false" : "true");
|
} else if ($hasicon) {
|
$liclasses[] = 'item_with_icon';
|
}
|
Also there are inconsistencies with the class hasicon
Also, there under courses, there would be a <ul> where as in site pages there is none. See screenshots.
- has been marked as being related by
-
MDL-36323 Normalise icons present in blocks
- Closed