-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfeed.rsp
48 lines (48 loc) · 1.62 KB
/
feed.rsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<%
validate/full [
prj integer! -
tid integer! -
]
prj-id: any [prj?: request/content/prj 1]
ticket-id: request/content/tid
host: request/parsed/headers/host
%><?xml version="1.0"?>
<rss version="2.0">
<channel><%
either prj? [
list: select-logs prj-id%>
<title>CureCode project: <%=either prj-id = 1 [say "All Projects"][select enum-projects prj-id]%></title>
<link>http://<%=host%><%=request/web-app%>/view-tickets.rsp</link>
<description>Project's changes tracking</description>
<ttl>300</ttl>
<%][
list: select-logs/ticket ticket-id%>
<title>CureCode ticket #<%=ticket-id%></title>
<link>http://<%=host%><%=request/web-app%>/tickets.rsp?id=<%=ticket-id%></link>
<description>Ticket #<%=ticket-id%> changes tracking</description>
<ttl>3600</ttl>
<%]%>
<language>en-us</language>
<copyright>Nenad Rakocevic 2008-2011</copyright>
<generator>CureCode</generator>
<%foreach [id ticket date user action field opt-id old new msg] list [%>
<item>
<title><%if prj? [%>#<%=ticket%>: <%]%><%=utf8-encode history/decode field%> <%=utf8-encode history/decode action%> by <%=user%></title>
<link>http://<%=host%><%=request/web-app%>/ticket.rsp?id=<%=ticket%></link>
<author>CureCode</author>
<guid>http://<%=host%><%=request/web-app%>/ticket.rsp?id=<%=ticket%></guid>
<pubDate><%=to-idate date%></pubDate>
<description><![CDATA[<%=
utf8-encode either all [old new] [
reform [
any [all [old history/decode/value field old] ""]
"=>" history/decode/value field new
]
][
any [msg "-"]
]
%>]]></description>
</item>
<%]%>
</channel>
</rss><%response/set-header 'Content-Type "application/rss+xml"%>