trac-ticketlinks / trac / templates / list_of_attachments.html

Display a list of attachments.

 - alist: the data for the list of attachments
 - compact=False: if True, show the list in compact format (e.g. as used in the wiki view)
 - add_button_title=None: the title of the "Attach" button
 - foldable=False: if True, make the list of attachments foldable
<html xmlns=""
      py:with="compact = value_of('compact', False);
               add_button_title = value_of('add_button_title', None);
               foldable = value_of('foldable', False)" py:strip="">
  <py:def function="show_one_attachment(attachment)">
    <i18n:msg params="file, size, author, date">
      <a href="${url_of(attachment.resource)}" title="View attachment">${attachment.filename
        }</a><a href="${url_of(attachment.resource, format='raw')}" class="trac-rawlink" title="Download">&#8203;</a>
       (<span title="${_('%(size)s bytes', size=attachment.size)}">${pretty_size(attachment.size)}</span>) -
      added by <em>${authorinfo(}</em> ${dateinfo(} ago.
  <py:if test="alist.attachments or alist.can_create">
    <div id="attachments" py:choose="">
      <py:when test="compact and alist.attachments">
        <h3 class="${foldable and 'foldable' or None}">Attachments</h3>
          <py:for each="attachment in alist.attachments">
              <q py:if="compact and attachment.description">${wiki_to_oneliner(context, attachment.description)}</q>
      <py:when test="not compact">
        <h2 class="${foldable and 'foldable' or None}">Attachments</h2>
        <div py:if="alist.attachments or alist.can_create">
          <dl py:if="alist.attachments" class="attachments">
            <py:for each="attachment in alist.attachments">
              <dd py:if="attachment.description">
                ${wiki_to_oneliner(context, attachment.description)}
          <xi:include href="attach_file_form.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.