From af19eb3a35900457a1dcfadee789a9052fb50335 Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Sun, 16 Mar 2014 17:09:35 -0400 Subject: [PATCH] Add link from users#index to users#activity. Not as good as showing it in the tab itself, but better than no link at all. --- apps/workbench/app/controllers/users_controller.rb | 8 ++++++++ apps/workbench/app/views/users/_show_activity.html.erb | 4 ++++ 2 files changed, 12 insertions(+) create mode 100644 apps/workbench/app/views/users/_show_activity.html.erb diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb index c87bd25295..35c9660d6c 100644 --- a/apps/workbench/app/controllers/users_controller.rb +++ b/apps/workbench/app/controllers/users_controller.rb @@ -71,6 +71,14 @@ class UsersController < ApplicationController end end + def index_pane_list + if current_user.andand.is_admin + super | %w(Activity) + else + super + end + end + def sudo resp = $arvados_api_client.api(ApiClientAuthorization, '', { api_client_authorization: { diff --git a/apps/workbench/app/views/users/_show_activity.html.erb b/apps/workbench/app/views/users/_show_activity.html.erb new file mode 100644 index 0000000000..ea53307ed5 --- /dev/null +++ b/apps/workbench/app/views/users/_show_activity.html.erb @@ -0,0 +1,4 @@ +

+ As an admin user, you can <%= link_to "view recent user activity", activity_users_url %>. +

+ -- 2.30.2