From bc2b26251021cf01b076b36bf51edd247e756546 Mon Sep 17 00:00:00 2001 From: Stella Rouzi Date: Mon, 2 Mar 2015 11:35:08 +0200 Subject: [PATCH] add username and nickname in user#show and styling changes --- app/controllers/admin/users_controller.rb | 2 +- app/views/admin/users/show.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index bfe0b4cf..607cbe7b 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -14,7 +14,7 @@ module Admin # Variable @show_attributes holds the attributes that are visible for the 'show' action # If you want to change the attributes that are shown in the 'show' action of users # add/remove the attributes in the following string array - @show_attributes = %w(name email affiliation biography registered attended roles created_at + @show_attributes = %w(name email username nickname affiliation biography registered attended roles created_at updated_at sign_in_count current_sign_in_at last_sign_in_at current_sign_in_ip last_sign_in_ip) end diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index 98196a37..ef0f7b6e 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -11,11 +11,11 @@ #user-info-content.tab-pane{class: "#{'active' unless params[:tab] == 'submissions-content'}"} - if can? :edit, @user .pull-right - = link_to "Edit", edit_admin_user_path(@user), class: 'btn btn-primary' + = link_to 'Edit', edit_admin_user_path(@user), class: 'btn btn-primary' %table.table - @show_attributes.each do |attr| %tr - %td{class: 'table20'} + %td.col-md-2 %b = attr.capitalize.gsub('_', ' ') - if attr == 'roles'