[ARVADOS] created: c4cfb4caca122ba09ab9153453650c308457e675

git at public.curoverse.com git at public.curoverse.com
Thu Jun 5 13:20:49 EDT 2014


        at  c4cfb4caca122ba09ab9153453650c308457e675 (commit)


commit c4cfb4caca122ba09ab9153453650c308457e675
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Jun 5 13:20:39 2014 -0400

    2961: Added tab_pane query parameter which returns just the desired tab pane partial.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index e1b6a7f..24d6ab3 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -87,7 +87,15 @@ class ApplicationController < ActionController::Base
     @objects = @objects.filter(@filters).limit(@limit).offset(@offset).all
     respond_to do |f|
       f.json { render json: @objects }
-      f.html { render }
+      f.html {
+        if params['tab_pane']
+          comparable = self.respond_to? :compare
+          render(partial: 'show_' + params['tab_pane'].downcase,
+                 locals: { comparable: comparable, objects: @objects })
+        else
+          render
+        end
+      }
       f.js { render }
     end
   end
@@ -97,12 +105,19 @@ class ApplicationController < ActionController::Base
       return render_not_found("object not found")
     end
     respond_to do |f|
+      puts f
       f.json { render json: @object.attributes.merge(href: url_for(@object)) }
       f.html {
-        if request.method == 'GET'
-          render
+        if params['tab_pane']
+          comparable = self.respond_to? :compare
+          render(partial: 'show_' + params['tab_pane'].downcase,
+                 locals: { comparable: comparable, objects: @objects })
         else
-          redirect_to params[:return_to] || @object
+          if request.method == 'GET'
+            render
+          else
+            redirect_to params[:return_to] || @object
+          end
         end
       }
       f.js { render }
diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index 218ba89..7c6bab6 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -88,6 +88,8 @@ class CollectionsController < ApplicationController
       info[:links] << link
     end
     @request_url = request.url
+
+    super
   end
 
   def show_file_links
diff --git a/apps/workbench/app/controllers/folders_controller.rb b/apps/workbench/app/controllers/folders_controller.rb
index 8ebb1a3..e00608e 100644
--- a/apps/workbench/app/controllers/folders_controller.rb
+++ b/apps/workbench/app/controllers/folders_controller.rb
@@ -74,6 +74,8 @@ class FoldersController < ApplicationController
     @shared_folder_tree =
       sorted_paths.call({'Shared with me' =>
                           buildtree.call(children_of, false)})
+
+    super
   end
 
   def choose
diff --git a/apps/workbench/app/controllers/groups_controller.rb b/apps/workbench/app/controllers/groups_controller.rb
index 854496a..30cd1e3 100644
--- a/apps/workbench/app/controllers/groups_controller.rb
+++ b/apps/workbench/app/controllers/groups_controller.rb
@@ -4,6 +4,7 @@ class GroupsController < ApplicationController
     @group_uuids = @groups.collect &:uuid
     @links_from = Link.where link_class: 'permission', tail_uuid: @group_uuids
     @links_to = Link.where link_class: 'permission', head_uuid: @group_uuids
+    super
   end
 
   def show
diff --git a/apps/workbench/app/controllers/jobs_controller.rb b/apps/workbench/app/controllers/jobs_controller.rb
index 4746635..9de82d8 100644
--- a/apps/workbench/app/controllers/jobs_controller.rb
+++ b/apps/workbench/app/controllers/jobs_controller.rb
@@ -16,7 +16,7 @@ class JobsController < ApplicationController
 
     @svg = ProvenanceHelper::create_provenance_graph nodes, "provenance_svg", {
       :request => request,
-      :all_script_parameters => true, 
+      :all_script_parameters => true,
       :script_version_nodes => true}
   end
 
@@ -27,12 +27,13 @@ class JobsController < ApplicationController
       generate_provenance(@objects)
     else
       @limit = 20
-      super
     end
+    super
   end
 
   def show
     generate_provenance([@object])
+    super
   end
 
   def index_pane_list
diff --git a/apps/workbench/app/controllers/sessions_controller.rb b/apps/workbench/app/controllers/sessions_controller.rb
index 585f322..abed6b6 100644
--- a/apps/workbench/app/controllers/sessions_controller.rb
+++ b/apps/workbench/app/controllers/sessions_controller.rb
@@ -8,5 +8,6 @@ class SessionsController < ApplicationController
   end
   def index
     redirect_to root_url if session[:arvados_api_token]
+    super
   end
 end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list