1 |
efrain |
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 gradereport_singleview/page_toggler
|
|
|
19 |
|
|
|
20 |
The small selector at the top right of the page to switch between zero states.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"displaylabel": true,
|
|
|
25 |
"userzerolink": "http://foo.bar/gradereport/?userid=25",
|
|
|
26 |
"userselectactive": "false",
|
|
|
27 |
"gradepagepage": "http://foo.bar/gradereport/?userid=25",
|
|
|
28 |
"gradeselectactive": "true"
|
|
|
29 |
}
|
|
|
30 |
}}
|
|
|
31 |
<div class="page-toggler d-block d-sm-flex text-nowrap">
|
|
|
32 |
{{#displaylabel}}
|
|
|
33 |
<label class="my-auto mr-3 label small">{{#str}}viewby, gradereport_singleview{{/str}}</label>
|
|
|
34 |
{{/displaylabel}}
|
|
|
35 |
<div class="btn-group align-items-center" role="group" aria-label="{{#str}}ariareporttype, gradereport_singleview{{/str}}">
|
|
|
36 |
<a href="{{userzerolink}}"
|
|
|
37 |
role="button"
|
|
|
38 |
class="btn btn-sm {{^userselectactive}}btn-outline-secondary{{/userselectactive}} {{#userselectactive}}btn-secondary active{{/userselectactive}}"
|
|
|
39 |
{{#userselectactive}}aria-pressed="true"{{/userselectactive}}
|
|
|
40 |
{{^userselectactive}}aria-pressed="false"{{/userselectactive}}
|
|
|
41 |
>
|
|
|
42 |
{{#str}}users{{/str}}
|
|
|
43 |
</a>
|
|
|
44 |
<a href="{{gradezerolink}}"
|
|
|
45 |
role="button"
|
|
|
46 |
class="btn btn-sm {{^gradeselectactive}}btn-outline-secondary{{/gradeselectactive}} {{#gradeselectactive}}btn-secondary active{{/gradeselectactive}}"
|
|
|
47 |
{{#gradeselectactive}}aria-pressed="true"{{/gradeselectactive}}
|
|
|
48 |
{{^gradeselectactive}}aria-pressed="false"{{/gradeselectactive}}
|
|
|
49 |
>
|
|
|
50 |
{{#str}}gradeitems, grades{{/str}}
|
|
|
51 |
</a>
|
|
|
52 |
</div>
|
|
|
53 |
</div>
|