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
|
|
|
19 |
|
|
|
20 |
Chooser dialog template.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"title": "Chooser title",
|
|
|
25 |
"options": {
|
|
|
26 |
"label": "Option name",
|
|
|
27 |
"description": "Option description",
|
|
|
28 |
"urls": {
|
|
|
29 |
"addoption": "http://addoptionurl.com"
|
|
|
30 |
},
|
|
|
31 |
"icon": "<img class='icon' src='http://urltooptionicon'>"
|
|
|
32 |
}
|
|
|
33 |
}
|
|
|
34 |
}}
|
|
|
35 |
|
|
|
36 |
<div data-region="carousel" class="carousel slide d-flex flex-fill">
|
|
|
37 |
<div class="carousel-inner d-flex flex-fill" aria-live="polite">
|
|
|
38 |
<div class="carousel-item p-3 active" data-region="modules">
|
|
|
39 |
<div class="modchoosercontainer d-flex flex-column flex-fill" aria-label="{{#str}} activitymodules, core {{/str}}">
|
|
|
40 |
<div class="searchcontainer mb-3">
|
|
|
41 |
{{>core_course/local/activitychooser/search}}
|
|
|
42 |
</div>
|
|
|
43 |
<div data-region="chooser-container" class="chooser-container">
|
|
|
44 |
<div class="nav nav-tabs flex-shrink-0 z-index-1" id="activities-{{uniqid}}" role="tablist">
|
|
|
45 |
<a class="nav-item nav-link {{#favouritesFirst}}active{{/favouritesFirst}} {{^favourites}}d-none{{/favourites}}"
|
|
|
46 |
id="starred-tab-{{uniqid}}"
|
|
|
47 |
data-toggle="tab"
|
|
|
48 |
data-region="favourite-tab-nav"
|
|
|
49 |
href="#starred-{{uniqid}}"
|
|
|
50 |
role="tab"
|
|
|
51 |
aria-label="{{#str}} aria:favouritestab, core_course {{/str}}"
|
|
|
52 |
aria-controls="starred-{{uniqid}}"
|
|
|
53 |
aria-selected="{{#favouritesFirst}}true{{/favouritesFirst}}{{^favouritesFirst}}false{{/favouritesFirst}}"
|
|
|
54 |
tabindex="{{#favouritesFirst}}0{{/favouritesFirst}}{{^favouritesFirst}}-1{{/favouritesFirst}}"
|
|
|
55 |
>
|
|
|
56 |
{{#str}} favourites, core {{/str}}
|
|
|
57 |
</a>
|
|
|
58 |
<a class="nav-item nav-link {{#fallback}}active{{/fallback}} {{^showAll}}d-none{{/showAll}}"
|
|
|
59 |
id="all-tab-{{uniqid}}"
|
|
|
60 |
data-toggle="tab"
|
|
|
61 |
data-region="default-tab-nav"
|
|
|
62 |
href="#all-{{uniqid}}"
|
|
|
63 |
role="tab"
|
|
|
64 |
aria-label="{{#str}} aria:defaulttab, core_course {{/str}}"
|
|
|
65 |
aria-controls="all-{{uniqid}}"
|
|
|
66 |
aria-selected="{{#fallback}}true{{/fallback}}{{^fallback}}false{{/fallback}}"
|
|
|
67 |
tabindex="{{#fallback}}0{{/fallback}}{{^fallback}}-1{{/fallback}}"
|
|
|
68 |
>
|
|
|
69 |
{{#str}} all, core {{/str}}
|
|
|
70 |
</a>
|
|
|
71 |
<a class="nav-item nav-link {{#activitiesFirst}}active{{/activitiesFirst}} {{^showActivities}}d-none{{/showActivities}}"
|
|
|
72 |
id="activity-tab-{{uniqid}}"
|
|
|
73 |
data-toggle="tab"
|
|
|
74 |
data-region="activity-tab-nav"
|
|
|
75 |
href="#activity-{{uniqid}}"
|
|
|
76 |
role="tab"
|
|
|
77 |
aria-label="{{#str}} activities, core {{/str}}"
|
|
|
78 |
aria-controls="activity-{{uniqid}}"
|
|
|
79 |
aria-selected="{{#activitiesFirst}}true{{/activitiesFirst}}{{^activitiesFirst}}false{{/activitiesFirst}}"
|
|
|
80 |
tabindex="{{#activitiesFirst}}0{{/activitiesFirst}}{{^activitiesFirst}}-1{{/activitiesFirst}}"
|
|
|
81 |
>
|
|
|
82 |
{{#str}} activities, core {{/str}}
|
|
|
83 |
</a>
|
|
|
84 |
<a class="nav-item nav-link {{^showResources}}d-none{{/showResources}}"
|
|
|
85 |
id="resources-tab-{{uniqid}}"
|
|
|
86 |
data-toggle="tab"
|
|
|
87 |
data-region="resources-tab-nav"
|
|
|
88 |
href="#resources-{{uniqid}}"
|
|
|
89 |
role="tab"
|
|
|
90 |
aria-label="{{#str}} resources, core {{/str}}"
|
|
|
91 |
aria-controls="resources-{{uniqid}}"
|
|
|
92 |
aria-selected="false"
|
|
|
93 |
tabindex="-1"
|
|
|
94 |
>
|
|
|
95 |
{{#str}} resources, core {{/str}}
|
|
|
96 |
</a>
|
|
|
97 |
<a class="nav-item nav-link {{^recommended}}d-none{{/recommended}}"
|
|
|
98 |
id="recommended-tab-{{uniqid}}"
|
|
|
99 |
data-region="recommended-tab-nav"
|
|
|
100 |
data-toggle="tab"
|
|
|
101 |
href="#recommended-{{uniqid}}"
|
|
|
102 |
role="tab"
|
|
|
103 |
aria-label="{{#str}} aria:recommendedtab, core_course {{/str}}"
|
|
|
104 |
aria-controls="recommended-{{uniqid}}"
|
|
|
105 |
aria-selected="false"
|
|
|
106 |
tabindex="-1"
|
|
|
107 |
>
|
|
|
108 |
{{#str}} recommended, core {{/str}}
|
|
|
109 |
</a>
|
|
|
110 |
</div>
|
|
|
111 |
<div class="rui-activitychooser-bg tab-content flex-fill mt-1" id="tabbed-activities-{{uniqid}}">
|
|
|
112 |
<div class="tab-pane {{#favouritesFirst}}active{{/favouritesFirst}}" id="starred-{{uniqid}}" data-region="favourites" role="tabpanel" aria-labelledby="starred-tab-{{uniqid}}">
|
|
|
113 |
<div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container" data-render="favourites-area">
|
|
|
114 |
{{>core_course/local/activitychooser/favourites}}
|
|
|
115 |
</div>
|
|
|
116 |
</div>
|
|
|
117 |
<div class="tab-pane {{#fallback}}active{{/fallback}} {{^showAll}}d-none{{/showAll}}" id="all-{{uniqid}}" data-region="default" role="tabpanel" aria-labelledby="all-tab-{{uniqid}}">
|
|
|
118 |
<div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container">
|
|
|
119 |
{{#default}}
|
|
|
120 |
{{>core_course/local/activitychooser/item}}
|
|
|
121 |
{{/default}}
|
|
|
122 |
</div>
|
|
|
123 |
</div>
|
|
|
124 |
<div class="tab-pane {{#activitiesFirst}}active{{/activitiesFirst}}" id="activity-{{uniqid}}" data-region="activity" role="tabpanel" aria-labelledby="activity-tab-{{uniqid}}">
|
|
|
125 |
<div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container">
|
|
|
126 |
{{#activities}}
|
|
|
127 |
{{>core_course/local/activitychooser/item}}
|
|
|
128 |
{{/activities}}
|
|
|
129 |
</div>
|
|
|
130 |
</div>
|
|
|
131 |
<div class="tab-pane" id="resources-{{uniqid}}" data-region="resources" role="tabpanel" aria-labelledby="resources-tab-{{uniqid}}">
|
|
|
132 |
<div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container">
|
|
|
133 |
{{#resources}}
|
|
|
134 |
{{>core_course/local/activitychooser/item}}
|
|
|
135 |
{{/resources}}
|
|
|
136 |
</div>
|
|
|
137 |
</div>
|
|
|
138 |
<div class="tab-pane" id="recommended-{{uniqid}}" data-region="recommended" role="tabpanel" aria-labelledby="recommended-tab-{{uniqid}}">
|
|
|
139 |
<div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container">
|
|
|
140 |
{{#recommended}}
|
|
|
141 |
{{>core_course/local/activitychooser/item}}
|
|
|
142 |
{{/recommended}}
|
|
|
143 |
</div>
|
|
|
144 |
</div>
|
|
|
145 |
</div>
|
|
|
146 |
</div>
|
|
|
147 |
</div>
|
|
|
148 |
</div>
|
|
|
149 |
<div class="carousel-item" data-region="help"></div>
|
|
|
150 |
<!--The following div is used as a place for additional plugins to have widgets in the chooser.-->
|
|
|
151 |
<div class="carousel-item" data-region="pluginCarousel"></div>
|
|
|
152 |
</div>
|
|
|
153 |
</div>
|