{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template block_timeline/nav-view-selector

    This template renders the timeline sort selector.

    Example context (json):
    {}
}}
<div data-region="view-selector" class="btn-group pull-right">
    <button type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
        {{#pix}} i/filter {{/pix}}
        <span class="sr-only">
            {{#str}} ariaviewselector, block_timeline{{/str}}
            <span data-active-item-text>{{#str}} sortbydates, block_timeline {{/str}}</span>
        </span>
        <span data-region="caret" class="caret"></span>
    </button>
    <ul role="menu" class="dropdown-menu dropdown-menu-right" data-show-active-item>
        <li class="dropdown-item {{#sorttimelinedates}}active{{/sorttimelinedates}}" data-target="#view_dates_{{uniqid}}" data-toggle="tab" data-filtername="sortbydates">
            <a href="#" aria-label="{{#str}} ariaviewselectoroption, block_timeline, {{#str}} sortbydates, block_timeline {{/str}}{{/str}}">
                {{#str}} sortbydates, block_timeline {{/str}}
            </a>
        </li>
        <li class="dropdown-item {{#sorttimelinecourses}}active{{/sorttimelinecourses}}" data-target="#view_courses_{{uniqid}}" data-toggle="tab" data-filtername="sortbycourses">
            <a href="#" aria-label="{{#str}} ariaviewselectoroption, block_timeline, {{#str}} sortbycourses, block_timeline {{/str}}{{/str}}">
                {{#str}} sortbycourses, block_timeline {{/str}}
            </a>
        </li>
    </ul>
</div>
