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 my/dropdown
|
|
|
19 |
|
|
|
20 |
Simple dropdown for the my/courses page
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"newcourseurl": "https://moodle.test/course/edit.php?category=1",
|
|
|
25 |
"manageurl": "https://moodle.test/course/management.php?categoryid=1",
|
|
|
26 |
"courserequesturl": "https://moodle.test/course/request.php?categoryid=1"
|
|
|
27 |
}
|
|
|
28 |
}}
|
|
|
29 |
<div class="btn-group{{#manageurl}} course-manage{{/manageurl}}{{#courserequesturl}} course-request{{/courserequesturl}}">
|
|
|
30 |
<!-- Set as a link to appease BrowserKit behat. -->
|
|
|
31 |
<a href="#" class="btn btn-link btn-icon icon-size-3 rounded-circle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{#str}}coursemanagementoptions, my{{/str}}">
|
|
|
32 |
<i class="fa fa-ellipsis-v text-dark py-2" aria-hidden="true"></i>
|
|
|
33 |
</a>
|
|
|
34 |
<div class="dropdown-menu dropdown-menu-right">
|
|
|
35 |
{{#newcourseurl}}
|
|
|
36 |
<a class="dropdown-item" href="{{newcourseurl}}">{{#str}}newcourse, core{{/str}}</a>
|
|
|
37 |
{{/newcourseurl}}
|
|
|
38 |
{{#manageurl}}
|
|
|
39 |
<a class="dropdown-item" href="{{manageurl}}">{{#str}}managecourses, core{{/str}}</a>
|
|
|
40 |
{{/manageurl}}
|
|
|
41 |
{{#courserequesturl}}
|
|
|
42 |
<a class="dropdown-item" href="{{courserequesturl}}">{{#str}}requestcourse, core{{/str}}</a>
|
|
|
43 |
{{/courserequesturl}}
|
|
|
44 |
</div>
|
|
|
45 |
</div>
|