source: trac/vendor/0.8/templates/report_rss.cs @ 2582

Revision 2581, 2.0 KB checked in by moschny, 8 years ago (diff)

Importing inital 0.8 version.

Line 
1<?xml version="1.0"?>
2<!-- RSS generated by Trac v<?cs var:$trac.version ?> on <?cs var:$trac.time ?> -->
3<rss version="2.0">
4   <?cs set base_url = $HTTP.Protocol+'://'+$HTTP.Host ?>
5   <?cs if $HTTP.Port ?>
6     <?cs set base_url = $base_url + ':' + $HTTP.Port ?>
7   <?cs /if ?>
8    <channel>
9      <?cs if $project.name.encoded ?>
10        <title><?cs var:$project.name.encoded ?>: <?cs var:$report.title ?></title>
11
12      <?cs else ?>
13        <title><?cs var:$title ?></title>
14      <?cs /if ?>
15      <link><?cs var:$base_url ?><?cs var:$trac.href.report ?>/<?cs var:$report.id ?></link>
16      <description>Trac Report - <?cs var:$report.title ?></description>
17      <language>en-us</language>
18      <generator>Trac v<?cs var:$trac.version ?></generator>
19      <?cs each:row = $report.items ?>
20        <?cs set title = '' ?>
21        <?cs set descr = '' ?>
22        <?cs set author = '' ?>
23        <?cs set pubdate = '' ?>
24        <?cs each:item = $row ?>
25          <?cs if name(item) == 'ticket' ?>
26            <?cs set link = $base_url+$item.ticket_href ?>
27            <?cs set id = $item ?>
28          <?cs elif name(item) == 'summary' ?>
29            <?cs set title = $item ?>
30          <?cs elif name(item) == 'description' ?>
31            <?cs set descr = $item ?>
32          <?cs elif name(item) == 'reporter' ?>
33            <?cs set author = $item.rss ?>
34          <?cs elif name(item) == 'time' || name(item) == 'changetime' 
35                    || name(item) == 'created' || name(item) == 'modified' ?>
36            <?cs set pubdate = $item.gmt ?>
37          <?cs /if ?>
38       <?cs /each ?>
39       <item>
40         <?cs if:$author ?>
41          <author><?cs var:$author ?></author>
42         <?cs /if ?>
43         <pubDate><?cs var:$pubdate ?></pubDate>
44         <title><?cs var:'#'+$id+': '+$title ?></title>   
45         <link><?cs var:$link ?></link>
46         <description><?cs var:$descr ?></description>
47         <category>Report</category>
48       </item>
49      <?cs /each ?>
50    </channel>
51</rss>
Note: See TracBrowser for help on using the repository browser.