Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
 
4
    Moodle is free software: you can redistribute it and/or modify
5
    it under the terms of the GNU General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
7
    (at your option) any later version.
8
 
9
    Moodle is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
    GNU General Public License for more details.
13
 
14
    You should have received a copy of the GNU General Public License
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
}}
17
{{!
18
    @template unilabeltype_collapsedtext/collapsed
19
    Template to show a bootstrap modal dialog.
20
 
21
    Example context (json):
22
    {
23
        "title": "fdsfsdf",
24
        "content": "<div><p>...</p></div>",
25
        "cmid": "55",
26
        "useanimation": true
27
    }
28
}}
29
 
30
{{^useanimation}}
31
    <div class="unilabeltype-details">
32
        <details{{#openonstart}} open=""{{/openonstart}}>
33
            <summary>{{{title}}}</summary>
34
            <div>{{{content}}}</div>
35
        </details>
36
    </div>
37
{{/useanimation}}
38
 
39
{{#useanimation}}
40
    <div class="unilabeltype-collapsed">
41
        <a data-toggle="collapse"
42
           href="#unilabeltype-collapsed-{{uniqid}}-{{cmid}}"
43
           class="icons-collapse-expand {{^openonstart}}collapsed{{/openonstart}}"
44
           aria-expanded="true"
45
           aria-controls="unilabeltype-collapsed-{{uniqid}}-{{cmid}}">
46
            <span class="collapsed-icon icon-no-margin mr-1" title="{{srtitle_expand}}">
47
                <span class="dir-rtl-hide"><i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i></span>
48
                <span class="dir-ltr-hide"><i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i></span>
49
                <span class="sr-only">{{srtitle_expand}}</span>
50
            </span>
51
            <span class="expanded-icon icon-no-margin mr-1" title="{{srtitle_collapse}}">
52
                <i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
53
                <span class="sr-only">{{srtitle_collapse}}</span>
54
            </span>
55
            {{title}}
56
        </a>
57
        <div class="collapse{{#openonstart}} show{{/openonstart}}" id="unilabeltype-collapsed-{{uniqid}}-{{cmid}}">
58
            {{{content}}}
59
        </div>
60
    </div>
61
{{/useanimation}}
62
{{#js}}
63
{{#useanimation}}
64
    require(['mod_unilabel/collapse_helper'], function(collapsehelper) {
65
        collapsehelper.init("#unilabel-button-{{uniqid}}-{{cmid}}");
66
    });
67
{{/useanimation}}
68
{{/js}}