X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9e3bb9b984ff700fc3455f87437a8f1ac5841f0e..1c03f0c13bd55683a12c68d9bfc2a602b7815a16:/apps/workbench/app/controllers/repositories_controller.rb diff --git a/apps/workbench/app/controllers/repositories_controller.rb b/apps/workbench/app/controllers/repositories_controller.rb index b6b3295ef8..c5b3501b32 100644 --- a/apps/workbench/app/controllers/repositories_controller.rb +++ b/apps/workbench/app/controllers/repositories_controller.rb @@ -1,5 +1,35 @@ class RepositoriesController < ApplicationController + before_filter :set_share_links, if: -> { defined? @object } + def index_pane_list %w(recent help) end + + def show_pane_list + if @user_is_manager + panes = super | %w(Sharing) + panes.insert(panes.length-1, panes.delete_at(panes.index('Advanced'))) if panes.index('Advanced') + panes + else + panes = super + end + panes.delete('Attributes') if !current_user.is_admin + panes + end + + def show_tree + @commit = params[:commit] + @path = params[:path] || '' + @subtree = @object.ls_subtree @commit, @path.chomp('/') + end + + def show_blob + @commit = params[:commit] + @path = params[:path] + @blobdata = @object.cat_file @commit, @path + end + + def show_commit + @commit = params[:commit] + end end