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 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-3">
|
|
|
35 |
<span class="mr-1">{{$header}}{{/header}}</span> {{$helpicon}}{{/helpicon}}
|
|
|
36 |
</div>
|
|
|
37 |
<button class="btn toggle-card-button ml-auto {{$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"><i class="toggle-card-icon fa fa-lg fa-angle-down"></i></span>
|
|
|
45 |
<span class="expanded-icon-container"><i class="toggle-card-icon fa fa-lg fa-angle-up"></i></span>
|
|
|
46 |
</button>
|
|
|
47 |
</div>
|
|
|
48 |
</div>
|
|
|
49 |
<div id="{{$id}}{{uniqid}}{{/id}}" class="collapse {{$collapsed}}show{{/collapsed}}">
|
|
|
50 |
<div class="card-body p-0">
|
|
|
51 |
{{$body}}{{/body}}
|
|
|
52 |
</div>
|
|
|
53 |
</div>
|
|
|
54 |
</div>
|