@register.simple_tag(takes_context=True)
def diff_expand_link(context, expanding, tooltip, expand_pos_1=None, expand_pos_2=None, text=None):
 if (expanding == u'all'):
  image_class = u'rb-icon-diff-expand-all'
  expand_pos = None
 else:
  lines_of_context = context[u'lines_of_context']
  expand_pos = ((lines_of_context[0] + expand_pos_1), (lines_of_context[1] + expand_pos_2))
  image_class = (u'rb-icon-diff-expand-%s' % expanding)
 return _diff_expand_link(context, True, text, tooltip, expand_pos, image_class)

@ register . simple_tag ( takes_context = True ) def diff_expand_link ( context , expanding , tooltip , expand_pos_1 = None , expand_pos_2 = None , text = None ) : if ( expanding == u'all' ) : image_class = u'rb-icon-diff-expand-all' expand_pos = None else : lines_of_context = context [ u'lines_of_context' ] expand_pos = ( ( lines_of_context [ 0 ] + expand_pos_1 ) , ( lines_of_context [ 1 ] + expand_pos_2 ) ) image_class = ( u'rb-icon-diff-expand-%s' % expanding ) return _diff_expand_link ( context , True , text , tooltip , expand_pos , image_class )
renders a diff expansion link .