Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-61343

Theme Boost: Simplify and harmonise flat_navigation.mustache

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.5
    • Component/s: Themes
    • Labels:
    • Testing Instructions:
      Hide

      Prequesites:

      • You need a user that is enrolled in at least one course

      Instructions:

      1. Login into Moodle
      2. Open the nav drawer (if not already opened)
      3. Go to a course, the user is enrolled in
      4. Open the web inspector (your browser's developer tools console)
      5. Examine a course section element in the navigation drawer
        • Confirm that the structure is similar to below:

          <div class="m-l-0">
               <div class="media">
                      <span class="media-left">
                            <i class="icon fa fa-folder fa-fw " aria-hidden="true" aria-label=""></i>
                      </span>
                      <span class="media-body">Topic 1</span>
               </div>
          </div>
          

      Show
      Prequesites: You need a user that is enrolled in at least one course Instructions: Login into Moodle Open the nav drawer (if not already opened) Go to a course, the user is enrolled in Open the web inspector (your browser's developer tools console) Examine a course section element in the navigation drawer Confirm that the structure is similar to below: <div class="m-l-0"> <div class="media"> <span class="media-left"> <i class="icon fa fa-folder fa-fw " aria-hidden="true" aria-label=""></i> </span> <span class="media-body">Topic 1</span> </div> </div>
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull Master Branch:
      MDL-61343-master

      Description

      When working for a child theme, we stumble along the current existing structure in the flat_navigation.mustache file.
      We think that this can be simplified.

      Furthermore the structure of the items is not homogeneous because elements that have an action do not get div's and span's equal to elements which don't have an action.

      Examples:

      • Code of a topic section:

        <div class="m-l-0">
            <div class="media">
                 <span class="media-left">
                          <i class="icon fa fa-folder fa-fw " aria-hidden="true" aria-label=""></i>
                 </span>
                 <span class="media-body">section 1</span>
             </div>
        </div>
        

      • Code of a section without an icon:

        <div class="m-l-1">
              My first course
        </div>
        

        Here, the media divs are missing.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  17/May/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h