[ARVADOS] created: 7b3f8ace626fa8fe401742fd9b2a616d651d6c2b

git at public.curoverse.com git at public.curoverse.com
Mon Mar 3 08:54:47 EST 2014


        at  7b3f8ace626fa8fe401742fd9b2a616d651d6c2b (commit)


commit 7b3f8ace626fa8fe401742fd9b2a616d651d6c2b
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Mar 3 08:55:06 2014 -0500

    In theory this works but I need a keep server to test it.

diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb
index 08e0ff6..357c841 100644
--- a/apps/workbench/app/views/collections/_show_files.html.erb
+++ b/apps/workbench/app/views/collections/_show_files.html.erb
@@ -1,3 +1,10 @@
+<% content_for :css do %>
+.file-list-inline-image {
+  height: 4em; 
+  width: auto
+}
+<% end %>
+
 <table class="table table-condensed table-fixedlayout">
   <colgroup>
     <col width="4%" />
@@ -34,7 +41,7 @@
 
       <td>
         <%= link_to((if /\.(jpg|jpeg|gif|png)$/.match(file[1]) then
-                       image_tag "#{url_for @object}/#{file_path}"
+                       image_tag "#{url_for @object}/#{file_path}", class: "file-list-inline-image"
                      else
                        file[1]
                      end), 

commit 0d4ddf36fb71ecf7cc981c67c07584a3a7fcac46
Merge: 5f3de04 ac5a69c
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Mar 3 08:43:55 2014 -0500

    Merge branch '2049-run-job-from-workbench' into 1971-show-image-thumbnails


commit 5f3de04d46dd4aeec45731b4e5c479c689eee7b6
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Mar 3 08:43:12 2014 -0500

    Show images in files inline.

diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb
index 385af8a..9a50329 100644
--- a/apps/workbench/app/views/collections/_show_files.html.erb
+++ b/apps/workbench/app/views/collections/_show_files.html.erb
@@ -21,7 +21,13 @@
       </td>
 
       <td>
-        <%= link_to file[1], {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'inline'}, {title: 'View in browser'} %>
+        <%= link_to((if /\.(jpg|jpeg|gif|png)$/.match(file[1]) then
+                       image_tag "#{url_for @object}/#{file_path}"
+                     else
+                       file[1]
+                     end), 
+                    {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'inline'}, 
+                    {title: 'View in browser'}) %>
       </td>
 
       <td style="text-align:right">

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list