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 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="{{title}}" class="option border-0 card m-1" data-region="chooser-option-container" data-internal="{{name}}" data-modname="{{componentname}}_{{link}}">
|
|
|
33 |
<div class="optioninfo p-2 d-inline-flex align-items-center justify-content-between" data-region="chooser-option-info-container">
|
|
|
34 |
<a class="d-inline-flex align-items-center" href="{{link}}" title="{{#str}} addnew, moodle, {{title}} {{/str}}" tabindex="-1" data-action="add-chooser-option">
|
|
|
35 |
<div class="rui-optionicon optionicon activityiconcontainer {{purpose}}">
|
|
|
36 |
{{{icon}}}
|
|
|
37 |
</div>
|
|
|
38 |
<div class="rui-optionname clamp-2">{{title}}</div>
|
|
|
39 |
</a>
|
|
|
40 |
<div class="optionactions d-flex justify-content-center" role="group" data-region="chooser-option-actions-container">
|
|
|
41 |
{{^legacyitem}}
|
|
|
42 |
<button class="btn btn-sm btn-link btn-icon--xs icon-no-margin optionaction {{#favourite}}text-primary{{/favourite}}{{^favourite}}text-muted{{/favourite}}"
|
|
|
43 |
data-action="manage-module-favourite"
|
|
|
44 |
data-favourited="{{favourite}}"
|
|
|
45 |
data-id="{{id}}"
|
|
|
46 |
data-name="{{componentname}}"
|
|
|
47 |
data-internal="{{name}}"
|
|
|
48 |
{{^favourite}}
|
|
|
49 |
aria-pressed="false"
|
|
|
50 |
{{/favourite}}
|
|
|
51 |
{{#favourite}}
|
|
|
52 |
aria-pressed="true"
|
|
|
53 |
{{/favourite}}
|
|
|
54 |
aria-label="{{#str}} aria:modulefavourite, core_course, {{title}} {{/str}}"
|
|
|
55 |
tabindex="-1"
|
|
|
56 |
>
|
|
|
57 |
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
58 |
<path d="M12 4.75V19.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
59 |
<path d="M18.2501 8.74994L5.75 15.2501" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
60 |
<path d="M18.2498 15.2503L5.74976 8.75012" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
61 |
</svg>
|
|
|
62 |
</button>
|
|
|
63 |
{{/legacyitem}}
|
|
|
64 |
<button class="btn btn-sm btn-icon--xs btn-link icon-no-margin optionaction ml-1" data-action="show-option-summary" tabindex="-1">
|
|
|
65 |
<svg width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
|
66 |
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 13V15"></path>
|
|
|
67 |
<circle cx="12" cy="9" r="1" fill="currentColor"></circle>
|
|
|
68 |
<circle cx="12" cy="12" r="7.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle>
|
|
|
69 |
</svg>
|
|
|
70 |
<span class="sr-only">{{#str}} informationformodule, core_course, {{title}} {{/str}}</span>
|
|
|
71 |
</button>
|
|
|
72 |
</div>
|
|
|
73 |
</div>
|
|
|
74 |
</div>
|