Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
 
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.
8
 
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.
13
 
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
19
 
20
    Displays a tag cloud
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Context variables required for this template:
29
    * none
30
 
31
    Example context (json):
32
    {
33
    "tags": [
34
        {"id":1,"name":"Cats","viewurl":"http://moodle.org/tag/index.php?tag=Cats","isstandard":"1","count":12,"size":20,"flag":0},
35
        {"id":1,"name":"Dogs","viewurl":"http://moodle.org/tag/index.php?tag=Dogs","isstandard":"0","size":2,"flag":1},
36
        {"id":1,"name":"Mice","viewurl":"http://moodle.org/tag/index.php?tag=Mice","isstandard":"0","count":4,"size":8,"flag":0}
37
    ],
38
        "tagscount": 3,
39
        "totalcount": 5,
40
        "overflow": 1
41
    }
42
 
43
}}
44
{{#tagscount}}
45
    <div class="tag_cloud">
46
    <ul class="inline-list">
47
        {{#tags}}
48
            <li>
49
                <a href="{{viewurl}}" class="{{#isstandard}}standardtag{{/isstandard}} s{{size}}"
50
                    {{#count}}title="{{#str}}numberofentries, blog, {{count}}{{/str}}"{{/count}}>
51
                        {{#flag}}
52
                            <span class="flagged-tag">{{name}}</span>
53
                        {{/flag}}
54
                        {{^flag}}
55
                            {{name}}
56
                        {{/flag}}
57
                </a>
58
            </li>
59
        {{/tags}}
60
    </ul>
61
    {{#overflow}}
62
        <p class="tag_overflow">
63
            {{#str}} showingfirsttags, core_tag, {{tagscount}} {{/str}}
64
        </p>
65
    {{/overflow}}
66
    </div>
67
{{/tagscount}}