Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-34080 Complete overhaul of all standard icons in core
  3. MDL-36476

Navigation renderer does not allow for proper theming in site pages

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: Navigation, Usability
    • Labels:
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: