diff options
author | francis <francis> | 2008-03-03 18:25:24 +0000 |
---|---|---|
committer | francis <francis> | 2008-03-03 18:25:24 +0000 |
commit | 464953d705e6316fad18a2d9d50f7c813bb6d663 (patch) | |
tree | 6f9fc355a67b596d0b01db3038b13361f4f55b3c | |
parent | a59adaa277f92c6454752e6e482971ea89fb17e1 (diff) |
Make graphic icion on attachments clickable.
-rw-r--r-- | app/views/request/_bubble.rhtml | 9 | ||||
-rw-r--r-- | public/stylesheets/main.css | 1 |
2 files changed, 6 insertions, 4 deletions
diff --git a/app/views/request/_bubble.rhtml b/app/views/request/_bubble.rhtml index 31233ed28..03bd07469 100644 --- a/app/views/request/_bubble.rhtml +++ b/app/views/request/_bubble.rhtml @@ -5,14 +5,15 @@ <div class="xboxcontent"> <% if not attachments.nil? and attachments.size > 0 %> <p> <% attachments.each do |a| %> + <% attachment_url = get_attachment_url(:id => incoming_message.info_request_id, + :incoming_message_id => incoming_message.id, :part => a.url_part_number, :file_name => + (TMail::Mail.get_part_file_name(a) || "download.bin")) %> <% if ['application/pdf', 'application/msword', 'text/plain', 'image/tiff'].include?(a.content_type) %> - <img class="attachment_image" alt="Attachment" src="/images/icon_<%=a.content_type.sub('/', '_')%>_large.png"> + <a href="<%=attachment_url%>"><img class="attachment_image" alt="Attachment" src="/images/icon_<%=a.content_type.sub('/', '_')%>_large.png"></a> <% else %> Attachment: <% end %> - <%= link_to (TMail::Mail.get_part_file_name(a) || "download.bin"), get_attachment_url(:id => incoming_message.info_request_id, - :incoming_message_id => incoming_message.id, :part => a.url_part_number, :file_name => - (TMail::Mail.get_part_file_name(a) || "download.bin")) %> + <%= link_to (TMail::Mail.get_part_file_name(a) || "download.bin"), attachment_url %> <!-- (<%= a.content_type %>) --> <br> <% end %> diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 2cb536111..7244e4d10 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -531,6 +531,7 @@ dt { .xb7 {margin:0 1px; background:#6f6f6f; border-width:0 3px; height:2px;} .xboxcontent {display:block; background:#6f6f6f; border:3px solid #fff; border-width:0 3px;} +.xboxcontent img { border: 0 } .xsnazzy a:link { color: #0000aa; |