Add link from users#index to users#activity. Not as good as showing it
authorTom Clegg <tom@curoverse.com>
Sun, 16 Mar 2014 21:09:35 +0000 (17:09 -0400)
committerTom Clegg <tom@curoverse.com>
Sun, 16 Mar 2014 21:09:35 +0000 (17:09 -0400)
in the tab itself, but better than no link at all.

apps/workbench/app/controllers/users_controller.rb
apps/workbench/app/views/users/_show_activity.html.erb [new file with mode: 0644]

index c87bd252958353046b649f9a13ec57420e02b416..35c9660d6ccdf55a29b165efecd3cb402ceb9e96 100644 (file)
@@ -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 (file)
index 0000000..ea53307
--- /dev/null
@@ -0,0 +1,4 @@
+<p>
+  As an admin user, you can <%= link_to "view recent user activity", activity_users_url %>.
+</p>
+