Files
galaxy/templates/sorting_base.mako
T
2015-06-11 14:08:15 -05:00

30 lines
787 B
Mako

<%def name="get_sort_url( sort_id, order, test_id, *args, **kwargs )">
<%
if sort_id == test_id:
if order == "asc":
tool_order = "desc"
else:
tool_order = "asc"
else:
tool_order = "default"
%>
%if len(kwargs.keys()) > 0:
<a href="${h.url_for( controller=args[0], action=args[1], sort_id=test_id, order=tool_order, **kwargs )}">${" ".join(args[2:])}</a>
%else:
<a href="${h.url_for( controller=args[0], action=args[1], sort_id=test_id, order=tool_order )}">${" ".join(args[2:])}</a>
%endif
</%def>
<%def name="get_css()">
<style>
.dir_arrow {
visibility: hidden
}
.${sort_id} {
visibility: visible
}
</style>
</%def>