def linkable_text_title(self, html=True, link=True): # html: whether or not output sould be html format_args = {'link':absolute_reverse('text-view', args=[self.text.key]), 'title':self.text.title} if html and not self.text.deleted : return mark_safe(u'<a href="%(link)s">%(title)s</a>' % format_args) else: if link and not self.text.deleted: return u'%(title)s (%(link)s)' % format_args else: return self.text.title ;
def linkable_comment_title(self, html=True, link=True): if self.comment: format_args = {'link':absolute_reverse('text-view-show-comment', args=[self.text.key, self.comment.id_key]), 'title':self.comment.title} if html and not self.comment.deleted and not self.text.deleted: return mark_safe(u'<a href="%(link)s">%(title)s</a>' % format_args) else : if link and not self.comment.deleted and not self.text.deleted: return u'%(title)s (%(link)s)' % format_args else: return self.comment.title ; else: return u''
def linkable_text_title(self, html=True, link=True): # html: whether or not output sould be html format_args = { 'link': absolute_reverse('text-view', args=[self.text.key]), 'title': self.text.title } if html and not self.text.deleted: return mark_safe(u'<a href="%(link)s">%(title)s</a>' % format_args) else: if link and not self.text.deleted: return u'%(title)s (%(link)s)' % format_args else: return self.text.title
def linkable_comment_title(self, html=True, link=True): if self.comment: format_args = { 'link': absolute_reverse('text-view-show-comment', args=[self.text.key, self.comment.id_key]), 'title': self.comment.title } if html and not self.comment.deleted and not self.text.deleted: return mark_safe(u'<a href="%(link)s">%(title)s</a>' % format_args) else: if link and not self.comment.deleted and not self.text.deleted: return u'%(title)s (%(link)s)' % format_args else: return self.comment.title else: return u''