Moodle release 4.4beta
[moodle.git] / tag / templates / index.mustache
blob314772025e0729e0b4395d783b58f6a972672d76
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
17 {{!
18     @template core_tag/index
20     Displays items in one tag area tagged with the specific tag
22     Classes required for JS:
23     * tagarea
25     Data attributes required for JS:
26     * data-quickload
27     * data-ta
29     Context variables required for this template:
30     * none
32     Example context (json):
33     {
34         "component" : "core",
35         "itemtype" : "course",
36         "nextpageurl" : "http://moodle.org",
37         "prevpageurl" : "http://moodle.org",
38         "exclusiveurl" : "http://moodle.org",
39         "exclusivetext" : "Show all Courses tagged with \"Sometag\"",
40         "title" : "Courses tagged with \"Sometag\"",
41         "content": "Course1, Course2",
42         "hascontent": 1,
43         "anchor": "core_course",
44         "ta": 2,
45         "tagid": 15
46     }
49 {{#hascontent}}
50 <div class="box generalbox tagarea" id="tagarea-{{component}}-{{itemtype}}" data-ta="{{ta}}">
51     <a name="{{anchor}}"></a>
52     <h3>{{{title}}}</h3>
53     <div class="taggeditems">
54         {{{content}}}
55     </div>
56     <div class="controls controls-bottom">
57         {{#prevpageurl}}
58             <a class="gotopage prevpage" href="{{prevpageurl}}" data-quickload="1">{{#str}}prevpage,tag{{/str}}</a>
59         {{/prevpageurl}}
60         {{#nextpageurl}}
61             <a class="gotopage nextpage" href="{{nextpageurl}}" data-quickload="1">{{#str}}nextpage,tag{{/str}}</a>
62         {{/nextpageurl}}
63         {{#exclusiveurl}}
64             <a class="exclusivemode" href="{{exclusiveurl}}">{{exclusivetext}}</a>
65         {{/exclusiveurl}}
66     </div>
67 </div>
68 {{/hascontent}}