MDL-64743 block_myoverview: Remove icons in context menu
[moodle.git] / blocks / myoverview / templates / course-action-menu.mustache
CommitLineData
3cfff885
BB
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 block_myoverview/course-action-menu
19
20 This template renders action menu for each course.
21
22 Example context (json):
23 {
24 "isfavourite": true
25 }
26}}
27<div class="ml-auto dropdown">
28 <button class="btn btn-link btn-icon icon-size-3 coursemenubtn"
29 type="button"
30 data-toggle="dropdown"
31 aria-haspopup="true"
32 aria-expanded="false">
33 {{#pix}} i/moremenu, core {{/pix}}
34 <span class="sr-only">
35 {{#str}} aria:courseactions, block_myoverview {{/str}} {{{fullname}}}
36 </span>
37 </button>
4fd6b770 38 <div class="dropdown-menu dropdown-menu-right">
3cfff885
BB
39 <a class="dropdown-item {{#isfavourite}}hidden{{/isfavourite}}" href="#"
40 data-action="add-favourite"
41 data-course-id="{{id}}"
f87181fd 42 aria-controls="favorite-icon-{{ id }}-{{ uniqid }}"
3cfff885 43 >
3cfff885
BB
44 {{#str}} addtofavourites, block_myoverview {{/str}}
45 <div class="sr-only">
46 {{#str}} aria:addtofavourites, block_myoverview {{/str}} {{{fullname}}}
47 </div>
48 </a>
49 <a class="dropdown-item {{^isfavourite}}hidden{{/isfavourite}}" href="#"
50 data-action="remove-favourite"
51 data-course-id="{{id}}"
f87181fd 52 aria-controls="favorite-icon-{{ id }}-{{ uniqid }}"
3cfff885
BB
53 >
54 {{#str}} removefromfavourites, block_myoverview {{/str}}
55 <div class="sr-only">
56 {{#str}} aria:removefromfavourites, block_myoverview {{/str}} {{{fullname}}}
57 </div>
58 </a>
e6f03948
P
59 <a class="dropdown-item {{^hidden}}hidden{{/hidden}}" href="#"
60 data-action="show-course"
61 data-course-id="{{id}}"
f87181fd 62 aria-controls="favorite-icon-{{ id }}-{{ uniqid }}"
e6f03948 63 >
e6f03948
P
64 {{#str}} show, block_myoverview {{/str}}
65 <div class="sr-only">
66 {{#str}} aria:showcourse, block_myoverview, {{fullname}} {{/str}}
67 </div>
68 </a>
69 <a class="dropdown-item {{#hidden}}hidden{{/hidden}}" href="#"
70 data-action="hide-course"
71 data-course-id="{{id}}"
f87181fd 72 aria-controls="favorite-icon-{{ id }}-{{ uniqid }}"
e6f03948 73 >
e6f03948
P
74 {{#str}} hidecourse, block_myoverview {{/str}}
75 <div class="sr-only">
76 {{#str}} aria:hidecourse, block_myoverview, {{fullname}} {{/str}}
77 </div>
78 </a>
3cfff885
BB
79 </div>
80</div>