Select Git revision
Vagrantfile
imagearea.mustache 1.71 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 theme_boost_campus/imagearea
Boost_campus imagearea layout template.
Context variables required for this template:
* hasimagearea - true if images have been uploaded.
* imageareafiles - array of uploaded images.
* linkpath - true if image has a link defined in setting imageareaitemslink.
* filepath - the path where the uploaded image is stored.
* alttext - the text that will be set for the alt attribute of an image, if set
Example context (json):
{
"hasimagearea": true,
"imageareafiles": {
"filepath": "/pix/moodlelogo.png",
"linkpath": "http://moodle.org",
"alttext": "Moodle logo"
}
}
}}
{{#hasimagearea}}
<div class="imagearea d-flex justify-content-center flex-wrap pb-3 bg-dark">
{{#imageareafiles}}
{{#linkpath}}<a href="{{linkpath}}">{{/linkpath}}<img src="{{filepath}}" class="mt-3" {{#alttext}} alt="{{alttext}}"{{/alttext}}>{{#linkpath}}</a>{{/linkpath}}
{{/imageareafiles}}
</div>
{{/hasimagearea}}