MDL-63352 block_timeline: Persist user preference on timeline
[moodle.git] / theme / bootstrapbase / templates / block_timeline / 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="btn-group">
26     <button type="button" class="btn dropdown-toggle" 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         <span data-region="caret" class="caret"></span>
33     </button>
34     <ul role="menu" class="dropdown-menu" data-show-active-item>
35         <li class="dropdown-item {{#all}} active {{/all}}" data-from="-14" data-filtername="all">
36             <a href="#" aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} all, core {{/str}}{{/str}}">
37                 {{#str}} all, core {{/str}}
38             </a>
39         </li>
40         <li class="dropdown-item {{#overdue}} active {{/overdue}}" data-from="-14" data-to="0" data-filtername="overdue">
41             <a href="#" aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} overdue, block_timeline {{/str}}{{/str}}">
42                 {{#str}} overdue, block_timeline {{/str}}
43             </a>
44         </li>
45         <li class="divider"></li>
46         <li class="dropdown-item {{#next7days}} active {{/next7days}}" data-from="0" data-to="7" data-filtername="next7days">
47             <a href="#" aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next7days, block_timeline {{/str}}{{/str}}">
48                 {{#str}} next7days, block_timeline {{/str}}
49             </a>
50         </li>
51         <li class="dropdown-item {{#next30days}} active {{/next30days}}" data-from="0" data-to="30" data-filtername="next30days">
52             <a href="#" aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next30days, block_timeline {{/str}}{{/str}}">
53                 {{#str}} next30days, block_timeline {{/str}}
54             </a>
55         </li>
56         <li class="dropdown-item {{#next3months}} active {{/next3months}}" data-from="0" data-to="90" data-filtername="next3months">
57             <a href="#" aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next3months, block_timeline {{/str}}{{/str}}">
58                 {{#str}} next3months, block_timeline {{/str}}
59             </a>
60         </li>
61         <li class="dropdown-item {{#next6months}} active {{/next6months}}" data-from="0" data-to="180" data-filtername="next6months">
62             <a href="#" aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next6months, block_timeline {{/str}}{{/str}}">
63                 {{#str}} next6months, block_timeline {{/str}}
64             </a>
65         </li>
66     </ul>
67 </div>