You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
4.3 KiB

{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template format_tiles/icon_picker_modal_body
Icon picker modal template.
The purpose of this template is to render the icons needed for the
modal window allowing the user to select one to be displayed
as the icon for the tile, or the default icon for the course
These are rendered as a hidden div on page load and then added to the
modal when it is later launched from javascript
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* icon_picker_icons - array of all available icons for icon_picker_icon.mustache
* show_photo_button - whether to render a button to link to the photo upload form.
Example context (json):
{
"icon_picker_icons": [],
"icon_picker_photos": [],
"show_photo_button": 1,
"documentationurl": "https://mydocumentationurl.com"
}
}}
{{#photosallowed}}
<ul class="nav nav-pills" role="tablist">
<!-- First the top most node and immediate children -->
<li class="nav-item">
<a class="nav-link active" href="#tileicons" data-toggle="tab" role="tab">{{#str}}tileicons, format_tiles{{/str}}</a>
</li>
<li class="nav-item">
<a class="nav-link" id="launch-photo-library" href="#photolibrary" data-toggle="tab" role="tab">{{#pix}}camera, format_tiles{{/pix}} {{#str}}photolibrary, format_tiles{{/str}}</a>
</li>
<li class="nav-item">
<a class="nav-link" id="phototilebtn" href="#">{{#pix}}cloud-upload, format_tiles{{/pix}}{{#str}}uploadnewphoto, format_tiles{{/str}}</a>
</li>
</ul>
<div class="tab-content mt-5" id="myTabContent">
<div class="tab-pane show active" id="tileicons" role="tabpanel" aria-labelledby="tileicons-tab">
<div class="iconpickerheader">
{{#str}}search{{/str}}
{{#pix}}a/search, core, {{#str}}search{{/str}}{{/pix}}
<input name="{{#str}}search{{/str}}" type="text" class="iconsearch inline" style="width: 20em;">
</div>
<div class="iconpickericons" id="iconpickericons">
{{#icon_picker_icons}}
{{> format_tiles/icon_picker_icon}}
{{/icon_picker_icons}}
</div>
</div>
<div class="tab-pane fade" id="photolibrary" role="tabpanel" aria-labelledby="photolibrary-tab">
{{!Leave blank for now will lazy load from JS if needed}}
<h3>{{#str}}photolibrary, format_tiles{{/str}}</h3>
<div>{{#str}}photolibrary_desc, format_tiles{{/str}}</div>
<div class="iconpickerphotos" id="iconpickerphotos">
<div class="alert alert-warning">{{#str}}none{{/str}}</div>
</div>
</div>
</div>
{{/photosallowed}}
{{^photosallowed}}
<div class="iconpickerheader">
{{#str}}search{{/str}}
{{#pix}}a/search, core, {{#str}}search{{/str}}{{/pix}}
<input name="{{#str}}search{{/str}}" type="text" class="iconsearch inline" style="width: 20em;">
{{#show_photo_button}}
{{/show_photo_button}}
</div>
<div class="iconpickericons" id="iconpickericons">
{{#icon_picker_icons}}
{{> format_tiles/icon_picker_icon}}
{{/icon_picker_icons}}
</div>
{{/photosallowed}}
{{#documentationurl}}
<div>
<a href="{{{documentationurl}}}" target="_blank">
{{#pix}}help, core, {{#str}}documentation, format_tiles{{/str}}{{/pix}}{{#str}}documentation, format_tiles{{/str}}
</a>
</div>
{{/documentationurl}}