projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
20ffc96
)
2961: Added tab_pane query parameter which returns just the desired tab pane partial.
author
Peter Amstutz <peter.amstutz@curoverse.com>
Thu, 5 Jun 2014 17:20:39 +0000
(13:20 -0400)
committer
Peter Amstutz <peter.amstutz@curoverse.com>
Thu, 5 Jun 2014 17:20:39 +0000
(13:20 -0400)
apps/workbench/app/controllers/application_controller.rb
patch
|
blob
|
history
apps/workbench/app/controllers/collections_controller.rb
patch
|
blob
|
history
apps/workbench/app/controllers/folders_controller.rb
patch
|
blob
|
history
apps/workbench/app/controllers/groups_controller.rb
patch
|
blob
|
history
apps/workbench/app/controllers/jobs_controller.rb
patch
|
blob
|
history
apps/workbench/app/controllers/sessions_controller.rb
patch
|
blob
|
history
diff --git
a/apps/workbench/app/controllers/application_controller.rb
b/apps/workbench/app/controllers/application_controller.rb
index e1b6a7f929450e8320941ee9b9fe030f791b47ae..24d6ab3d974d090c47ab755680ceed9ddb316cd8 100644
(file)
--- 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 }
@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
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|
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 {
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
else
- redirect_to params[:return_to] || @object
+ if request.method == 'GET'
+ render
+ else
+ redirect_to params[:return_to] || @object
+ end
end
}
f.js { render }
end
}
f.js { render }
diff --git
a/apps/workbench/app/controllers/collections_controller.rb
b/apps/workbench/app/controllers/collections_controller.rb
index 218ba893fc43d6c089be664a80baf7e570d2e6be..7c6bab63f6ee6f580d9f02b2ad1a74568c7b3497 100644
(file)
--- 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
info[:links] << link
end
@request_url = request.url
+
+ super
end
def show_file_links
end
def show_file_links
diff --git
a/apps/workbench/app/controllers/folders_controller.rb
b/apps/workbench/app/controllers/folders_controller.rb
index 8ebb1a34b101bf8bdbab1050a3485f9330ab8d0f..e00608eb8d7a909b67f6a2af50afed737557cd00 100644
(file)
--- 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)})
@shared_folder_tree =
sorted_paths.call({'Shared with me' =>
buildtree.call(children_of, false)})
+
+ super
end
def choose
end
def choose
diff --git
a/apps/workbench/app/controllers/groups_controller.rb
b/apps/workbench/app/controllers/groups_controller.rb
index 854496a56a27c2e73e4a2b6a68cbc8803a440bac..30cd1e35c8b8d8971b994d44c531d322cc71dcea 100644
(file)
--- 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
@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
end
def show
diff --git
a/apps/workbench/app/controllers/jobs_controller.rb
b/apps/workbench/app/controllers/jobs_controller.rb
index 4746635c72a3ea141b64648a1efc675620be2657..9de82d82f950dfc8f5bf32846e9cb31ef059eb1b 100644
(file)
--- 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,
@svg = ProvenanceHelper::create_provenance_graph nodes, "provenance_svg", {
:request => request,
- :all_script_parameters => true,
+ :all_script_parameters => true,
:script_version_nodes => true}
end
:script_version_nodes => true}
end
@@
-27,12
+27,13
@@
class JobsController < ApplicationController
generate_provenance(@objects)
else
@limit = 20
generate_provenance(@objects)
else
@limit = 20
- super
end
end
+ super
end
def show
generate_provenance([@object])
end
def show
generate_provenance([@object])
+ super
end
def index_pane_list
end
def index_pane_list
diff --git
a/apps/workbench/app/controllers/sessions_controller.rb
b/apps/workbench/app/controllers/sessions_controller.rb
index 585f322a859186d06ba02d9b8a37e8f50c965490..abed6b68a7127e33fae06943025385f0bd43a7bc 100644
(file)
--- 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]
end
def index
redirect_to root_url if session[:arvados_api_token]
+ super
end
end
end
end