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 core_reportbuilder/toggle_card
19
 
20
    Template for empty_message
21
 
22
    Example context (json):
23
    {
24
        "collapsed": "collapsed",
25
        "id": "htmlid",
26
        "header": "Toggle card heading",
27
        "buttontitle": "Expand toggle card",
28
        "body": "This is the toggle card content"
29
    }
30
}}
31
<div class="card reportbuilder-toggle-card rounded border mb-2">
32
    <div class="card-header p-0">
33
        <div class="d-flex align-items-center mb-0 p-1">
34
            <div class="ml-2">
35
                <strong class="mr-1 text-size-sm">{{$header}}{{/header}}</strong> {{$helpicon}}{{/helpicon}}
36
            </div>
37
            <button class="btn btn-xs btn-secondary toggle-card-button ml-auto p-1 {{$collapsed}}{{/collapsed}}"
38
                    data-toggle="collapse"
39
                    data-target="#{{$id}}{{uniqid}}{{/id}}"
40
                    aria-expanded="true"
41
                    aria-controls="{{$id}}{{uniqid}}{{/id}}"
42
                    title="{{#str}}showhide, core_reportbuilder, {{$header}}{{/header}}{{/str}}"
43
            >
44
                <span class="collapsed-icon-container">
45
                    <svg class="toggle-card-icon" width="24" height="24" fill="none" viewBox="0 0 24 24">
46
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.25 10.75L12 14.25L8.75 10.75"></path>
47
                    </svg>
48
                </span>
49
                <span class="expanded-icon-container">
50
                    <svg class="toggle-card-icon" width="24" height="24" fill="none" viewBox="0 0 24 24">
51
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.25 14.25L12 10.75L8.75 14.25"></path>
52
                    </svg>
53
                </span>
54
            </button>
55
        </div>
56
    </div>
57
    <div id="{{$id}}{{uniqid}}{{/id}}" class="collapse {{$collapsed}}show{{/collapsed}}">
58
        <div class="card-body p-0">
59
            {{$body}}{{/body}}
60
        </div>
61
    </div>
62
</div>