def render_part_title(self, part, mode):
        new, old = part.new_value, part.old_value

        if mode == 'html':
            diff = HtmlDiffWithoutControl.diff(old['title'], new['title'], n=0, css=False)
            collaspe_id = u'part-' + str(part.id)
            return u'<span class="collapsible">Title has changed</span><span data-toggle="collapse" data-target="#' + collaspe_id + u'" title="Toggle diff">…</span><div class="collapse" id="' + collaspe_id + u'">' + diff + u'</div>'

        return super(IssueRendererCollapsableTitleAndBody, self).render_part_title(part, mode)
    def render_part_title(self, part, mode):
        new, old = part.new_value, part.old_value

        if mode == 'html':
            diff = HtmlDiffWithoutControl.diff(old['title'], new['title'], n=0, css=False)
            return '<span>Title has changed:</span>' + diff

        # part must not be created if no old title
        title = 'Old title was "%(title)s"'
        params = {'title': self.helper_strong(old['title'], mode, quote_if_text=False)}
        return title % params