Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | 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 mod_forum/forum_post_subject_with_context_links
19
 
20
    Template to render a breadcrumb-style subject.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Example context (json):
29
    {
30
        "coursename": "Test course",
31
        "forumname": "Test forum",
32
        "discussionname": "Test discussion",
33
        "subject": "Test post subject",
34
        "urls": {
35
            "viewcourse": "#",
36
            "viewforum": "#",
37
            "viewdiscussion": "#",
38
            "viewparent": "#"
39
        },
40
        "showdiscussionname": true,
41
        "hasparent": true
42
    }
43
}}
44
{{#urls.viewforum}}
45
    <a href="{{{urls.viewforum}}}">{{{forumname}}}</a>
46
{{/urls.viewforum}}
47
{{^urls.viewforum}}
48
    {{{forumname}}}
49
{{/urls.viewforum}}
50
{{#showdiscussionname}}
51
    {{#urls.viewdiscussion}}
52
        -> <a href="{{{urls.viewdiscussion}}}">{{{discussionname}}}</a>
53
    {{/urls.viewdiscussion}}
54
    {{^urls.viewdiscussion}}
55
        {{{discussionname}}}
56
    {{/urls.viewdiscussion}}
57
    {{#hasparent}}
58
        {{#urls.viewparent}}
59
            -> <a href="{{{urls.viewparent}}}">{{{subject}}}</a>
60
        {{/urls.viewparent}}
61
        {{^urls.viewparent}}
62
            {{{subject}}}
63
        {{/urls.viewparent}}
64
    {{/hasparent}}
65
{{/showdiscussionname}}