Offer to show html files in browser, too. refs #1748
authorTom Clegg <tom@curoverse.com>
Thu, 2 Jan 2014 17:59:46 +0000 (09:59 -0800)
committerTom Clegg <tom@curoverse.com>
Thu, 2 Jan 2014 17:59:46 +0000 (09:59 -0800)
apps/workbench/app/views/collections/show.html.erb

index cc8eec352f50941797ebbfb146a62f3f0a79e3a3..d525c7804cc329f1c542cee88b86f43343d31d97 100644 (file)
@@ -45,7 +45,7 @@
           </td><td>
             <div style="width:3.5em; display:inline-block">
             <%= link_to raw('<i class="icon-download"></i>'), {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'attachment'}, {class: 'label label-info', title: 'Download'} %>
-            <% if file_path.match /\.(txt|pdf|png|jpe?g|gif|tiff?)$/i %>
+            <% if file_path.match /\.(txt|pdf|png|jpe?g|gif|tiff?|html?)$/i %>
             <%= link_to raw('<i class="icon-play"></i>'), {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'inline'}, {class: 'label label-info', title: 'View in browser'} %>
             <% end %>
             </div>