MDL-63352 block_timeline: Persist user preference on timeline
[moodle.git] / blocks / timeline / templates / nav-day-filter.mustache
1 {{!
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/>.
16 }}
17 {{!
18     @template block_timeline/nav-day-filter
20     This template renders the day range selector for the timeline view.
22     Example context (json):
23     {}
24 }}
25 <div data-region="day-filter" class="dropdown">
26     <button type="button" class="btn btn-outline-secondary dropdown-toggle icon-no-margin" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
27         {{#pix}} i/duration {{/pix}}
28         <span class="sr-only">
29             {{#str}} ariadayfilter, block_timeline {{/str}}
30             <span data-active-item-text>{{#str}} next30days, block_timeline {{/str}}</span>
31         </span>
32     </button>
33     <div role="menu" class="dropdown-menu" data-show-active-item>
34         <a
35             class="dropdown-item {{#all}} active {{/all}}"
36             href="#"
37             data-from="-14"
38             data-filtername="all"
39             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} all, core {{/str}}{{/str}}"
40         >
41             {{#str}} all, core {{/str}}
42         </a>
43         <a
44             class="dropdown-item {{#overdue}} active {{/overdue}}"
45             href="#"
46             data-from="-14"
47             data-to="0"
48             data-filtername="overdue"
49             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} overdue, block_timeline {{/str}}{{/str}}"
50         >
51             {{#str}} overdue, block_timeline {{/str}}
52         </a>
53         <div class="dropdown-divider"></div>
54         <h6 class="dropdown-header">{{#str}} duedate, block_timeline {{/str}}</h6>
55         <a
56             class="dropdown-item {{#next7days}} active {{/next7days}}"
57             href="#"
58             data-from="0"
59             data-to="7"
60             data-filtername="next7days"
61             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next7days, block_timeline {{/str}}{{/str}}"
62         >
63             {{#str}} next7days, block_timeline {{/str}}
64         </a>
65         <a
66             class="dropdown-item {{#next30days}} active {{/next30days}}"
67             href="#"
68             data-from="0"
69             data-to="30"
70             data-filtername="next30days"
71             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next30days, block_timeline {{/str}}{{/str}}"
72         >
73             {{#str}} next30days, block_timeline {{/str}}
74         </a>
75         <a
76             class="dropdown-item {{#next3months}} active {{/next3months}}"
77             href="#"
78             data-from="0"
79             data-to="90"
80             data-filtername="next3months"
81             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next3months, block_timeline {{/str}}{{/str}}"
82         >
83             {{#str}} next3months, block_timeline {{/str}}
84         </a>
85         <a
86             class="dropdown-item {{#next6months}} active {{/next6months}}"
87             href="#"
88             data-from="0"
89             data-to="180"
90             data-filtername="next6months"
91             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next6months, block_timeline {{/str}}{{/str}}"
92         >
93             {{#str}} next6months, block_timeline {{/str}}
94         </a>
95     </div>
96 </div>