bloodhound-trac / trac / templates / macros.html

<div xmlns=""


     WARNING: this file and the corresponding <py:def>s are going to be phased
              out soon. Please DON'T include macros.html in your own templates.


  <!--!  Display size of a content in human friendly format (think -H)
  -      We take care to not insert any extra space.
  <py:def function="sizeinfo(size)"><span title="${_('%(size)s bytes', size=size)}">${

  <!--! Add Previous/Up/Next navigation links
  -     `label` the label to use after the Previous/Next words
  -     `uplabel` the label to use for the Up link
  -     Assume the 'chrome' datastructure to be available from the context.
  <ul py:def="prevnext_nav(label, uplabel=None)" py:with="links = chrome.links"
      py:if="'up' in chrome.links or
             'prev' in chrome.links or
             'next' in chrome.links">
    <li class="first" py:choose="">
      &larr; <a py:when="'prev' in links" py:with="link = links.prev[0]"
                class="prev" href="${link.href}"
                title="${link.title}">Previous $label</a>
      <span py:otherwise="" class="missing">Previous $label</span>
    <li py:if="uplabel and 'up' in links">
      <a py:with="link = links.up[0]" href="${link.href}"
    <li class="last" py:choose="">
      <a py:when="'next' in links"  py:with="link =[0]"
         class="next" href="${link.href}"
         title="${link.title}">Next $label</a>
      <span py:otherwise="" class="missing">Next $label</span> &rarr;

  <!--! Display a div for visualizing a preview of a file content
  -     'preview' is usually obtained from calling Mimeview.preview_data()
  <py:def function="preview_file(preview)">
    <xi:include href="preview_file.html"/>

  <!--! Display a list of attachments
  -     'alist' is an AttachmentList object (see
  -     'compact' is used to switch between a compact list of attachments (e.g. as used for
  -       the wiki view) and an expanded list (e.g. as used for the ticket view)
  <py:def function="list_of_attachments(alist, compact=False, add_button_title=None, foldable=False)">
    <xi:include href="list_of_attachments.html"/>

  <!--! Conditionally render an ''Attach File'' button
  -     'alist' is an AttachmentList object (see
  <py:def function="attach_file_form(alist, add_button_title=None)">
    <xi:include href="attach_file_form.html"/>

  <!--!  Display a generic "progress bar", for use in roadmap and milestone.
  -      `stats` argument is a TicketGroupStats instance
  -       `interval_hrefs` are links to a query for each of the stats.intervals
  <py:def function="progress_bar(stats, interval_hrefs, percent=None, legend=True, style=None, stats_href=None)">
    <xi:include href="progress_bar.html"/>

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.