Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | 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">
1441 ariadna 39
    <a
40
        id="message-drawer-toggle-{{uniqid}}"
41
        class="nav-link popover-region-toggle position-relative icon-no-margin"
42
        href="#"
43
        aria-label="{{#str}} togglemessagemenu, message {{/str}}"
44
        title="{{#str}} togglemessagemenu, message {{/str}}"
45
        role="button"
46
        aria-expanded="false"
47
        aria-describedby="unread-messages-count-{{uniqid}}"
48
    >
49
        {{#pix}} t/message, core {{/pix}}
1 efrain 50
        <div
51
            class="count-container {{^unreadcount}}hidden{{/unreadcount}}"
52
            data-region="count-container"
53
        >
54
            <span aria-hidden="true">{{unreadcount}}</span>
1441 ariadna 55
            <span class="visually-hidden" id="unread-messages-count-{{uniqid}}">{{#str}} unreadconversations, core_message, {{unreadcount}} {{/str}}</span>
1 efrain 56
        </div>
57
    </a>
58
    {{> core_message/message_jumpto }}
59
</div>
60
 
61
{{#js}}
62
require(
63
[
64
    'jquery',
65
    'core_message/message_popover'
66
],
67
function(
68
    $,
69
    Popover
70
) {
71
    var toggle = $('#message-drawer-toggle-{{uniqid}}');
72
    Popover.init(toggle);
73
});
74
{{/js}}