| Línea 13... |
Línea 13... |
| 13 |
|
13 |
|
| 14 |
You should have received a copy of the GNU General Public License
|
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/>.
|
15 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
| 16 |
}}
|
16 |
}}
|
| 17 |
{{!
|
17 |
{{!
|
| Línea 18... |
Línea 18... |
| 18 |
@template my/dropdown
|
18 |
@template core_my/dropdown
|
| Línea 19... |
Línea 19... |
| 19 |
|
19 |
|
| 20 |
Simple dropdown for the my/courses page
|
20 |
Simple dropdown for the my/courses page.
|
| 21 |
|
21 |
|
| 22 |
Example context (json):
|
22 |
Example context (json):
|
| 23 |
{
|
23 |
{
|
| 24 |
"newcourseurl": "https://moodle.test/course/edit.php?category=1",
|
24 |
"newcourseurl": "https://moodle.test/course/edit.php?category=1",
|
| 25 |
"manageurl": "https://moodle.test/course/management.php?categoryid=1",
|
25 |
"manageurl": "https://moodle.test/course/management.php?categoryid=1",
|
| 26 |
"courserequesturl": "https://moodle.test/course/request.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}}">
|
27 |
}
|
| 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}}
|
28 |
}}
|
| - |
|
29 |
<div class="btn-group{{#manageurl}} course-manage{{/manageurl}}{{#courserequesturl}} course-request{{/courserequesturl}}">
|
| 36 |
<a class="dropdown-item" href="{{newcourseurl}}">{{#str}}newcourse, core{{/str}}</a>
|
30 |
<div class="my-action-buttons my-action-buttons-right">
|
| - |
|
31 |
{{#manageurl}}
|
| 37 |
{{/newcourseurl}}
|
32 |
<form action="{{manageurl}}" method="post" id="managecoursesform">
|
| - |
|
33 |
<button type="submit" class="btn btn-outline-primary m-1 w-100">{{#str}} managecourses {{/str}}</button>
|
| - |
|
34 |
</form>
|
| - |
|
35 |
{{/manageurl}}
|
| - |
|
36 |
{{#newcourseurl}}
|
| - |
|
37 |
<form action="{{newcourseurl}}" method="post" id="newcourseform">
|
| 38 |
{{#manageurl}}
|
38 |
<button type="submit" class="btn btn-primary m-1 w-100">{{#str}} createcourse, block_myoverview {{/str}}</button>
|
| - |
|
39 |
</form>
|
| 39 |
<a class="dropdown-item" href="{{manageurl}}">{{#str}}managecourses, core{{/str}}</a>
|
40 |
{{/newcourseurl}}
|
| - |
|
41 |
{{#courserequesturl}}
|
| 40 |
{{/manageurl}}
|
42 |
<form action="{{courserequesturl}}" method="post" id="courserequestform">
|
| 41 |
{{#courserequesturl}}
|
43 |
<button type="submit" class="btn btn-primary m-1 w-100">{{#str}} requestcourse {{/str}}</button>
|
| 42 |
<a class="dropdown-item" href="{{courserequesturl}}">{{#str}}requestcourse, core{{/str}}</a>
|
44 |
</form>
|