{{!
    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_tag/index

    Displays items in one tag area tagged with the specific tag

    Classes required for JS:
    * tagarea

    Data attributes required for JS:
    * data-quickload
    * data-ta

    Context variables required for this template:
    * none

    Example context (json):
    {
        "component" : "core",
        "itemtype" : "course",
        "nextpageurl" : "http://moodle.org",
        "prevpageurl" : "http://moodle.org",
        "exclusiveurl" : "http://moodle.org",
        "exclusivetext" : "Show all Courses tagged with \"Sometag\"",
        "title" : "Courses tagged with \"Sometag\"",
        "content": "Course1, Course2",
        "hascontent": 1,
        "anchor": "core_course",
        "ta": 2,
        "tagid": 15
    }

}}
{{#hascontent}}
<div class="ccn-boxed-area" id="tagarea-{{component}}-{{itemtype}}" data-ta="{{ta}}">
    <a name="{{anchor}}"></a>
    <h4 class="title">{{{title}}}</h4>
    <div class="taggeditems">
        {{{content}}}
    </div>
    <div class="controls controls-bottom">
        {{#prevpageurl}}
            <a class="gotopage prevpage" href="{{prevpageurl}}" data-quickload="1">{{#str}}prevpage,tag{{/str}}</a>
        {{/prevpageurl}}
        {{#nextpageurl}}
            <a class="gotopage nextpage" href="{{nextpageurl}}" data-quickload="1">{{#str}}nextpage,tag{{/str}}</a>
        {{/nextpageurl}}
        {{#exclusiveurl}}
            <a class="exclusivemode" href="{{exclusiveurl}}">{{exclusivetext}}</a>
        {{/exclusiveurl}}
    </div>
</div>
{{/hascontent}}
