MDL-50851 tag: fix whitespace errors
[moodle.git] / tag / templates / tagcloud.mustache
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/>.
16 }}
17 {{!
18     @template core_tag/tagcloud
20     Displays a tag cloud
22     Classes required for JS:
23     * none
25     Data attributes required for JS:
26     * none
28     Context variables required for this template:
29     * none
31     Example context (json):
32     {
33     "tags": [
34         {"id":1,"name":"Cats","viewurl":"http://moodle.org/tag/index.php?tag=Cats","tagtype":"official","count":12,"size":20,"flag":0},
35         {"id":1,"name":"Dogs","viewurl":"http://moodle.org/tag/index.php?tag=Dogs","tagtype":"default","size":2,"flag":1},
36         {"id":1,"name":"Mice","viewurl":"http://moodle.org/tag/index.php?tag=Mice","tagtype":"default","count":4,"size":8,"flag":0}
37     ],
38         "tagscount": 3,
39         "totalcount": 5,
40         "overflow": 1
41     }
43 }}
44 {{#tagscount}}
45     <div class="tag_cloud">
46     <ul class="inline-list">
47         {{#tags}}
48             <li>
49                 <a href="{{viewurl}}" class="{{tagtype}} s{{size}}"
50                     {{#count}}title="{{#str}}numberofentries, blog, {{count}}{{/str}}{{/count}}">
51                         {{#flag}}
52                             <span class="flagged-tag">{{name}}</span></a>
53                         {{/flag}}
54                         {{^flag}}
55                             {{name}}</a>
56                         {{/flag}}
57             </li>
58         {{/tags}}
59     </ul>
60     {{#overflow}}
61         <p class="tag_overflow">
62             {{#str}} showingfirsttags, core_tag, {{tagscount}} {{/str}}
63         </p>
64     {{/overflow}}
65     </div>
66 {{/tagscount}}