MDL-63863 block_myoverview: remove superfluous div
[moodle.git] / theme / bootstrapbase / templates / block_myoverview / 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 {
e6f03948
P
24 "isfavourite": true,
25 "hidden": true
3cfff885
BB
26 }
27}}
28<div class="ml-auto dropdown">
29 <button class="btn btn-link btn-icon icon-size-3 coursemenubtn"
30 type="button"
31 data-toggle="dropdown"
32 aria-haspopup="true"
33 aria-expanded="false"
34 aria-label="{{#str}} aria:courseactions, block_myoverview {{/str}}">
35 {{#pix}} i/moremenu, core {{/pix}}
36 </button>
4edd1bb0
BB
37 <ul class="dropdown-menu pull-right">
38 <li class="{{#isfavourite}}hidden{{/isfavourite}}" data-action="add-favourite" data-course-id="{{id}}">
39 <a class="dropdown-item p-x-1" href="#">
40 {{#pix}} i/star, core, {{#str}} starred, block_myoverview {{/str}} {{/pix}}
41 {{#str}} addtofavourites, block_myoverview {{/str}}
42 </a>
43 </li>
44 <li class="{{^isfavourite}}hidden{{/isfavourite}}" data-action="remove-favourite" data-course-id="{{id}}">
45 <a class="dropdown-item p-x-1" href="#">
46 {{#str}} removefromfavourites, block_myoverview {{/str}}
47 </a>
48 </li>
49 <li class="{{^hidden}}hidden{{/hidden}}" data-action="show-course" data-course-id="{{id}}">
50 <a class="dropdown-item p-x-1" href="#">
51 {{#pix}} i/show, core, {{#str}} hidden, block_myoverview {{/str}} {{/pix}}
52 {{#str}} show, block_myoverview {{/str}}
53 </a>
54 </li>
55 <li class="{{#hidden}}hidden{{/hidden}}" data-action="hide-course" data-course-id="{{id}}">
56 <a class="dropdown-item p-x-1" href="#">
57 {{#pix}} i/hide, core, {{#str}} hidden, block_myoverview {{/str}} {{/pix}}
58 {{#str}} hidecourse, block_myoverview {{/str}}
59 </a>
60 </li>
61 </ul>
3cfff885 62</div>