MDL-67586 core_course: Recommended modules frontend
[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}}
806e736a 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="{{componentname}}_{{link}}">
05b27f21 33 <div class="optioninfo w-100" data-region="chooser-option-info-container">
806e736a 34 <a class="d-block" href="{{link}}" title="{{#str}} addnew, moodle, {{title}} {{/str}}" tabindex="-1" data-action="add-chooser-option">
05b27f21 35 <span class="optionicon d-block">
806e736a 36 {{{icon}}}
05b27f21 37 </span>
806e736a 38 <span class="optionname d-block">{{title}}</span>
05b27f21 39 </a>
37cf89b3
P
40 <div class="optionactions btn-group" role="group" data-region="chooser-option-actions-container">
41 <button class="btn btn-icon icon-no-margin icon-size-3 m-0 optionaction" data-action="show-option-summary" tabindex="-1">
05b27f21 42 <span aria-hidden="true">{{#pix}} docs, core {{/pix}}</span>
806e736a 43 <span class="sr-only">{{#str}} informationformodule, core_course, {{title}} {{/str}}</span>
05b27f21
MM
44 </button>
45 </div>
46 </div>
47</div>