Proyectos de Subversion Moodle

Rev

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/tabbed-list

    This template shows the multiple blocks in a tabbed view

    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-tabbed-list">
    <ul class="nav nav-tabs" id="multiblock-container-{{multiblockid}}" role="tablist">
        {{#multiblock}}
            {{#is_odd}}
                <li role="presentation"{{#active}} class="active"{{/active}}>
                    <a id="multiblock-tab-{{multiblockid}}-{{id}}" data-toggle="tab" href="#multiblock-{{multiblockid}}-{{id}}" role="tab" aria-controls="multiblock-tab-{{multiblockid}}-{{id}}" aria-selected="{{#active}}true{{/active}}{{^active}}false{{/active}}">{{{title}}}</a>
                </li>
            {{/is_odd}}
        {{/multiblock}}
    </ul>
    <div class="tab-content" id="multiblock-content-{{multiblockid}}">
        <div>
            <div>
                {{#multiblock}}
                    {{#is_odd}}
                        </div>
                        </div>
                        <div class="tab-pane fade{{#active}} in active{{/active}}" id="multiblock-{{multiblockid}}-{{id}}" role="tabpanel" aria-labelledby="multiblock-tab-{{multiblockid}}-{{id}}">
                        <div class="multiblock-columns-2 multiblock-columns-2-66-33 row">
                    {{/is_odd}}
                        <div class="{{#is_odd}}col-md-8{{/is_odd}}{{^is_odd}}col-md-4{{/is_odd}}">
                            <div id="inst{{id}}" class="block block_{{type}} card mx-3 mb-3 h-100">
                                <div class="card-body p-3">
                                    <div class="card-text content{{#title}} mt-3{{/title}}">
                                        {{{content}}}
                                        <div class="footer">{{{footer}}}</div>
                                        {{{annotation}}}
                                    </div>
                                </div>
                            </div>
                        </div>
                {{/multiblock}}
            </div>
        </div>
    </div>
</div>