Skip to content
Snippets Groups Projects
Commit 8db000e5878d authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

fix oops

parent 89b12aa77a79
No related branches found
No related tags found
No related merge requests found
...@@ -37,13 +37,13 @@ ...@@ -37,13 +37,13 @@
uicfg.primaryview_section.tag_object_of(('*', 'comments', '*'), 'hidden') uicfg.primaryview_section.tag_object_of(('*', 'comments', '*'), 'hidden')
def _login_register_link(req): def _login_register_link(req):
link = u'' if 'registration' in req.vreg.config.cubes():
if req.cnx.anonymous_connection: link = u'<a href="%s">%s</a> or ' % (req.build_url('register'),
if 'registration' in req.vreg.config.cubes(): req._(u'register'))
link += u' <a href="%s">%s</a> or' % (req.build_url('register'), else:
req._(u'register') link = u''
link += u' <a href="%s">%s</a>' % (req.build_url('login'), link += u'<a href="%s">%s</a>' % (req.build_url('login'),
req._(u'login')) req._(u'login'))
return link return link
# comment views ############################################################### # comment views ###############################################################
...@@ -124,6 +124,6 @@ ...@@ -124,6 +124,6 @@
if req.cnx.anonymous_connection: if req.cnx.anonymous_connection:
self.w(u' | <span class="replyto">%s <a href="%s">%s</a></span>' self.w(u' | <span class="replyto">%s <a href="%s">%s</a></span>'
% (_login_register_link(self.req), % (_login_register_link(self.req),
xml_escape(url), self.req._(replyaction.title)) xml_escape(url), self.req._(replyaction.title)))
else: else:
self.w(u' | <span class="replyto"><a href="%s">%s</a></span>' self.w(u' | <span class="replyto"><a href="%s">%s</a></span>'
...@@ -128,6 +128,6 @@ ...@@ -128,6 +128,6 @@
else: else:
self.w(u' | <span class="replyto"><a href="%s">%s</a></span>' self.w(u' | <span class="replyto"><a href="%s">%s</a></span>'
% (xml_escape(url), self.req._(replyaction.title)) % (xml_escape(url), self.req._(replyaction.title)))
editaction = actions.select_object('edit_comment', self.req, editaction = actions.select_object('edit_comment', self.req,
rset=self.rset, row=row) rset=self.rset, row=row)
if editaction is not None: if editaction is not None:
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
'comment%s' % entity.eid, rql_for_eid(entity.eid), 'comment%s' % entity.eid, rql_for_eid(entity.eid),
'editcomment') 'editcomment')
self.w(u' | <span class="replyto"><a href="%s">%s</a></span>' self.w(u' | <span class="replyto"><a href="%s">%s</a></span>'
% (xml_escape(url), self.req._(editaction.title)) % (xml_escape(url), self.req._(editaction.title)))
self.w(u'</div>\n') self.w(u'</div>\n')
text = entity.printable_value('content') text = entity.printable_value('content')
if not kwargs.get('full'): if not kwargs.get('full'):
......
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