MDL-69454 core_search: consistent navbar search
[moodle.git] / lib / templates / popover_region.mustache
CommitLineData
a0e358a6
RW
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{{!
d4555a3d 18 @template core/popover_region
a0e358a6 19
d4555a3d 20 This template will render a popover region
a0e358a6
RW
21
22 Classes required for JS:
23 * none
24
25 Data attributes required for JS:
14617a56 26 * All data attributes are required
a0e358a6
RW
27
28 Context variables required for this template:
14617a56 29 * none
a0e358a6
RW
30
31 Example context (json):
32 {
33 }
34
35}}
a92eda4b 36<div class="popover-region collapsed {{$classes}}{{/classes}}"
6af2bd09
RW
37 {{$attributes}}{{/attributes}}
38 data-region="popover-region">
1fdb4fda 39 <div class="popover-region-toggle nav-link icon-no-margin"
6af2bd09 40 data-region="popover-region-toggle"
82e8a0ef 41 role="button"
d4555a3d 42 aria-controls="popover-region-container-{{uniqid}}"
a0e358a6
RW
43 aria-haspopup="true"
44 aria-label="{{$togglelabel}}{{#str}}showpopovermenu{{/str}}{{/togglelabel}}"
45 tabindex="0">
46 {{$togglecontent}}{{/togglecontent}}
47 </div>
48 <div {{$containerattributes}}{{/containerattributes}}
d4555a3d
RW
49 id="popover-region-container-{{uniqid}}"
50 class="popover-region-container"
6af2bd09 51 data-region="popover-region-container"
a0e358a6
RW
52 aria-expanded="false"
53 aria-hidden="true"
54 aria-label="{{$containerlabel}}{{/containerlabel}}"
55 role="region">
d4555a3d 56 <div class="popover-region-header-container">
6af2bd09
RW
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>
a0e358a6 59 </div>
6af2bd09
RW
60 <div class="popover-region-content-container" data-region="popover-region-content-container">
61 <div class="popover-region-content" data-region="popover-region-content">
a0e358a6
RW
62 {{$content}}{{/content}}
63 </div>
d4555a3d 64 {{> core/loading }}
a0e358a6 65 </div>
d3d0248a 66 {{$anchor}}
a6a277f0
RW
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}}
d3d0248a 75 {{/anchor}}
a0e358a6
RW
76 </div>
77</div>