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 block_rss_client/block
19
 
20
    Template which defines an RSS Feeds block
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
    * feeds - array: An array of RSS feeds.
30
 
31
    Example context (json):
32
    {
33
        "feeds": [
34
            {
35
                "title": "News from around my living room",
36
                "image": {
37
                    "url": "https://www.example.com/feeds/news/poster.jpg",
38
                    "title": "Example News Logo",
39
                    "link": "https://www.example.com/feeds/news/"
40
                },
41
                "items": [
42
                    {
43
                        "id": "https://www.example.com/node/12",
44
                        "link": "https://www.example.com/my-turtle-story.html",
45
                        "title": "My Turtle Story",
46
                        "description": "This is a story about my turtle.",
47
                        "permalink": "https://www.example.com/my-turtle-story.html",
48
                        "datepublished": "11 January 2016, 7:11 pm"
49
                    },
50
                    {
51
                        "id": "https://www.example.com/node/12",
52
                        "link": "https://www.example.com/my-cat-story.html",
53
                        "title": "My Story",
54
                        "description": "This is a story about my cats.",
55
                        "permalink": "https://www.example.com/my-cat-story.html",
56
                        "datepublished": "12 January 2016, 9:12 pm"
57
                    }
1441 ariadna 58
                ],
59
                "channellink": "https://www.example.com"
1 efrain 60
            },
61
            {
62
                "title": "News from around my kitchen",
63
                "image": {
64
                    "url": "https://www.example.com/feeds/news/kitchen.jpg",
65
                    "title": "Picture of My Kitchen",
66
                    "link": "https://www.example.com/feeds/news/kitchen/"
67
                },
68
                "items": [
69
                    {
70
                        "id": "https://www.example.com/node/10",
71
                        "link": "https://www.example.com/oven-smoke.html",
72
                        "title": "Why is the Oven Smoking?",
73
                        "description": "There is something smoking in the oven.",
74
                        "permalink": "https://www.example.com/oven-smoke.html",
75
                        "datepublished": "10 January 2016, 1:13 pm"
76
                    },
77
                    {
78
                        "id": "https://www.example.com/node/13",
79
                        "link": "https://www.example.com/coffee-is-good.html",
80
                        "title": "Why My Coffee Machine is So Great!",
81
                        "description": "Don't be fancy; drips are best.",
82
                        "permalink": "https://www.example.com/oven-smoke.html",
83
                        "datepublished": "13 January 2016, 8:25 pm"
84
                    }
1441 ariadna 85
                ],
86
                "channellink": "https://www.example.com"
1 efrain 87
            }
88
        ]
89
    }
90
}}
91
{{#feeds}}
92
    {{> block_rss_client/feed}}
93
{{/feeds}}