MDL-63352 block_timeline: Persist user preference on timeline
[moodle.git] / blocks / timeline / templates / nav-day-filter.mustache
CommitLineData
1e44de35
RW
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 block_timeline/nav-day-filter
19
20 This template renders the day range selector for the timeline view.
21
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
9e95193e 35 class="dropdown-item {{#all}} active {{/all}}"
1e44de35
RW
36 href="#"
37 data-from="-14"
9e95193e 38 data-filtername="all"
1e44de35
RW
39 aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} all, core {{/str}}{{/str}}"
40 >
41 {{#str}} all, core {{/str}}
42 </a>
43 <a
9e95193e 44 class="dropdown-item {{#overdue}} active {{/overdue}}"
1e44de35
RW
45 href="#"
46 data-from="-14"
47 data-to="0"
9e95193e 48 data-filtername="overdue"
1e44de35
RW
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
9e95193e 56 class="dropdown-item {{#next7days}} active {{/next7days}}"
1e44de35
RW
57 href="#"
58 data-from="0"
59 data-to="7"
9e95193e 60 data-filtername="next7days"
1e44de35
RW
61 aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next7days, block_timeline {{/str}}{{/str}}"
62 >
63 {{#str}} next7days, block_timeline {{/str}}
64 </a>
65 <a
9e95193e 66 class="dropdown-item {{#next30days}} active {{/next30days}}"
1e44de35
RW
67 href="#"
68 data-from="0"
69 data-to="30"
9e95193e 70 data-filtername="next30days"
1e44de35
RW
71 aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next30days, block_timeline {{/str}}{{/str}}"
72 >
73 {{#str}} next30days, block_timeline {{/str}}
74 </a>
75 <a
9e95193e 76 class="dropdown-item {{#next3months}} active {{/next3months}}"
1e44de35
RW
77 href="#"
78 data-from="0"
79 data-to="90"
9e95193e 80 data-filtername="next3months"
1e44de35
RW
81 aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next3months, block_timeline {{/str}}{{/str}}"
82 >
83 {{#str}} next3months, block_timeline {{/str}}
84 </a>
85 <a
9e95193e 86 class="dropdown-item {{#next6months}} active {{/next6months}}"
1e44de35
RW
87 href="#"
88 data-from="0"
89 data-to="180"
9e95193e 90 data-filtername="next6months"
1e44de35
RW
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>