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 core_reportbuilder/toggle_card

    Template for empty_message

    Example context (json):
    {
        "collapsed": "collapsed",
        "id": "htmlid",
        "header": "Toggle card heading",
        "buttontitle": "Expand toggle card",
        "body": "This is the toggle card content"
    }
}}
<div class="card reportbuilder-toggle-card rounded border mb-2">
    <div class="card-header p-0">
        <div class="d-flex align-items-center mb-0 p-1">
            <div class="ml-2">
                <strong class="mr-1 text-size-sm">{{$header}}{{/header}}</strong> {{$helpicon}}{{/helpicon}}
            </div>
            <button class="btn btn-xs btn-secondary toggle-card-button ml-auto p-1 {{$collapsed}}{{/collapsed}}"
                    data-toggle="collapse"
                    data-target="#{{$id}}{{uniqid}}{{/id}}"
                    aria-expanded="true"
                    aria-controls="{{$id}}{{uniqid}}{{/id}}"
                    title="{{#str}}showhide, core_reportbuilder, {{$header}}{{/header}}{{/str}}"
            >
                <span class="collapsed-icon-container">
                    <svg class="toggle-card-icon" width="24" height="24" fill="none" viewBox="0 0 24 24">
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.25 10.75L12 14.25L8.75 10.75"></path>
                    </svg>
                </span>
                <span class="expanded-icon-container">
                    <svg class="toggle-card-icon" width="24" height="24" fill="none" viewBox="0 0 24 24">
                        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.25 14.25L12 10.75L8.75 14.25"></path>
                    </svg>
                </span>
            </button>
        </div>
    </div>
    <div id="{{$id}}{{uniqid}}{{/id}}" class="collapse {{$collapsed}}show{{/collapsed}}">
        <div class="card-body p-0">
            {{$body}}{{/body}}
        </div>
    </div>
</div>