MDL-69111 mod_forum: forum grading on small viewports
[moodle.git] / mod / forum / templates / local / grades / local / grader / navigation.mustache
CommitLineData
bae67469
MM
1{{!
2 This file is part of Moodle - http://moodle.org/
3
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.
8
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.
13
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
19
20 Classes required for JS:
a62c68fb 21 * none
bae67469
MM
22
23 Data attributes required for JS:
a62c68fb
MM
24 * data-action="togglefullscreen"
25 * data-action="closegrader"
26 * data-action="savegrade"
27 * data-action="expandgrader"
bae67469
MM
28
29 Context variables required for this template:
a62c68fb 30 * moduleName: The name of the module this grading interface is for i.e. "Chef the Forum"
bae67469
MM
31
32 Example context (json):
33 {
a62c68fb 34 "moduleName": "Chef the Forum"
bae67469
MM
35 }
36}}
7c3522f9 37<nav id="nav-container-{{uniqid}}" class="grader-grading_navigation navbar px-0 px-sm-3" aria-label="{{#str}} forumgradingnavigation, mod_forum {{/str}}">
4c98e56c
RW
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>
bae67469 49
7c3522f9 50 <div class="ml-1 ml-sm-auto">
4c98e56c
RW
51 <button
52 class="btn btn-icon icon-no-margin drawer-button mr-1 active"
53 data-action="expand-grading-drawer"
17133749 54 aria-controls="grading-drawer-{{uniqid}}"
4c98e56c
RW
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
7c3522f9 63 class="btn btn-icon icon-no-margin drawer-button mr-1 d-none d-sm-inline-block"
a37c40d3 64 aria-label="{{#str}} hidegraderpanel, mod_forum {{/str}}"
4c98e56c 65 data-action="collapse-grading-drawer"
17133749 66 aria-controls="grading-drawer-{{uniqid}}"
4c98e56c
RW
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
7c3522f9 74 class="btn btn-primary font-weight-bold ml-sm-2 px-4"
4c98e56c
RW
75 data-action="savegrade"
76 >
77 {{#str}} save {{/str}}
78 </button>
79 <button
7c3522f9 80 class="btn btn-secondary font-weight-bold ml-1 ml-sm-2 px-4"
4c98e56c
RW
81 aria-label="{{#str}} closegrader, mod_forum {{/str}}"
82 data-action="closegrader"
83 type="button"
84 >
85 {{#str}} close, mod_forum {{/str}}
86 </button>
7c3522f9
BB
87 <div class="btn-group d-none d-sm-inline-block">
88 <button
4c98e56c
RW
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>
bae67469
MM
109 </div>
110 </div>
4c98e56c 111</nav>