def attachment_thumbnail
      if file_extension == "pdf" && attachment[:thumbnail_url]
        image_tag(attachment[:thumbnail_url])
      elsif file_extension == "html"
        image_tag('pub-cover-html.png')
      elsif %w{doc docx odt}.include?(file_extension)
        image_tag('pub-cover-doc.png')
      elsif %w{xls xlsx ods csv}.include?(file_extension)
        image_tag('pub-cover-spreadsheet.png')
      else
        image_tag('pub-cover.png')
      end
    end
def attachment_thumbnail
      if file_extension == "pdf" && attachment[:thumbnail_url]
        image_tag(attachment[:thumbnail_url])
      elsif file_extension == "html"
        image_tag('pub-cover-html.png')
      elsif %w{doc docx odt}.include?(file_extension)
        image_tag('pub-cover-doc.png')
      elsif %w{xls xlsx ods csv}.include?(file_extension)
        image_tag('pub-cover-spreadsheet.png')
      else
        image_tag('pub-cover.png')
      end
    end
FIXME: usage of image_tag will cause these to render at /images/ which seems
 very host dependent. I assume this will need links to static urls.