Ticket #5718: downloadUnrenderableAttachments.2.patch
| File downloadUnrenderableAttachments.2.patch, 1.3 KB (added by tedfordgif@…, 8 months ago) |
|---|
-
\trac\attachment.py
old new 399 399 data = self._render_form(req, attachment) 400 400 else: 401 401 data = self._render_view(req, attachment) 402 if self.env.config.get('wiki','forward_to_raw_href') and data['preview']['rendered'] is None: 403 req.redirect(data['preview']['raw_href']) 404 return # cancel all template processing 402 405 403 406 add_stylesheet(req, 'common/css/code.css') 404 407 return 'attachment.html', data, None -
\trac\templates\macros.html
old new 172 172 <a href="${url_of(attachment.resource)}" title="View attachment">$attachment.filename</a> 173 173 (${sizeinfo(attachment.size)}) - added by <em>${authorinfo(attachment.author)}</em> 174 174 ${dateinfo(attachment.date)} ago. 175 <py:if test="attachment and 'ATTACHMENT_DELETE' in perm(attachment.resource)"> 176 <a href="${url_of(attachment.resource)}?action=delete">${_('Delete')}</a> 177 </py:if> 175 178 </py:def> 176 179 <py:if test="alist.attachments or alist.can_create"> 177 180 <py:choose test="">
