Skip to content
Snippets Groups Projects
Commit c0004800f375 authored by Sandrine Ribeau's avatar Sandrine Ribeau
Browse files

[views] ticket #343859, improved RSS view of a comment adding a link in the...

[views] ticket #343859, improved RSS view of a comment adding a link in the description to the entity the comment comments
parent dbdedcedff5c
No related branches found
No related tags found
No related merge requests found
......@@ -319,3 +319,24 @@
'WHERE C eid %(x)s',
{'format' : format, 'text' : text, 'x' : comment}, 'x')
# RSS view ####################################################################
class RssItemCommentView(xmlrss.RSSItemView):
__select__ = implements('Comment')
def cell_call(self, row, col):
entity = self.complete_entity(row, col)
self.w(u'<item>\n')
self.w(u'<guid isPermaLink="true">%s</guid>\n'
% xml_escape(entity.absolute_url()))
self.render_title_link(entity)
description = entity.dc_description(format='text/html') + \
self.req._(u'about') + \
u' <a href=%s>%s</a>' % (entity.root().absolute_url(),
entity.root().title)
self._marker('description', description)
self._marker('dc:date', entity.dc_date(self.date_format))
self.render_entity_creator(entity)
self.w(u'</item>\n')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment