AutorÃa | Ultima modificación | Ver Log |
{{!
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 block_multiblock/accordion-bootstrap3
This template shows the multiple blocks in an accordion
Example context (json):
{
"multiblockid": 28,
"multiblock": [
{
"id": 1,
"title": "Block 1",
"content": "<p>Block 1</p>",
"footer": "My footer",
"active": true
},
{
"id": 2,
"title": "Block 2",
"content": "<p>Block 2</p>",
"footer": "",
"active": false
}
]
}
}}
<div class="multiblock multiblock-accordion panel-group" role="tablist" id="multiblock-{{multiblockid}}">
{{#multiblock}}
<div class="panel panel-default">
<div class="panel-heading" id="multiblock-container-{{multiblockid}}-{{id}}" role="tab">
<h5 class="panel-title">
<a class="{{^active}} collapsed{{/active}}" data-toggle="collapse" data-target="#multiblock-content-{{multiblockid}}-{{id}}" aria-expanded="{{#active}}true{{/active}}{{^active}}false{{/active}}" aria-controls="multiblock-content-{{multiblockid}}-{{id}}" role="button">{{{title}}}</a>
</h5>
</div>
<div id="multiblock-content-{{multiblockid}}-{{id}}" class="panel-collapse collapse{{#active}} in{{/active}}" role="tabpanel" aria-labelledby="multiblock-container-{{multiblockid}}-{{id}}" data-parent="#multiblock-{{multiblockid}}">
<div class="panel-body {{class}}">
{{{content}}}
<div class="footer">{{{footer}}}</div>
{{{annotation}}}
</div>
</div>
</div>
{{/multiblock}}
</div>