Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions app/lists/feed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function(head, req){
Comment thread
benel marked this conversation as resolved.
Outdated
start({
Comment thread
benel marked this conversation as resolved.
Outdated
'headers': {
'Content-Type': 'text/xml'
}
});
uri = req.query.app;
send('<rss><channel><title>Modifications</title><link>');
Comment thread
benel marked this conversation as resolved.
Outdated
send(uri);
send('</link><description>IF05</description>');
Comment thread
benel marked this conversation as resolved.
Outdated
while(row = getRow()){
send(''.concat(
'<item>',
'<title>' + row.doc.item_name + '</title>',
'<description>Lieu : ' + row.doc.spatial + ' créé le ' + row.doc.created + '</description>',
Comment thread
benel marked this conversation as resolved.
Outdated
'<link>' + uri + '/item/' + row.doc.item_corpus + '/' + row.id + '</link>',
Comment thread
benel marked this conversation as resolved.
Outdated
'</item>'
));
}
send('</channel></rss>');
}
8 changes: 8 additions & 0 deletions app/rewrites.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
"key": [":user"],
"reduce": "false"
}
}, {
"from": "feed/:corpus",
"to": "_list/feed/modified",
"query": {
"include_docs": "true",
"startkey": [":corpus"],
"endkey": [":corpus",{}]
}
}, {
"from": "corpus/:corpus",
"to": "_view/corpus",
Expand Down
5 changes: 5 additions & 0 deletions app/views/modified/map.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function (doc) {
if(doc.item_corpus && doc.record.modified){
Comment thread
benel marked this conversation as resolved.
Outdated
emit([doc.item_corpus, doc.record.modified]);
}
}