MDL-68919 theme_boost: prevent nav-tabs collapsing on safari
[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
5fe7bcdb
BB
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}}">
f152b71d 40 <div class="searchcontainer mb-3">
d2695ab2 41 {{>core_course/local/activitychooser/search}}
c58c23d6 42 </div>
5fe7bcdb 43 <div data-region="chooser-container" class="chooser-container">
f9a99e0e 44 <div class="nav nav-tabs flex-shrink-0 z-index-1" id="activities-{{uniqid}}" role="tablist">
9f1bfca2
MG
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>
e146a2ca 58 <a class="nav-item nav-link {{#fallback}}active{{/fallback}} {{^showAll}}d-none{{/showAll}}"
9f1bfca2
MG
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}}"
e146a2ca
MM
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}}"
9f1bfca2
MG
81 >
82 {{#str}} activities, core {{/str}}
83 </a>
e146a2ca
MM
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>
9f1bfca2 110 </div>
5fe7bcdb 111 <div class="tab-content flex-fill border-left border-right border-bottom bg-light" id="tabbed-activities-{{uniqid}}">
f152b71d 112 <div class="tab-pane {{#favouritesFirst}}active{{/favouritesFirst}}" id="starred-{{uniqid}}" data-region="favourites" role="tabpanel" aria-labelledby="starred-tab-{{uniqid}}">
c3686571 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">
d2695ab2 114 {{>core_course/local/activitychooser/favourites}}
f152b71d 115 </div>
c58c23d6 116 </div>
e146a2ca 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}}">
c3686571 118 <div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container">
e146a2ca 119 {{#default}}
d2695ab2 120 {{>core_course/local/activitychooser/item}}
e146a2ca 121 {{/default}}
f152b71d
MG
122 </div>
123 </div>
e146a2ca 124 <div class="tab-pane {{#activitiesFirst}}active{{/activitiesFirst}}" id="activity-{{uniqid}}" data-region="activity" role="tabpanel" aria-labelledby="activity-tab-{{uniqid}}">
c3686571 125 <div class="optionscontainer d-flex flex-wrap p-1 mw-100 position-relative" role="menubar" data-region="chooser-options-container">
e146a2ca 126 {{#activities}}
d2695ab2 127 {{>core_course/local/activitychooser/item}}
e146a2ca
MM
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}}
f152b71d 143 </div>
c58c23d6
MM
144 </div>
145 </div>
05b27f21
MM
146 </div>
147 </div>
148 </div>
149 <div class="carousel-item" data-region="help"></div>
150 </div>
151</div>