2 This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
18 @template tool_templatelibrary/list_templates_page
20 Moodle template to the template library
22 The purpose of this template is build the entire page for the template library (by including smaller templates).
24 Classes required for JS:
27 Data attributes required for JS:
28 * data-region, data-field
30 Context variables required for this template:
31 * allcomponents - array of components containing templates. Each component has a name and a component attribute.
35 This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
51 @template tool_templatelibrary/list_templates_page
53 Moodle template to the template library
55 The purpose of this template is build the entire page for the template library (by including smaller templates).
57 Classes required for JS:
60 Data attributes required for JS:
61 * data-region, data-field
63 Context variables required for this template:
64 * allcomponents - array of components containing templates. Each component has a name and a component attribute.
67 <div data-region="list-templates">
68 <form class="form-horizontal">
69 {{< core_form/element-template }}
71 <div class="col-form-label">{{#str}}component, tool_templatelibrary{{/str}}</div>
75 <select id="selectcomponent" name="component" class="form-control" data-field="component">
76 <option value="">{{#str}}all, tool_templatelibrary{{/str}}</option>
78 <option value="{{component}}" {{#selected}}selected{{/selected}}>{{name}}</option>
82 {{/ core_form/element-template }}
84 {{< core_form/element-template }}
86 {{< core/search_input_auto }}
88 {{#str}} search, tool_templatelibrary {{/str}}
90 {{$value}}{{ search }}{{/value}}
91 {{/ core/search_input_auto }}
93 {{/ core_form/element-template }}
96 {{> tool_templatelibrary/search_results }}
99 {{> tool_templatelibrary/display_template }}
103 require(['tool_templatelibrary/search', 'tool_templatelibrary/display']);