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 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
{{#coursename}}
45
    {{#urls.viewcourse}}
46
        <a href="{{{urls.viewcourse}}}">{{{coursename}}}</a> ->
47
    {{/urls.viewcourse}}
48
    {{^urls.viewcourse}}
49
        {{coursename}} ->
50
    {{/urls.viewcourse}}
51
{{/coursename}}
52
{{#urls.viewforum}}
53
    <a href="{{{urls.viewforum}}}">{{{forumname}}}</a>
54
{{/urls.viewforum}}
55
{{^urls.viewforum}}
56
    {{{forumname}}}
57
{{/urls.viewforum}}
58
{{#showdiscussionname}}
59
    {{#urls.viewdiscussion}}
60
        -> <a href="{{{urls.viewdiscussion}}}">{{{discussionname}}}</a>
61
    {{/urls.viewdiscussion}}
62
    {{^urls.viewdiscussion}}
63
        {{{discussionname}}}
64
    {{/urls.viewdiscussion}}
65
    {{#hasparent}}
66
        {{#urls.viewparent}}
67
            -> <a href="{{{urls.viewparent}}}">{{{subject}}}</a>
68
        {{/urls.viewparent}}
69
        {{^urls.viewparent}}
70
            {{{subject}}}
71
        {{/urls.viewparent}}
72
    {{/hasparent}}
73
{{/showdiscussionname}}