{# Copyright (C) 2010-2014 Edgewall Software This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also available at https://trac.edgewall.org/wiki/TracLicense. This software consists of voluntary contributions made by many individuals. For the exact contribution history, see the revision history and logs, available at https://trac.edgewall.org/. #} ## Displays a list of attachments. {# Arguments: - 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 #} # macro show_one_attachment(attachment) # set attachment_links ${ attachment.filename } # endset # with # set size ${ pretty_size(attachment.size)} # endset # set author = authorinfo(attachment.author) # set date = pretty_dateinfo(attachment.date) # trans attachment_links, size, author, date ${attachment_links} (${size}) - added by ${author} ${date}. # endtrans # endwith # endmacro # with # set compact = compact|default(false) # set add_button_title = add_button_title|default(none) # set foldable = foldable|default(false) # set download_all_as_zip

${_("Download all attachments as:")} .zip

# endset # if alist.attachments or alist.can_create:
# if compact and alist.attachments:

${_("Attachments")} (${len(alist.attachments)})

# if alist.download_href: ${ download_all_as_zip|safe } # endif
# elif not compact:

${_("Attachments")} (${len(alist.attachments)})

# if alist.attachments or alist.can_create:
# if alist.attachments:
# for attachment in alist.attachments:
${show_one_attachment(attachment)}
# if attachment.description:
${wiki_to_oneliner(context, attachment.description)}
# endif # endfor
# endif # if alist.attachments and alist.download_href: ${ download_all_as_zip|safe } # endif # include 'attach_file_form.html'
# endif # endif
# endif # endwith ## jinjacheck: "got (a a span CDATA p div )" OK