@register.simple_tag(takes_context=True)
def expand_fragment_header_link(context, header):
 lines_of_context = context[u'lines_of_context']
 offset = (context[u'first_line'] - header[u'line'])
 return render_to_string(u'reviews/expand_link.html', {u'tooltip': _(u'Expand to header'), u'text': format_html(u'<code>{0}</code>', header[u'text']), u'comment_id': context[u'comment'].id, u'expand_pos': ((lines_of_context[0] + offset), lines_of_context[1]), u'image_class': u'rb-icon-diff-expand-header'})

@ register . simple_tag ( takes_context = True ) def expand_fragment_header_link ( context , header ) : lines_of_context = context [ u'lines_of_context' ] offset = ( context [ u'first_line' ] - header [ u'line' ] ) return render_to_string ( u'reviews/expand_link.html' , { u'tooltip' : _ ( u'Expand to header' ) , u'text' : format_html ( u'<code>{0}</code>' , header [ u'text' ] ) , u'comment_id' : context [ u'comment' ] . id , u'expand_pos' : ( ( lines_of_context [ 0 ] + offset ) , lines_of_context [ 1 ] ) , u'image_class' : u'rb-icon-diff-expand-header' } )
render a diff comment fragment header expansion link .