{{!
    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 filter_tabs/bootstrap2

    Template to display tabs using Bootstrap 2.

    Classes required for JS:
    * 'filter-tabs-tabgroup' - to identify tabs as one of ours.

    Data attributes required for JS:
    * none

    Example context (json):
    {
        "tabgroupcounter": "1",
        "tabs": [ { "title": "header", "content": "body", "key": 1, "active": "active" } ]
    }
}}
<div id="filter-tabs-tabgroup-{{tabgroupcounter}}" class="filter-tabs-tabgroup yui3-tabview-loading">
    <ul class="filter-tabs-titlegroup">
        {{#tabs}}
            <li class="filter-tabs-title">
                <a href="#filter-tabs-text-{{tabgroupcounter}}-{{get_key}}">{{get_title}}</a>
            </li>
        {{/tabs}}
    </ul>
    <div class="filter-tabs-textgroup">
        {{#tabs}}
            <div id="filter-tabs-text-{{tabgroupcounter}}-{{get_key}}" class="filter-tabs-text">
                {{{get_content}}}
            </div>
        {{/tabs}}
    </div>
</div>
<script>
    YUI().use("tabview", function(Y) {
    var tabview = new Y.TabView({srcNode: "#filter-tabs-tabgroup-{{tabgroupcounter}}"});
    tabview.render();
});
</script>
