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 modifyit under the terms of the GNU General Public License as published bythe 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 ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with Moodle. If not, see <http://www.gnu.org/licenses/>.}}{{!@template core/local/collapsable_sectionStandard collapsible section.Optional blocks:* extraclasses - additional classes.* elementid - optional element id.* titlecontent - the collpasible title content.* sectioncontent - the collapsible content.* extras - custom HTML attributes for the component.* expandlabel - the label for the expand icon.* collapselabel - the label for the collapse icon.Example context (json):{"titlecontent": "New content","sectioncontent": "New content","classes": "someclass","extras": [{"attribute": "data-example","value": "something"}],"open": true,"expandlabel": "Expand","collapselabel": "Collapse","elementid": "someuniqueid"}}}<divclass="collapsable-section mb-3 {{!}} {{$ extraclasses }} {{!}} {{#classes}} {{classes}} {{/classes}} {{!}} {{/ extraclasses }}"id="{{$ elementid }}{{!}}{{#elementid}}collapsable_section_{{elementid}}{{/elementid}}{{!}}{{^elementid}}collapsable_section_{{uniqid}}{{/elementid}}{{!}}{{/ elementid }}_collapsible"><div class="d-flex"><div class="d-flex align-items-center position-relative"><arole="button"data-bs-toggle="collapse"href="#{{$ elementid }}{{!}}{{#elementid}}{{elementid}}{{/elementid}}{{!}}{{^elementid}}collapsable_{{uniqid}}{{/elementid}}{{!}}{{/ elementid }}"{{#open}} aria-expanded="true" {{/open}}{{^open}} aria-expanded="false" {{/open}}aria-controls="{{$ elementid }}{{!}}{{#elementid}}{{elementid}}{{/elementid}}{{!}}{{^elementid}}collapsable_{{uniqid}}{{/elementid}}{{!}}{{/ elementid }}"class="btn btn-icon me-3 icons-collapse-expand justify-content-center {{!}} {{^open}} collapsed {{/open}}"><spanclass="collapsed-icon icon-no-margin p-2"title="{{!}}{{$ expandlabel }}{{!}}{{#expandlabel}}{{expandlabel}}{{/expandlabel}}{{!}}{{^expandlabel}}{{#str}} expand, core {{/str}}{{/expandlabel}}{{!}}{{/ expandlabel }}{{!}}"><span class="dir-rtl-hide">{{#pix}} t/collapsedchevron, core {{/pix}}</span><span class="dir-ltr-hide">{{#pix}} t/collapsedchevron_rtl, core {{/pix}}</span><span class="visually-hidden">{{!}}{{$ expandlabel }}{{!}}{{#expandlabel}}{{expandlabel}}{{/expandlabel}}{{!}}{{^expandlabel}}{{#str}} expand, core {{/str}}{{/expandlabel}}{{!}}{{/ expandlabel }}{{!}}</span></span><spanclass="expanded-icon icon-no-margin p-2"title="{{!}}{{$ collapselabel }}{{!}}{{#collapselabel}}{{collapselabel}}{{/collapselabel}}{{!}}{{^collapselabel}}{{#str}} collapse, core {{/str}}{{/collapselabel}}{{!}}{{/ collapselabel }}{{!}}">{{#pix}} t/expandedchevron, core {{/pix}}<span class="visually-hidden">{{!}}{{$ collapselabel }}{{!}}{{#collapselabel}}{{collapselabel}}{{/collapselabel}}{{!}}{{^collapselabel}}{{#str}} collapse, core {{/str}}{{/collapselabel}}{{!}}{{/ collapselabel }}{{!}}</span></span></a><h3class="d-flex align-self-stretch align-items-center mb-0"id="{{$ elementid }}{{!}}{{#elementid}}collapsable_section_{{elementid}}{{/elementid}}{{!}}{{^elementid}}collapsable_section_{{uniqid}}{{/elementid}}{{!}}{{/ elementid }}_title">{{$ titlecontent }}{{{titlecontent}}}{{/ titlecontent }}</h3></div></div><divid="{{$ elementid }}{{!}}{{#elementid}}{{elementid}}{{/elementid}}{{!}}{{^elementid}}collapsable_{{uniqid}}{{/elementid}}{{!}}{{/ elementid }}"class="content collapse {{#open}}show{{/open}} pt-3"data-mdl-component="core/local/collapsable_section"{{$ extras }}{{#extras}}{{attribute}}="{{value}}"{{/extras}}{{/ extras }}>{{$ sectioncontent }}{{{sectioncontent}}}{{/ sectioncontent }}</div></div>{{#js}}require(['core/local/collapsable_section/controls'], function(Controls) {Controls.init();});{{/js}}