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

    • Sub-task
    • Resolution: Cannot Reproduce
    • Minor
    • None
    • 2.3.2
    • Navigation, Usability
    • 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

              Unassigned Unassigned
              fred Frédéric Massart
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.