X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d3229c7f727f40436cad66fba5f3345e0b3eede5..b6f73f7acffa9b2f37c78826ff6cee89987a7edc:/apps/workbench/app/controllers/collections_controller.rb diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb index 39f637e227..f4aa0395f3 100644 --- a/apps/workbench/app/controllers/collections_controller.rb +++ b/apps/workbench/app/controllers/collections_controller.rb @@ -14,7 +14,9 @@ class CollectionsController < ApplicationController RELATION_LIMIT = 5 def show_pane_list - %w(Files Provenance_graph Used_by Advanced) + panes = %w(Files Upload Provenance_graph Used_by Advanced) + panes = panes - %w(Upload) unless (@object.editable? rescue false) + panes end def set_persistent @@ -233,10 +235,7 @@ class CollectionsController < ApplicationController def sharing_popup @search_sharing = search_scopes - respond_to do |format| - format.html - format.js - end + render("sharing_popup.js", content_type: "text/javascript") end helper_method :download_link @@ -246,18 +245,15 @@ class CollectionsController < ApplicationController end def share - a = ApiClientAuthorization.create(scopes: sharing_scopes) - @search_sharing = search_scopes - render 'sharing_popup' + ApiClientAuthorization.create(scopes: sharing_scopes) + sharing_popup end def unshare - @search_sharing = search_scopes - @search_sharing.each do |s| + search_scopes.each do |s| s.destroy end - @search_sharing = search_scopes - render 'sharing_popup' + sharing_popup end protected