Source

bloodhound-trac / trac / versioncontrol / templates / sortable_th.html

Full commit
<!--! Snippet for a <th> corresponding to a sortable column.

    Expects the following variables to be set specifically:

    class_    the CSS class for the column
    title     the title attribute for the column

    e.g.  <py:with vars="class_ = 'name'; title = 'Name'">
            <xi:include href="sortable_th.html" />
          </py:with>

    Expects the following variables from the context: order, desc, href, reponame, path, stickyrev
-->
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:py="http://genshi.edgewall.org/"
    xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="">
  <th class="$class_${(' desc' if desc else ' asc') if order == class_ else None}">
    <a title="${_('Sort by %(col)s %(direction)s', col=class_, 
                  direction=_('(descending)') if order == class_ and not desc else _('(ascending)'))}"
      href="${href.browser(reponame, path, rev=stickyrev, order=class_ if class_ != 'name' else None,
                           desc=1 if class_ == order and not desc else None)}">$title</a>
  </th>
</html>