Revision f722e122f723ec37b95aa669a1f60f53260e0f71 authored by Matthias Bernt on 08 June 2023, 13:54:28 UTC, committed by Matthias Bernt on 08 June 2023, 13:54:28 UTC
1 parent 1ee21e3
Raw File
sorting_base.mako
<%def name="get_sort_url( sort_id, order, test_id, *args, **kwargs )">
    <%
        if sort_id == test_id:
            if order == "asc":
                tool_order = "desc"
            elif order == "desc":
                tool_order = "asc"
            else:
                tool_order = "default"
        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>
    .${sort_id} {
        visibility: visible
    }
    </style>
</%def>
back to top