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 unilabeltype_topicteaser/grid
    Template to show a bootstrap modal dialog.

    Example context (json):
    {
        "title": "TEST copy 1",
        "showintro": false,
        "intro": "",
        "interval": "5",
        "height": 300,
        "items": [
            {
                "name": "Topic 1",
                "section": "1",
                "viewurl": "https://url-to-view",
                "summary": "",
                "cmlist": "<ul class=\"section img-text\"><\/ul>",
                "nr": 0,
                "first": true
            },
            {
                "name": "Topic 2",
                "section": "2",
                "viewurl": "https://url-to-view",
                "summary": "",
                "cmlist": "<ul class=\"section img-text\"><\/ul>",
                "nr": 1
            }
        ],
        "hasitems": true,
        "openmodal": true,
        "opencourseurl": false,
        "cmid": "55"
    }
}}

{{> unilabeltype_topicteaser/intro }}
{{#hasitems}}
    <div class="row mx-0">
        {{#items}}
            <div class="text-center {{{colclasses}}}">
                <!-- The overlay is used as button to show the modal dialog -->
                <a href="{{{viewurl}}}"{{#openmodal}} data-toggle="modal" data-target="#topicteaser-modal-{{cmid}}-{{nr}}"{{/openmodal}}>
                    <div class="unilabel-overlay-effect bg-primary h-100 w-100"></div>
                </a>
                <h3>{{name}}</h3>
                {{{summary}}}
            </div>
        {{/items}}
    </div>

    {{#openmodal}}
        {{#items}}
            {{> unilabeltype_topicteaser/dialog }}
        {{/items}}
    {{/openmodal}}

{{/hasitems}}

{{^hasitems}}
    <span>{{#str}} nocontent , unilabeltype_topicteaser {{/str}}</span>
{{/hasitems}}