Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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
{{!
1441 ariadna 18
    @template core_my/dropdown
1 efrain 19
 
1441 ariadna 20
    Simple dropdown for the my/courses page.
1 efrain 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}}">
1441 ariadna 30
    <div class="my-action-buttons my-action-buttons-right">
31
        {{#manageurl}}
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}}
1 efrain 36
        {{#newcourseurl}}
1441 ariadna 37
            <form action="{{newcourseurl}}" method="post" id="newcourseform">
38
                <button type="submit" class="btn btn-primary m-1 w-100">{{#str}} createcourse, block_myoverview {{/str}}</button>
39
            </form>
1 efrain 40
        {{/newcourseurl}}
41
        {{#courserequesturl}}
1441 ariadna 42
            <form action="{{courserequesturl}}" method="post" id="courserequestform">
43
                <button type="submit" class="btn btn-primary m-1 w-100">{{#str}} requestcourse {{/str}}</button>
44
            </form>
1 efrain 45
        {{/courserequesturl}}
46
    </div>
47
</div>