MDL-67585 core_course: new web service to return course content items
[moodle.git] / course / templates / chooser_item.mustache
CommitLineData
05b27f21
MM
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_item
19
20 Chooser item template.
21
22 Example context (json):
23 {
24 "label": "Option name",
25 "description": "Option description",
26 "urls": {
27 "addoption": "http://addoptionurl.com"
28 },
29 "icon": "<img class='icon' src='http://urltooptionicon'>"
30 }
31}}
32<div role="menuitem" tabindex="-1" aria-label="{{label}}" class="option d-block text-center py-3 px-2" data-region="chooser-option-container" data-modname="{{modulename}}">
33 <div class="optioninfo w-100" data-region="chooser-option-info-container">
37cf89b3 34 <a class="d-block" href="{{urls.addoption}}" title="{{#str}} addnew, moodle, {{label}} {{/str}}" tabindex="-1" data-action="add-chooser-option">
05b27f21
MM
35 <span class="optionicon d-block">
36 {{#icon}}
37 {{>core/pix_icon}}
38 {{/icon}}
39 </span>
40 <span class="optionname d-block">{{label}}</span>
41 </a>
37cf89b3
P
42 <div class="optionactions btn-group" role="group" data-region="chooser-option-actions-container">
43 <button class="btn btn-icon icon-no-margin icon-size-3 m-0 optionaction" data-action="show-option-summary" tabindex="-1">
05b27f21 44 <span aria-hidden="true">{{#pix}} docs, core {{/pix}}</span>
37cf89b3 45 <span class="sr-only">{{#str}} informationformodule, core_course, {{label}} {{/str}}</span>
05b27f21
MM
46 </button>
47 </div>
48 </div>
49</div>