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_popover
20 This template will render the message popover for the navigation bar.
22 Classes required for JS:
25 Data attributes required for JS:
26 * All data attributes are required
28 Context variables required for this template:
29 * userid The logged in user id
30 * urls The URLs for the popover
32 Example context (json):
38 <div class="popover-region collapsed" data-region="popover-region-messages">
39 <a id="message-drawer-toggle-{{uniqid}}" class="nav-link popover-region-toggle position-relative icon-no-margin" href="#"
41 {{#pix}} t/message, core, {{#str}} togglemessagemenu, message {{/str}} {{/pix}}
43 class="count-container {{^unreadcount}}hidden{{/unreadcount}}"
44 data-region="count-container"
46 <span aria-hidden="true">{{unreadcount}}</span>
47 <span class="sr-only">{{#str}} unreadconversations, core_message, {{unreadcount}} {{/str}}</span>
50 {{> core_message/message_jumpto }}
57 'core_message/message_popover'
63 var toggle = $('#message-drawer-toggle-{{uniqid}}');