MDL-63352 block_timeline: Persist user preference on timeline
[moodle.git] / blocks / timeline / templates / nav-day-filter.mustache
index 90afd62..938763b 100644 (file)
     </button>
     <div role="menu" class="dropdown-menu" data-show-active-item>
         <a
-            class="dropdown-item"
+            class="dropdown-item {{#all}} active {{/all}}"
             href="#"
             data-from="-14"
+            data-filtername="all"
             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} all, core {{/str}}{{/str}}"
         >
             {{#str}} all, core {{/str}}
         </a>
         <a
-            class="dropdown-item"
+            class="dropdown-item {{#overdue}} active {{/overdue}}"
             href="#"
             data-from="-14"
             data-to="0"
+            data-filtername="overdue"
             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} overdue, block_timeline {{/str}}{{/str}}"
         >
             {{#str}} overdue, block_timeline {{/str}}
         <div class="dropdown-divider"></div>
         <h6 class="dropdown-header">{{#str}} duedate, block_timeline {{/str}}</h6>
         <a
-            class="dropdown-item"
+            class="dropdown-item {{#next7days}} active {{/next7days}}"
             href="#"
             data-from="0"
             data-to="7"
+            data-filtername="next7days"
             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next7days, block_timeline {{/str}}{{/str}}"
         >
             {{#str}} next7days, block_timeline {{/str}}
         </a>
         <a
-            class="dropdown-item active"
+            class="dropdown-item {{#next30days}} active {{/next30days}}"
             href="#"
             data-from="0"
             data-to="30"
+            data-filtername="next30days"
             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next30days, block_timeline {{/str}}{{/str}}"
         >
             {{#str}} next30days, block_timeline {{/str}}
         </a>
         <a
-            class="dropdown-item"
+            class="dropdown-item {{#next3months}} active {{/next3months}}"
             href="#"
             data-from="0"
             data-to="90"
+            data-filtername="next3months"
             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next3months, block_timeline {{/str}}{{/str}}"
         >
             {{#str}} next3months, block_timeline {{/str}}
         </a>
         <a
-            class="dropdown-item"
+            class="dropdown-item {{#next6months}} active {{/next6months}}"
             href="#"
             data-from="0"
             data-to="180"
+            data-filtername="next6months"
             aria-label="{{#str}} ariadayfilteroption, block_timeline, {{#str}} next6months, block_timeline {{/str}}{{/str}}"
         >
             {{#str}} next6months, block_timeline {{/str}}