diff options
| -rw-r--r-- | app/models/incoming_message.rb | 21 | ||||
| -rw-r--r-- | app/views/layouts/default.rhtml | 7 | 
2 files changed, 12 insertions, 16 deletions
| diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index c90af2792..f437ab2c9 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -314,6 +314,7 @@ class FOIAttachment      # Whether this type can be shown in the Google Docs Viewer.      # PDF, PowerPoint and TIFF are listed on https://docs.google.com/viewer      # .doc and .docx were added later http://gmailblog.blogspot.com/2010/06/view-doc-attachments-right-in-your.html +    # .xls appears to work fine too      def has_google_docs_viewer?          if self.content_type == 'application/vnd.ms-word'              return true @@ -325,6 +326,8 @@ class FOIAttachment              return true          elsif self.content_type == 'application/vnd.ms-powerpoint'              return true +        elsif self.content_type == 'application/vnd.ms-excel' +            return true          end      end @@ -397,14 +400,14 @@ class FOIAttachment                  system("/usr/bin/wvHtml --charset=UTF-8 " + tempfile.path + " " + tempfile.path + ".html")                  html = File.read(tempfile.path + ".html")                  File.unlink(tempfile.path + ".html") -            elsif self.content_type == 'application/vnd.ms-excel' -                # Don't colorise, e.g. otherwise this one comes out with white -                # text which is nasty: -                # http://www.whatdotheyknow.com/request/30485/response/74705/attach/html/2/Empty%20premises%20Sefton.xls.html -                IO.popen("/usr/bin/xlhtml -nc -a " + tempfile.path + "", "r") do |child| -                    html = child.read() -                    wrapper_id = "wrapper_xlhtml" -                end +#            elsif self.content_type == 'application/vnd.ms-excel' +#                # Don't colorise, e.g. otherwise this one comes out with white +#                # text which is nasty: +#                # http://www.whatdotheyknow.com/request/30485/response/74705/attach/html/2/Empty%20premises%20Sefton.xls.html +#                IO.popen("/usr/bin/xlhtml -nc -a " + tempfile.path + "", "r") do |child| +#                    html = child.read() +#                    wrapper_id = "wrapper_xlhtml" +#                end              elsif self.content_type == 'application/pdf'                  IO.popen("/usr/bin/pdftohtml -nodrm -zoom 1.0 -stdout -enc UTF-8 -noframes " + tempfile.path + "", "r") do |child|                      html = child.read() @@ -1422,7 +1425,7 @@ class IncomingMessage < ActiveRecord::Base          prefix = email          prefix =~ /^(.*)@/          prefix = $1 -        if !prefix.nil? && prefix.downcase.match(/^(postmaster|mailer-daemon|auto_reply|donotreply|no-reply)$/) +        if !prefix.nil? && prefix.downcase.match(/^(postmaster|mailer-daemon|auto_reply|donotreply|no.reply)$/)              return false          end diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index fb60884c1..606203f06 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -147,13 +147,6 @@      <div id="wrapper">          <div id="content"> -            <div id="downtime"> -                WhatDoTheyKnow will be being moved from London to Manchester -                beginning around 11.30pm GMT on Friday, and so will be -                unavailable from then for a period of time; hopefully not too -                long. -            </div> -              <% if flash[:notice] %>                  <div id="notice"><%= flash[:notice] %></div>              <% end %> | 
