def create_sort_link(pretty_name, sort_field, get_params, sort, order):
 get_params.append(('sort', sort_field))
 if ((sort == sort_field) and (order == 'asc')):
  get_params.append(('order', 'desc'))
 else:
  get_params.append(('order', 'asc'))
 url_class = ''
 if (sort == sort_field):
  url_class = (' class="sort-icon ed-sprite-sort-%s"' % order)
 return (u'<a href="?%s"%s>%s</a>' % (urllib.urlencode(get_params, True), url_class, pretty_name))

def create_sort_link ( pretty_name , sort_field , get_params , sort , order ) : get_params . append ( ( 'sort' , sort_field ) ) if ( ( sort == sort_field ) and ( order == 'asc' ) ) : get_params . append ( ( 'order' , 'desc' ) ) else : get_params . append ( ( 'order' , 'asc' ) ) url_class = '' if ( sort == sort_field ) : url_class = ( ' class="sort-icon ed-sprite-sort-%s"' % order ) return ( u'<a href="?%s"%s>%s</a>' % ( urllib . urlencode ( get_params , True ) , url_class , pretty_name ) )
generate table header sort links .