MDL-69454 core_search: consistent navbar search
[moodle.git] / lib / templates / popover_region.mustache
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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/popover_region
20     This template will render a popover region
22     Classes required for JS:
23     * none
25     Data attributes required for JS:
26     * All data attributes are required
28     Context variables required for this template:
29     * none
31     Example context (json):
32     {
33     }
35 }}
36 <div class="popover-region collapsed {{$classes}}{{/classes}}"
37     {{$attributes}}{{/attributes}}
38     data-region="popover-region">
39     <div class="popover-region-toggle nav-link icon-no-margin"
40         data-region="popover-region-toggle"
41         role="button"
42         aria-controls="popover-region-container-{{uniqid}}"
43         aria-haspopup="true"
44         aria-label="{{$togglelabel}}{{#str}}showpopovermenu{{/str}}{{/togglelabel}}"
45         tabindex="0">
46         {{$togglecontent}}{{/togglecontent}}
47     </div>
48     <div {{$containerattributes}}{{/containerattributes}}
49         id="popover-region-container-{{uniqid}}"
50         class="popover-region-container"
51         data-region="popover-region-container"
52         aria-expanded="false"
53         aria-hidden="true"
54         aria-label="{{$containerlabel}}{{/containerlabel}}"
55         role="region">
56         <div class="popover-region-header-container">
57             <h3 class="popover-region-header-text" data-region="popover-region-header-text">{{$headertext}}{{/headertext}}</h3>
58             <div class="popover-region-header-actions" data-region="popover-region-header-actions">{{$headeractions}}{{/headeractions}}</div>
59         </div>
60         <div class="popover-region-content-container" data-region="popover-region-content-container">
61             <div class="popover-region-content" data-region="popover-region-content">
62                 {{$content}}{{/content}}
63             </div>
64             {{> core/loading }}
65         </div>
66         {{$anchor}}
67             {{#urls.seeall}}
68                 <a class="see-all-link"
69                     href="{{{.}}}">
70                     <div class="popover-region-footer-container">
71                         <div class="popover-region-seeall-text">{{#str}} seeall, message {{/str}}</div>
72                     </div>
73                 </a>
74             {{/urls.seeall}}
75         {{/anchor}}
76     </div>
77 </div>