Index: ticket/templates/ticket.html
===================================================================
--- ticket/templates/ticket.html	(revision 8160)
+++ ticket/templates/ticket.html	(working copy)
@@ -54,7 +54,9 @@
           <strong>${field_name}</strong>
           <py:choose>
             <py:when test="field_name == 'attachment'">
-              <a href="${href.attachment('ticket', ticket.id, field.new)}"><em>${field.new}</em></a> added
+              <a href="${href.attachment('ticket', ticket.id, field.new)}"><em>${field.new}</em></a> 
+              <a href="${href('raw-attachment', 'ticket', ticket.id, field.new)}" title="Original format" class="rawlink"><img src="${chrome.htdocs_location}download.gif" alt="download" /></a> 
+              added
             </py:when>
             <py:when test="'rendered' in field">${field.rendered}</py:when>
             <py:when test="field.old and field.new">
Index: templates/macros.html
===================================================================
--- templates/macros.html	(revision 8160)
+++ templates/macros.html	(working copy)
@@ -161,6 +161,7 @@
   <py:def function="list_of_attachments(alist, compact=False, add_button_title=None)">
     <py:def function="show_one_attachment(attachment)">
       <a href="${url_of(attachment.resource)}" title="View attachment">$attachment.filename</a>
+      <a href="${url_of(attachment.resource, format='raw')}" title="Original format" class="rawlink"><img src="${chrome.htdocs_location}download.gif" alt="download" /></a>
       (${sizeinfo(attachment.size)}) - added by <em>${authorinfo(attachment.author)}</em>
       ${dateinfo(attachment.date)} ago.
     </py:def>
Index: htdocs/css/ticket.css
===================================================================
--- htdocs/css/ticket.css	(revision 8160)
+++ htdocs/css/ticket.css	(working copy)
@@ -115,3 +115,7 @@
  padding: 0 1em 0 0;
 }
 fieldset.radio label { padding-right: 1em }
+
+/* do not draw dotted line under raw-attachment icon */
+.rawlink { border-bottom: none; }
+.rawlink img { vertical-align: bottom; margin-bottom: 2px }

