DerDu/SPHERE-Framework

View on GitHub
Common/Frontend/Layout/Repository/Panel.twig

Summary

Maintainability
Test Coverage
<div {% if( Hash is not empty ) %}id="{{ Hash }}"{% endif %} class="panel {{ Type }}">
    {% if( Title|length > 0) %}
        <div class="panel-heading">
            <h6 class="panel-title">{{ Title }}</h6>
        </div>
    {% endif %}
    {% if( Content|length > 0) %}
        <div class="panel-body">
            {{ Content }}
        </div>
    {% endif %}
    {% if( ContentList|length > 0) %}
        <ul class="list-group">
            {% for Content in ContentList %}
                <li class="list-group-item clearfix">{{ Content }}</li>
            {% endfor %}
        </ul>
    {% endif %}
    {% if( Footer|length > 0) %}
        <div class="panel-footer clearfix">
            {{ Footer }}
        </div>
    {% endif %}
</div>
{% if Filter is not empty %}
<script type="text/javascript">
    //noinspection JSUnresolvedFunction
    executeScript(function()
    {
        Client.Use('ModAlways', function()
        {
            var Option = {
                listClass: "list-group",
                indexAsync: true,
                page: {{ FilterSize }},
                valueNames: [
                    'sphere-label'
                ]
            };
            var PanelList = new List("{{ Hash }}", Option);
            PanelList.search({{ FilterValue }});
        });
    });
</script>
{% endif %}