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/>.
18 @template core_message/message_drawer_view_overview_section
20 This template is a base template to render a collapsible "section" on the
21 overview page of the message drawer, for example the messages section.
23 Classes required for JS:
26 Data attributes required for JS:
27 * All data attributes are required
29 Context variables required for this template:
30 * userid The logged in user id
31 * urls The URLs for the popover
33 Example context (json):
39 class="section border-0 card"
40 data-region="{{$region}}{{/region}}"
42 <div id="{{$region}}{{/region}}-toggle" class="card-header p-0" data-region="toggle">
44 class="btn btn-link w-100 text-left p-1 p-sm-2 d-flex align-items-center overview-section-toggle {{^expanded}}collapsed{{/expanded}}"
45 data-toggle="collapse"
46 data-target="#{{$region}}{{/region}}-target-{{uniqid}}"
47 aria-expanded="{{#expanded}}true{{/expanded}}{{^expanded}}false{{/expanded}}"
48 aria-controls="{{$region}}{{/region}}-target-{{uniqid}}"
50 <span class="collapsed-icon-container">
51 {{#pix}} t/collapsedcaret, core {{/pix}}
53 <span class="expanded-icon-container">
54 {{#pix}} t/expanded, core {{/pix}}
56 <span class="font-weight-bold">{{$title}}{{/title}}</span>
57 <small class="hidden ml-1" data-region="section-total-count-container"
58 aria-label="{{#str}} totalconversations, core_message, {{count.total}} {{/str}}">
59 (<span data-region="section-total-count">{{count.total}}</span>)
61 <span class="hidden ml-2" data-region="loading-icon-container">
64 <span class="{{^count.unread}}hidden{{/count.unread}} badge badge-pill badge-primary ml-auto bg-primary"
65 data-region="section-unread-count"
66 {{#count.unread}}aria-label="{{#str}} unreadconversations, core_message, {{count.unread}} {{/str}}"{{/count.unread}}>
71 {{< core_message/message_drawer_lazy_load_list }}
72 {{$rootclasses}}collapse border-bottom {{#expanded}}show{{/expanded}}{{/rootclasses}}
74 id="{{$region}}{{/region}}-target-{{uniqid}}"
75 aria-labelledby="{{$region}}{{/region}}-toggle"
76 data-parent="#message-drawer-view-overview-container-{{uniqid}}"
78 {{/ core_message/message_drawer_lazy_load_list }}