weekly release 3.9dev+
[moodle.git] / course / templates / activitychooser.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
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}}
f152b71d 35
05b27f21
MM
36<div data-region="carousel" class="carousel slide">
37 <div class="carousel-inner" aria-live="polite">
c3686571 38 <div class="carousel-item px-4 py-3 active" data-region="modules">
f152b71d
MG
39 <div class="modchoosercontainer" aria-label="{{#str}} activitymodules, core {{/str}}">
40 <div class="searchcontainer mb-3">
d2695ab2 41 {{>core_course/local/activitychooser/search}}
c58c23d6 42 </div>
f152b71d 43 <div data-region="chooser-container">
9f1bfca2
MG
44 <div class="nav nav-tabs mb-3" 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 {{#recommendedFirst}}active{{/recommendedFirst}} {{^recommended}}d-none{{/recommended}}"
59 id="recommended-tab-{{uniqid}}"
60 data-region="recommended-tab-nav"
61 data-toggle="tab"
62 href="#recommended-{{uniqid}}"
63 role="tab"
64 aria-label="{{#str}} aria:recommendedtab, core_course {{/str}}"
65 aria-controls="recommended-{{uniqid}}"
66 aria-selected="{{#recommendedFirst}}true{{/recommendedFirst}}{{^recommendedFirst}}false{{/recommendedFirst}}"
67 tabindex="{{#recommendedFirst}}0{{/recommendedFirst}}{{^recommendedFirst}}-1{{/recommendedFirst}}"
68 >
69 {{#str}} recommended, core {{/str}}
70 </a>
71 <a class="nav-item nav-link {{#fallback}}active{{/fallback}}"
72 id="all-tab-{{uniqid}}"
73 data-toggle="tab"
74 data-region="default-tab-nav"
75 href="#all-{{uniqid}}"
76 role="tab"
77 aria-label="{{#str}} aria:defaulttab, core_course {{/str}}"
78 aria-controls="all-{{uniqid}}"
79 aria-selected="{{#fallback}}true{{/fallback}}{{^fallback}}false{{/fallback}}"
80 tabindex="{{#fallback}}0{{/fallback}}{{^fallback}}-1{{/fallback}}"
81 >
82 {{#str}} activities, core {{/str}}
83 </a>
84 </div>
f152b71d
MG
85 <div class="tab-content" id="tabbed-activities-{{uniqid}}">
86 <div class="tab-pane {{#favouritesFirst}}active{{/favouritesFirst}}" id="starred-{{uniqid}}" data-region="favourites" role="tabpanel" aria-labelledby="starred-tab-{{uniqid}}">
c3686571 87 <div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container" data-render="favourites-area">
d2695ab2 88 {{>core_course/local/activitychooser/favourites}}
f152b71d 89 </div>
c58c23d6 90 </div>
f152b71d 91 <div class="tab-pane {{#recommendedFirst}}active{{/recommendedFirst}}" id="recommended-{{uniqid}}" data-region="recommended" role="tabpanel" aria-labelledby="recommended-tab-{{uniqid}}">
c3686571 92 <div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container">
f152b71d 93 {{#recommended}}
d2695ab2 94 {{>core_course/local/activitychooser/item}}
f152b71d
MG
95 {{/recommended}}
96 </div>
97 </div>
98 <div class="tab-pane {{#fallback}}active{{/fallback}}" id="all-{{uniqid}}" data-region="default" role="tabpanel" aria-labelledby="all-tab-{{uniqid}}">
c3686571 99 <div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container">
f152b71d 100 {{#default}}
d2695ab2 101 {{>core_course/local/activitychooser/item}}
f152b71d
MG
102 {{/default}}
103 </div>
c58c23d6
MM
104 </div>
105 </div>
05b27f21
MM
106 </div>
107 </div>
108 </div>
109 <div class="carousel-item" data-region="help"></div>
110 </div>
111</div>