| 1 | 
           efrain | 
           1 | 
           {{!
  | 
        
        
            | 
            | 
           2 | 
               This file is part of Moodle - http://moodle.org/
  | 
        
        
            | 
            | 
           3 | 
              | 
        
        
            | 
            | 
           4 | 
               Moodle is free software: you can redistribute it and/or modify
  | 
        
        
            | 
            | 
           5 | 
               it under the terms of the GNU General Public License as published by
  | 
        
        
            | 
            | 
           6 | 
               the Free Software Foundation, either version 3 of the License, or
  | 
        
        
            | 
            | 
           7 | 
               (at your option) any later version.
  | 
        
        
            | 
            | 
           8 | 
              | 
        
        
            | 
            | 
           9 | 
               Moodle is distributed in the hope that it will be useful,
  | 
        
        
            | 
            | 
           10 | 
               but WITHOUT ANY WARRANTY; without even the implied warranty of
  | 
        
        
            | 
            | 
           11 | 
               MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  | 
        
        
            | 
            | 
           12 | 
               GNU General Public License for more details.
  | 
        
        
            | 
            | 
           13 | 
              | 
        
        
            | 
            | 
           14 | 
               You should have received a copy of the GNU General Public License
  | 
        
        
            | 
            | 
           15 | 
               along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  | 
        
        
            | 
            | 
           16 | 
           }}
  | 
        
        
            | 
            | 
           17 | 
           {{!
  | 
        
        
            | 
            | 
           18 | 
               @template core/moremenu
  | 
        
        
            | 
            | 
           19 | 
              | 
        
        
            | 
            | 
           20 | 
               The More menu.
  | 
        
        
            | 
            | 
           21 | 
              | 
        
        
            | 
            | 
           22 | 
               Example context (json):
  | 
        
        
            | 
            | 
           23 | 
               {
  | 
        
        
            | 
            | 
           24 | 
                   "nodecollection": {
  | 
        
        
            | 
            | 
           25 | 
                       "children": [
  | 
        
        
            | 
            | 
           26 | 
                           {
  | 
        
        
            | 
            | 
           27 | 
                               "text": "Home",
  | 
        
        
            | 
            | 
           28 | 
                               "action": "/index.php?redirect=0",
  | 
        
        
            | 
            | 
           29 | 
                               "active": "true"
  | 
        
        
            | 
            | 
           30 | 
                           },
  | 
        
        
            | 
            | 
           31 | 
                           {
  | 
        
        
            | 
            | 
           32 | 
                               "text": "Dashboard",
  | 
        
        
            | 
            | 
           33 | 
                               "action": "/my"
  | 
        
        
            | 
            | 
           34 | 
                           },
  | 
        
        
            | 
            | 
           35 | 
                           {
  | 
        
        
            | 
            | 
           36 | 
                               "text": "Courses",
  | 
        
        
            | 
            | 
           37 | 
                               "action": "/course"
  | 
        
        
            | 
            | 
           38 | 
                           },
  | 
        
        
            | 
            | 
           39 | 
                           {
  | 
        
        
            | 
            | 
           40 | 
                               "text": "Site Administration",
  | 
        
        
            | 
            | 
           41 | 
                               "action": "/admin/search.php"
  | 
        
        
            | 
            | 
           42 | 
                           }
  | 
        
        
            | 
            | 
           43 | 
                       ]
  | 
        
        
            | 
            | 
           44 | 
                   },
  | 
        
        
            | 
            | 
           45 | 
                   "moremenuid": "614c104dbacfa"
  | 
        
        
            | 
            | 
           46 | 
               }
  | 
        
        
            | 
            | 
           47 | 
           }}
  | 
        
        
            | 
            | 
           48 | 
           <nav class="moremenu navigation">
  | 
        
        
            | 
            | 
           49 | 
               <ul id="moremenu-{{moremenuid}}-{{navbarstyle}}" role="{{#istablist}}tablist{{/istablist}}{{^istablist}}menubar{{/istablist}}" class="nav more-nav {{navbarstyle}}">
  | 
        
        
            | 
            | 
           50 | 
                   {{#nodecollection}}
  | 
        
        
            | 
            | 
           51 | 
                       {{#children}}
  | 
        
        
            | 
            | 
           52 | 
                           {{> core/moremenu_children}}
  | 
        
        
            | 
            | 
           53 | 
                       {{/children}}
  | 
        
        
            | 
            | 
           54 | 
                   {{/nodecollection}}
  | 
        
        
            | 
            | 
           55 | 
                   {{#nodearray}}
  | 
        
        
            | 
            | 
           56 | 
                       {{> core/moremenu_children}}
  | 
        
        
            | 
            | 
           57 | 
                   {{/nodearray}}
  | 
        
        
            | 
            | 
           58 | 
                   <li role="none" class="nav-item dropdown dropdownmoremenu d-none" data-region="morebutton">
  | 
        
        
            | 
            | 
           59 | 
                       <a class="dropdown-toggle nav-link {{#isactive}}active{{/isactive}}" href="#" id="moremenu-dropdown-{{moremenuid}}" role="{{#istablist}}tab{{/istablist}}{{^istablist}}menuitem{{/istablist}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" tabindex="-1">
  | 
        
        
            | 
            | 
           60 | 
                           {{#str}}moremenu, core{{/str}}
  | 
        
        
            | 
            | 
           61 | 
                       </a>
  | 
        
        
            | 
            | 
           62 | 
                       <ul class="dropdown-menu dropdown-menu-left" data-region="moredropdown" aria-labelledby="moremenu-dropdown-{{moremenuid}}" role="menu">
  | 
        
        
            | 
            | 
           63 | 
                       </ul>
  | 
        
        
            | 
            | 
           64 | 
                   </li>
  | 
        
        
            | 
            | 
           65 | 
               </ul>
  | 
        
        
            | 
            | 
           66 | 
           </nav>
  | 
        
        
            | 
            | 
           67 | 
           {{#js}}
  | 
        
        
            | 
            | 
           68 | 
               require(['core/moremenu'], function(moremenu) {
  | 
        
        
            | 
            | 
           69 | 
                   moremenu(document.querySelector('#moremenu-{{moremenuid}}-{{navbarstyle}}'));
  | 
        
        
            | 
            | 
           70 | 
               });
  | 
        
        
            | 
            | 
           71 | 
           {{/js}}
  |