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_drawer_view_overview_section
19
 
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.
22
 
23
    Classes required for JS:
24
    * none
25
 
26
    Data attributes required for JS:
27
    * All data attributes are required
28
 
29
    Context variables required for this template:
30
    * userid The logged in user id
31
    * urls The URLs for the popover
32
 
33
    Example context (json):
34
    {}
35
 
36
}}
37
 
38
<div
39
    class="section border-0 card rounded-0"
40
    data-region="{{$region}}{{/region}}"
41
>
42
    <div id="{{$region}}{{/region}}-toggle" class="card-header rounded-0" data-region="toggle">
43
        <button
44
            class="btn btn-link w-100 text-left p-1 p-sm-2 d-flex rounded-0 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}}"
49
        >
50
            <span class="collapsed-icon-container">
51
                {{#pix}} t/collapsedcaret, core {{/pix}}
52
            </span>
53
            <span class="expanded-icon-container">
54
                {{#pix}} t/expanded, core {{/pix}}
55
            </span>
56
            <span class="font-weight-bold">{{$title}}{{/title}}</span>
57
            <small
58
                class="hidden ml-1"
59
                data-region="section-total-count-container" aria-labelledby="{{$region}}{{/region}}-total-count-label"
60
            >
61
                (<span aria-hidden="true" data-region="section-total-count">{{count.total}}</span>)
62
                <span class="sr-only" id="{{$region}}{{/region}}-total-count-label">
63
                    {{#str}} totalconversations, core_message, {{count.total}} {{/str}}
64
                </span>
65
            </small>
66
            <span class="hidden ml-2" data-region="loading-icon-container">
67
                {{> core/loading }}
68
            </span>
69
            <span
70
                class="{{^count.unread}}hidden{{/count.unread}} badge rounded-pill bg-primary text-white ml-auto"
71
                data-region="section-unread-count-container" aria-labelledby="{{$region}}{{/region}}-unread-count-label"
72
            >
73
                <span aria-hidden="true" data-region="section-unread-count">{{count.unread}}</span>
74
                <span class="sr-only" id="{{$region}}{{/region}}-unread-count-label">
75
                    {{#str}} unreadconversations, core_message, {{count.unread}} {{/str}}
76
                </span>
77
            </span>
78
        </button>
79
    </div>
80
    {{< core_message/message_drawer_lazy_load_list }}
81
        {{$rootclasses}}collapse border-bottom {{#expanded}}show{{/expanded}}{{/rootclasses}}
82
        {{$rootattributes}}
83
            id="{{$region}}{{/region}}-target-{{uniqid}}"
84
            aria-labelledby="{{$region}}{{/region}}-toggle"
85
            data-parent="#message-drawer-view-overview-container-{{uniqid}}"
86
        {{/rootattributes}}
87
    {{/ core_message/message_drawer_lazy_load_list }}
88
</div>