{{!
    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 mod_assign/grading_navigation_user_selector

    The template HTML for the user selector in the top right corner.

    Classes required for JS:
    * none

    Data attributes required for JS:
    * data-action, data-assignmentid, data-groupid, data-region

    Context variables required for this template:
    * see mod/assign/classes/output/grading_app.php

    This template uses ajax functionality, so it cannot be shown in the template library.
}}

<div class="col-12 row px-0 no-gutters align-items-center justify-content-end">
  <div class="row align-items-center">
    <a href="#previous" data-action="previous-user" class="pull-left mr-1"><i class="icon fas fa-caret-left"></i></a>
        <span data-region="input-field">
            <select data-action="change-user" data-currentuserid="{{currentuserid}}" data-assignmentid="{{assignmentid}}" data-groupid="{{groupid}}"></select>
        </span>
    <a href="#next" data-action="next-user" class="pull-right ml-1"><i class="icon fas fa-caret-right"></i></a>
  </div>

  <div data-region="user-count" class="col-1 mr-3 ml-3 text-center">
    <small>
        <span data-region="user-count-summary">{{#str}}xofy, mod_assign, { "x": "{{index}}", "y": "{{count}}" }{{/str}}</span>
    </small>
  </div>

  <div>
    <span data-region="configure-filters" id="filter-configuration-{{uniqid}}" class="card card-large p-2">
        <form>
            <span class="row px-3 py-1">
                <label class="text-right w-25 p-2 m-0" for="filter-general-{{uniqid}}">
                    {{#str}}filter, mod_assign{{/str}}
                </label>
                <select name="filter" class="custom-select w-50" id="filter-general-{{uniqid}}">
                {{#filters}}
                    <option value="{{key}}" {{#active}}selected="selected"{{/active}} > {{name}} </option>
                {{/filters}}
                </select>
            </span>
            {{#hasmarkingallocation}}
            <span class="row px-3 py-1">
                <label class="text-right w-25 p-2 m-0" for="filter-marker-{{uniqid}}">
                    {{#str}}markerfilter, mod_assign{{/str}}
                </label>
                <select name="markerfilter" class="custom-select w-50" id="filter-marker-{{uniqid}}">
                {{#markingallocationfilters}}
                    <option value="{{key}}" {{#active}}selected="selected"{{/active}} > {{name}} </option>
                {{/markingallocationfilters}}
                </select>
            </span>
            {{/hasmarkingallocation}}
            {{#hasmarkingworkflow}}
            <span class="row px-3 py-1">
                <label class="text-right w-25 p-2 m-0" for="filter-workflow-{{uniqid}}">
                    {{#str}}workflowfilter, mod_assign{{/str}}
                </label>
                <select name="workflowfilter" class="custom-select w-50" id="filter-workflow-{{uniqid}}">
                {{#markingworkflowfilters}}
                    <option value="{{key}}" {{#active}}selected="selected"{{/active}} > {{name}} </option>
                {{/markingworkflowfilters}}
                </select>
            </span>
            {{/hasmarkingworkflow}}
        </form>
    </span>

    <a href="#" class="btn btn-sm btn-secondary" data-region="user-filters" title="{{#str}}changefilters, mod_assign{{/str}}" aria-expanded="false" aria-controls="filter-configuration-{{uniqid}}">
        <span class="accesshide">
            {{#filters}}
                {{filtername}}
            {{/filters}}
            {{^filters}}
                {{#str}}nofilters, mod_assign{{/str}}
            {{/filters}}
        </span>
        {{#pix}}i/filter{{/pix}}
    </a>

  </div>
</div>
