Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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_message/message_popover
19
 
20
    This template will render the message popover for the navigation bar.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * All data attributes are required
27
 
28
    Context variables required for this template:
29
    * userid The logged in user id
30
    * urls The URLs for the popover
31
 
32
    Example context (json):
33
    {
34
        "unreadcount": 3
35
    }
36
 
37
}}
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="#"
40
            role="button">
41
        {{#pix}} t/message, core, {{#str}} togglemessagemenu, message {{/str}} {{/pix}}
42
        <div
43
            class="count-container {{^unreadcount}}hidden{{/unreadcount}}"
44
            data-region="count-container"
45
        >
46
            <span aria-hidden="true">{{unreadcount}}</span>
47
            <span class="sr-only">{{#str}} unreadconversations, core_message, {{unreadcount}} {{/str}}</span>
48
        </div>
49
    </a>
50
    {{> core_message/message_jumpto }}
51
</div>
52
 
53
{{#js}}
54
require(
55
[
56
    'jquery',
57
    'core_message/message_popover'
58
],
59
function(
60
    $,
61
    Popover
62
) {
63
    var toggle = $('#message-drawer-toggle-{{uniqid}}');
64
    Popover.init(toggle);
65
});
66
{{/js}}