MDL-67263 course: Add search functionality in the activity chooser
[moodle.git] / course / templates / chooser_search.mustache
CommitLineData
f152b71d
MG
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/chooser_search
19
20 Chooser search template.
21
22 Example context (json):
23 {}
24}}
25<div class="searchbar input-group" role="search">
26 <label for="searchinput">
27 <span class="sr-only">{{#str}} searchactivities, core {{/str}}</span>
28 </label>
29 <input type="text"
30 data-action="search"
31 id="searchinput"
32 class="form-control form-control-lg searchinput pl-3 pr-0 py-2"
33 placeholder="{{#str}} search, core {{/str}}"
34 name="search"
35 autocomplete="off"
36 >
37 <div class="searchbar-append d-flex px-3">
38 <div class="search-icon">
39 {{#pix}} a/search, core {{/pix}}
40 </div>
41 <div class="clear d-none">
42 <button class="btn p-0" data-action="clearsearch">
43 <span class="d-flex" aria-hidden="true">{{#pix}} e/cancel_solid_circle, core {{/pix}}</span>
44 <span class="sr-only">{{#str}} clearsearch, core {{/str}}</span>
45 </button>
46 </div>
47 </div>
48</div>
49<div class="searchresultscontainer" data-region="search-results-container" hidden="hidden" aria-live="polite">
50</div>