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 tool_templatelibrary/list_templates_page
|
|
|
19 |
|
|
|
20 |
Moodle template to the template library
|
|
|
21 |
|
|
|
22 |
The purpose of this template is build the entire page for the template library (by including smaller templates).
|
|
|
23 |
|
|
|
24 |
Classes required for JS:
|
|
|
25 |
* none
|
|
|
26 |
|
|
|
27 |
Data attributes required for JS:
|
|
|
28 |
* data-region, data-field
|
|
|
29 |
|
|
|
30 |
Context variables required for this template:
|
|
|
31 |
* allcomponents - array of components containing templates. Each component has a name and a component attribute.
|
|
|
32 |
|
|
|
33 |
}}
|
|
|
34 |
{{!
|
|
|
35 |
This file is part of Moodle - http://moodle.org/
|
|
|
36 |
|
|
|
37 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
38 |
it under the terms of the GNU General Public License as published by
|
|
|
39 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
40 |
(at your option) any later version.
|
|
|
41 |
|
|
|
42 |
Moodle is distributed in the hope that it will be useful,
|
|
|
43 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
44 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
45 |
GNU General Public License for more details.
|
|
|
46 |
|
|
|
47 |
You should have received a copy of the GNU General Public License
|
|
|
48 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
49 |
}}
|
|
|
50 |
{{!
|
|
|
51 |
@template tool_templatelibrary/list_templates_page
|
|
|
52 |
|
|
|
53 |
Moodle template to the template library
|
|
|
54 |
|
|
|
55 |
The purpose of this template is build the entire page for the template library (by including smaller templates).
|
|
|
56 |
|
|
|
57 |
Classes required for JS:
|
|
|
58 |
* none
|
|
|
59 |
|
|
|
60 |
Data attributes required for JS:
|
|
|
61 |
* data-region, data-field
|
|
|
62 |
|
|
|
63 |
Context variables required for this template:
|
|
|
64 |
* allcomponents - array of components containing templates. Each component has a name and a component attribute.
|
|
|
65 |
|
|
|
66 |
}}
|
|
|
67 |
<div data-region="list-templates">
|
|
|
68 |
<form class="form-horizontal">
|
|
|
69 |
{{< core_form/element-template }}
|
|
|
70 |
{{$label}}
|
|
|
71 |
<div class="col-form-label">{{#str}}component, tool_templatelibrary{{/str}}</div>
|
|
|
72 |
{{/label}}
|
|
|
73 |
|
|
|
74 |
{{$element}}
|
|
|
75 |
<select id="selectcomponent" name="component" class="form-control custom-select" data-field="component">
|
|
|
76 |
<option value="">{{#str}}all, tool_templatelibrary{{/str}}</option>
|
|
|
77 |
{{#allcomponents}}
|
|
|
78 |
<option value="{{component}}" {{#selected}}selected{{/selected}}>{{name}}</option>
|
|
|
79 |
{{/allcomponents}}
|
|
|
80 |
</select>
|
|
|
81 |
{{/element}}
|
|
|
82 |
{{/ core_form/element-template }}
|
|
|
83 |
|
|
|
84 |
{{< core_form/element-template }}
|
|
|
85 |
{{$element}}
|
|
|
86 |
{{< core/search_input_auto }}
|
|
|
87 |
{{$label}}
|
|
|
88 |
{{#str}} search, tool_templatelibrary {{/str}}
|
|
|
89 |
{{/label}}
|
|
|
90 |
{{$value}}{{ search }}{{/value}}
|
|
|
91 |
{{/ core/search_input_auto }}
|
|
|
92 |
{{/element}}
|
|
|
93 |
{{/ core_form/element-template }}
|
|
|
94 |
</form>
|
|
|
95 |
|
|
|
96 |
{{> tool_templatelibrary/search_results }}
|
|
|
97 |
|
|
|
98 |
{{> tool_templatelibrary/display_template }}
|
|
|
99 |
|
|
|
100 |
</div>
|
|
|
101 |
{{#js}}
|
|
|
102 |
require(['tool_templatelibrary/search', 'tool_templatelibrary/display']);
|
|
|
103 |
{{/js}}
|