diff options
-rw-r--r-- | app/models/incoming_message.rb | 6 | ||||
-rw-r--r-- | app/views/request/_bubble.rhtml | 2 | ||||
-rw-r--r-- | public/images/icon_application_msexcel_large.png | bin | 0 -> 2891 bytes | |||
-rw-r--r-- | todo.txt | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 6d37ab01d..8aaaa66e6 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -17,7 +17,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: incoming_message.rb,v 1.73 2008-04-04 01:44:41 francis Exp $ +# $Id: incoming_message.rb,v 1.74 2008-04-14 15:45:01 francis Exp $ # TODO @@ -56,6 +56,8 @@ class FOIAttachment "attachment.pdf" elsif @content_type == 'application/msword' "attachment.doc" + elsif @content_type == 'application/msexcel' + "attachment.xls" else "attachment.bin" end @@ -335,6 +337,8 @@ class IncomingMessage < ActiveRecord::Base attachment.content_type = 'application/pdf' elsif attachment.filename.match(/\.doc$/) attachment.content_type = 'application/msword' + elsif attachment.filename.match(/\.xls$/) + attachment.content_type = 'application/msexcel' else attachment.content_type = 'application/octet-stream' end diff --git a/app/views/request/_bubble.rhtml b/app/views/request/_bubble.rhtml index 9d9d2f7a9..a9e904c0f 100644 --- a/app/views/request/_bubble.rhtml +++ b/app/views/request/_bubble.rhtml @@ -7,7 +7,7 @@ <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 => a.display_filename) %> - <% if ['application/pdf', 'application/msword', 'text/plain', 'image/tiff'].include?(a.content_type) %> + <% if ['application/pdf', 'application/msword', 'application/msexcel', 'text/plain', 'image/tiff'].include?(a.content_type) %> <a href="<%=attachment_url%>"><img class="attachment_image" alt="Attachment" src="/images/icon_<%=a.content_type.sub('/', '_')%>_large.png"></a> <% else %> Attachment: diff --git a/public/images/icon_application_msexcel_large.png b/public/images/icon_application_msexcel_large.png Binary files differnew file mode 100644 index 000000000..3f346f5ef --- /dev/null +++ b/public/images/icon_application_msexcel_large.png @@ -196,6 +196,8 @@ Quoting fixing TODO: http://www.whatdotheyknow.com/request/71/response/108 http://www.whatdotheyknow.com/request/police_powers_to_inform_car_insu http://www.whatdotheyknow.com/request/30/response/166 + http://www.whatdotheyknow.com/request/road_safety_campaign_expenditure + http://www.whatdotheyknow.com/request/47/response/283 Char encoding and other bad formatting: http://www.whatdotheyknow.com/request/107/response/144 http://www.whatdotheyknow.com/request/35/response/177 |