MDL-69111 mod_forum: forum grading on small viewports
[moodle.git] / mod / forum / templates / local / grades / local / grader / navigation.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 mod_forum/local/grades/local/grader/navigation
20     Classes required for JS:
21     * none
23     Data attributes required for JS:
24     * data-action="togglefullscreen"
25     * data-action="closegrader"
26     * data-action="savegrade"
27     * data-action="expandgrader"
29     Context variables required for this template:
30     * moduleName: The name of the module this grading interface is for i.e. "Chef the Forum"
32     Example context (json):
33     {
34         "moduleName": "Chef the Forum"
35     }
36 }}
37 <nav id="nav-container-{{uniqid}}" class="grader-grading_navigation navbar px-0 px-sm-3" aria-label="{{#str}} forumgradingnavigation, mod_forum {{/str}}">
38     <div class="d-none d-sm-flex align-items-center">
39         <a href="{{{courseUrl}}}" class="btn btn-link px-2 colour-inherit">
40             <h5 class="d-inline px-0 mb-0">{{courseName}}</h5>
41         </a>
42         <span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
43         <button class="btn btn-link px-2 colour-inherit" data-action="closegrader">
44             <h5 class="d-inline px-0 mb-0">{{moduleName}}</h5>
45         </button>
46         <span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
47         <h5 class="d-inline px-2 mb-0 font-weight-bold">{{#str}}grading, forum{{/str}}</h5>
48     </div>
50     <div class="ml-1 ml-sm-auto">
51         <button
52             class="btn btn-icon icon-no-margin drawer-button mr-1 active"
53             data-action="expand-grading-drawer"
54             aria-controls="grading-drawer-{{uniqid}}"
55             aria-expanded="true"
56             type="button"
57             title="{{#str}} showgraderpanel, mod_forum {{/str}}"
58         >
59             <span class="dir-ltr-hide" aria-hidden="true">{{#pix}} show-grader-panel-rtl, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
60             <span class="dir-rtl-hide" aria-hidden="true">{{#pix}} show-grader-panel, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
61         </button>
62         <button
63             class="btn btn-icon icon-no-margin drawer-button mr-1 d-none d-sm-inline-block"
64             aria-label="{{#str}} hidegraderpanel, mod_forum {{/str}}"
65             data-action="collapse-grading-drawer"
66             aria-controls="grading-drawer-{{uniqid}}"
67             aria-expanded="true"
68             type="button"
69             title="{{#str}} hidegraderpanel, mod_forum {{/str}}"
70         >
71             <span aria-hidden="true">{{#pix}} hide-grader-panel, mod_forum, {{#str}} hidegraderpanel, mod_forum {{/str}} {{/pix}}</span>
72         </button>
73         <button
74             class="btn btn-primary font-weight-bold ml-sm-2 px-4"
75             data-action="savegrade"
76         >
77             {{#str}} save {{/str}}
78         </button>
79         <button
80             class="btn btn-secondary font-weight-bold ml-1 ml-sm-2 px-4"
81             aria-label="{{#str}} closegrader, mod_forum {{/str}}"
82             data-action="closegrader"
83             type="button"
84         >
85             {{#str}} close, mod_forum {{/str}}
86         </button>
87         <div class="btn-group d-none d-sm-inline-block">
88             <button
89                 class="btn btn-icon text-muted icon-no-margin icon-size-3 ml-2"
90                 type="button"
91                 id="grader-actions-menu-{{uniqid}}"
92                 data-toggle="dropdown"
93                 aria-haspopup="true"
94                 aria-expanded="false"
95                 aria-label="{{#str}} actionsforgraderinterface, mod_forum {{/str}}"
96             >
97                 {{#pix}} i/menu, core {{/pix}}
98             </button>
99             <div class="dropdown-menu dropdown-menu-right" aria-labelledby="grader-actions-menu-{{uniqid}}">
100                 <button
101                     class="dropdown-item"
102                     type="button"
103                     data-action="togglefullscreen"
104                     type="button"
105                 >
106                     {{#str}} togglefullscreen, mod_forum {{/str}}
107                 </button>
108             </div>
109         </div>
110     </div>
111 </nav>