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 block_rss_client/item
19
 
20
    Template which defines an item in an RSS Feed
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
    * id - string: A unique id for the feed item.
30
    * link - string: The URL of the feed item. Must already be escaped.
31
    * title - string: The title of the feed item.
32
    * description - string: The text description of the feed item.
33
    * permalink - string: The permalink of the feed item. Must already be escaped.
34
    * datepublished - string: The date the feed item was published.
35
 
36
    Example context (json):
37
    {
38
        "id": "https://www.example.com/node",
39
        "link": "https://www.example.com/my-cat-story.html",
40
        "title": "My Story",
41
        "description": "This is a story about my cats.",
42
        "permalink": "https://www.example.com/my-cat-story.html",
43
        "datepublished": "12 January 2016, 9:12 pm"
44
    }
45
}}
46
<li class="py-3">
47
    {{$title}}
48
        <div class="link">
49
            <a href="{{{link}}}" onclick='this.target="_blank"'>{{title}}</a>
50
        </div>
51
    {{/title}}
52
 
53
    {{$content}}
54
        {{#description}}
55
            <div class="date text-muted muted mb-1">
56
                <small>{{{datepublished}}}</small>
57
            </div>
58
            <div class="description">
59
                {{{description}}}
60
            </div>
61
        {{/description}}
62
    {{/content}}
63
</li>