"Fossies" - the Fresh Open Source Software Archive

Member "PURELIB/trac/versioncontrol/templates/sortable_th.html" (27 Aug 2019, 1417 Bytes) of package /windows/misc/Trac-1.4.win-amd64.exe:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {# Copyright (C) 2008-2014 Edgewall Software
    2 
    3   This software is licensed as described in the file COPYING, which
    4   you should have received as part of this distribution. The terms
    5   are also available at https://trac.edgewall.org/wiki/TracLicense.
    6 
    7   This software consists of voluntary contributions made by many
    8   individuals. For the exact contribution history, see the revision
    9   history and logs, available at https://trac.edgewall.org/.
   10 #}
   11 
   12 {# Snippet for a <th> corresponding to a sortable column.
   13 
   14   Expects the following variables to be set specifically:
   15 
   16    - `class_`: the CSS class for the column
   17    - `title`:  the title attribute for the column
   18 
   19   e.g.
   20 
   21   # with class_ = 'name', title = 'Name'
   22   #   include 'sortable_th.html'
   23   # endwith
   24 
   25   Expects the following variables from the context:
   26 
   27   order, desc, href, reponame, path, stickyrev
   28 #}
   29 <th ${{'class': ('desc' if desc else 'asc') if order == class_}|htmlattr}>
   30   <a title="${_('Sort by %(col)s %(direction)s',
   31             col=class_,
   32             direction=_("(descending)") if order == class_ and not desc else
   33                       _("(ascending)"))}"
   34      href="${href.browser(reponame, path, rev=stickyrev,
   35                           order=class_ if class_ != 'name' else None,
   36                           desc=1 if class_ == order and not desc else None)}">${
   37     title}</a>
   38 </th>
   39 ## jinjacheck: "th" OK