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
{{!
18
    @template core_course/activity_list
19
 
20
    Displays a list of activities to recommend in the activity chooser.
21
 
22
    No example given as the js will fire and create records from the template library page.
23
}}
24
{{#search}}
25
    <form class="row">
26
        <div class="input-group pt-4 pb-1 col-md-6">
1441 ariadna 27
            <input type="text" name="search" id="search" class="form-control rounded-start" autocomplete="off"
28
                   placeholder="{{#str}}search, core {{/str}}" {{#query}} value="{{query}}" autofocus {{/query}}
29
            >
1 efrain 30
            <label for="search">
1441 ariadna 31
                <span class="visually-hidden">{{#str}} searchactivitiesbyname, course {{/str}}</span>
1 efrain 32
            </label>
1441 ariadna 33
            <button type="submit" class="btn btn-outline-secondary rounded-end">
34
                <i class="icon fa fa-search fa-fw m-0" aria-hidden="true"></i>
35
                <span class="visually-hidden">{{#str}}submitsearch, course {{/str}}</span>
36
            </button>
1 efrain 37
        </div>
38
    </form>
39
    {{#query}}
40
        <div class="pt-1 pb-1">
41
            <span role="alert">{{#str}} searchresults, course, {{searchresultsnumber}} {{/str}}</span>
42
        </div>
43
    {{/query}}
44
{{/search}}
45
{{#categories}}
46
    {{#hascategorydata}}
47
        <h3 class="pt-4">{{categoryname}}</h3>
48
        <table class="table table-striped table-hover">
49
            <thead>
50
                <tr class="d-flex">
51
                    <th scope="col" class="col-7 c0">{{#str}}module, course{{/str}}</th>
52
                    <th scope="col" class="col-5 c1">{{#str}}recommend, course{{/str}}</th>
53
                </tr>
54
            </thead>
55
            <tbody>
56
                {{#categorydata}}
57
                <tr class="d-flex">
58
                    <td class="col-7 c0"><span>{{{icon}}}</span>{{name}}</td>
59
                    {{#id}}
60
                    <td class="col-5 c1 colselect">
61
                    <input class="activity-recommend-checkbox" type="checkbox" aria-label="{{#str}}recommendcheckbox, course, {{name}}{{/str}}" data-area="{{componentname}}" data-id="{{id}}" {{#recommended}}checked="checked"{{/recommended}}  />
62
                    </td>
63
                    {{/id}}
64
                    {{^id}}
65
                    <td class="col-5"></td>
66
                    {{/id}}
67
                </tr>
68
                {{/categorydata}}
69
            </tbody>
70
        </table>
71
    {{/hascategorydata}}
72
{{/categories}}
73
{{#js}}
74
require([
75
    'core_course/recommendations',
76
], function(Recommendations) {
77
    Recommendations.init();
78
});
79
{{/js}}