{# Copyright (C) 2006-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 http://trac.edgewall.com/license.html. This software consists of voluntary contributions made by many individuals. For the exact contribution history, see the revision history and logs, available at http://trac.edgewall.org/. #} # extends 'layout.html' # set parent = attachments.parent if attachments else attachment.resource.parent # block title # if mode == 'new': ${_("%(parent)s – Attachment", parent=name_of(parent))} # elif mode == 'list': ${_("%(parent)s – Attachments", parent=name_of(parent))} # else: # trans filename = attachment.filename, parent = name_of(parent) ${filename} on ${parent} – Attachment # endtrans # endif ${ super() } # endblock title # block head ${ super() } # if preview: # endif # endblock head # block content
# if mode == 'new':

${tag_("Add Attachment to %(parent)s", parent=tag.a(name_of(parent), href=url_of(parent)))}

${jmacros.form_token_input()}
${_("Attachment Info")} # if authname == 'anonymous':
# set preferences ${ _("Preferences")} # endset # if author == 'anonymous':

# trans preferences E-mail address and name can be saved in the ${preferences}. # endtrans

# endif
# endif
# if authname and authname != 'anonymous':
# endif
# elif mode == 'delete':

${name_of(parent)}: ${attachment.filename}

${_("Are you sure you want to delete this attachment?")}
${_("This is an irreversible operation.")}

${jmacros.form_token_input()}
# elif mode == 'list':

${name_of(parent)}

# with # set context = context.child(parent) # set alist = attachments # include 'list_of_attachments.html' # endwith # else: ## 'render' mode

${name_of(parent)}: ${attachment.filename}

# with # set file = attachment.filename # set size ${ pretty_size(attachment.size)} # endset # set author = authorinfo(attachment.author) # set pdate = pretty_dateinfo(attachment.date) # trans file, size, author, pdate File ${file}, ${size} (added by ${author}, ${pdate}) # endtrans # endwith
${wiki_to_html(context.child(parent), attachment.description)}
# if preview:
# include 'preview_file.html'
# endif # if attachment and 'ATTACHMENT_DELETE' in perm(attachment.resource):
{# jinjacheck: "ID delete already defined" OK #}
# endif # endif
${ super() } # endblock content