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_calendar/view_selector
19
 
20
    This template renders display dropdown.
21
 
22
    Example context (json):
23
    {
24
        "viewingmonth": true,
25
        "viewingday": false,
26
        "viewingupcoming": false
27
    }
28
}}
29
<div data-region="view-selector">
30
    <button id="calendarviewdropdown" type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
31
        <span class="d-sm-inline-block" data-active-item-text>
32
            {{#viewingmonth}}{{#str}} month {{/str}}{{/viewingmonth}}
33
            {{#viewingday}}{{#str}} day, core_calendar {{/str}}{{/viewingday}}
34
            {{#viewingupcoming}}{{#str}} upcomingevents, core_calendar {{/str}}{{/viewingupcoming}}
35
        </span>
36
    </button>
37
    <ul class="dropdown-menu" data-show-active-item aria-labelledby="calendarviewdropdown">
38
        <li>
39
            <a class="dropdown-item {{#viewingmonth}}active{{/viewingmonth}}" href="#" data-view="month"
40
                data-year="{{date.year}}" data-month="{{date.mon}}" data-day="{{date.mday}}" data-courseid="{{courseid}}" data-categoryid="{{categoryid}}">
41
                {{#str}} month {{/str}}
42
            </a>
43
        </li>
44
        <li>
45
            <a class="dropdown-item {{#viewingday}}active{{/viewingday}}" href="#" data-view="day" data-year="{{date.year}}" data-month="{{date.mon}}"
46
                data-day="{{date.mday}}" data-courseid="{{courseid}}" data-categoryid="{{categoryid}}">
47
                {{#str}} day, core_calendar {{/str}}
48
            </a>
49
        </li>
50
        <li>
51
            <a class="dropdown-item {{#viewingupcoming}}active{{/viewingupcoming}}" href="#" data-view="upcoming"
52
                data-year="{{date.year}}" data-month="{{date.mon}}" data-day="{{date.mday}}" data-courseid="{{courseid}}" data-categoryid="{{categoryid}}">
53
                {{#str}} upcomingevents, core_calendar {{/str}}
54
            </a>
55
        </li>
56
    </ul>
57
</div>