From 7b32035f67260d52c427f9cb84527c26db3f121c Mon Sep 17 00:00:00 2001 From: Absurdon Date: Tue, 7 Mar 2017 01:45:39 +0100 Subject: [PATCH] Added Button to show user history for admins --- app/views/users/show.html.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 732b463..9890008 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -43,5 +43,8 @@ <%= link_to 'Edit', edit_user_path(@user), class: 'button' %> <%= link_to 'My Agenda', "/users/agenda/#{cuser.id}", class: 'button' %> <% end %> + <% if cuser and cuser.admin? %> + <%= link_to 'Show History', "/users/history/#{@user.id}", class: 'button' %> + <% end %>