From 2d285b5cc9b3678aadd5500c8d4eb4bd8e436546 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Wed, 17 Sep 2014 19:11:35 +0300 Subject: [PATCH] Tweak column size --- .../stylesheets/management/_record_table.css.scss | 15 ++++++++++++++- app/views/management/users/_user.html.slim | 8 ++++---- app/views/management/users/index.html.slim | 6 +++--- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/management/_record_table.css.scss b/app/assets/stylesheets/management/_record_table.css.scss index 51bbd42..b87db34 100644 --- a/app/assets/stylesheets/management/_record_table.css.scss +++ b/app/assets/stylesheets/management/_record_table.css.scss @@ -5,6 +5,19 @@ vertical-align: middle !important; } + th.picture, td.picture { + text-align: center; + width: 60px; + } + + th.admin, td.admin { + width: 60px; + } + + th.actions, td.actions { + width: 120px; + } + .picture-placeholder { @extend .img-thumbnail; @@ -16,7 +29,7 @@ } } - .actions { + .actions div { @extend .pull-right; @extend .btn-group; white-space: nowrap; diff --git a/app/views/management/users/_user.html.slim b/app/views/management/users/_user.html.slim index a2f90b0..3217d29 100644 --- a/app/views/management/users/_user.html.slim +++ b/app/views/management/users/_user.html.slim @@ -1,5 +1,5 @@ tr id="user-#{user.id}" - td + td.picture - if user.speaker_profile.present? = image_tag user.speaker_profile.picture.thumb.url, class: 'img-thumbnail' - else @@ -8,15 +8,15 @@ tr id="user-#{user.id}" td = user.email td = user.speaker_profile.try(:first_name) or '-' td = user.speaker_profile.try(:last_name) or '-' - td + td.admin - if user.admin? span.toggle = link_to glyph(:check), toggle_admin_management_user_path(user), remote: true, method: :post, data: {confirm: t(:are_you_sure)}, class: 'checked' - else span.toggle = link_to glyph(:unchecked), toggle_admin_management_user_path(user), remote: true, method: :post, data: {confirm: t(:are_you_sure)}, class: 'unchecked' - td - .actions + td.actions + div = link_to management_user_path(user), title: t(:view), remote: true, disabled: user.speaker_profile.blank? = glyph(:share) = link_to edit_management_user_path(user), title: t(:edit) diff --git a/app/views/management/users/index.html.slim b/app/views/management/users/index.html.slim index 93991d1..720f0f4 100644 --- a/app/views/management/users/index.html.slim +++ b/app/views/management/users/index.html.slim @@ -5,11 +5,11 @@ table.record-table thead tr - th = SpeakerProfile.human_attribute_name(:picture) + th.picture = SpeakerProfile.human_attribute_name(:picture) th = User.human_attribute_name(:email) th = SpeakerProfile.human_attribute_name(:first_name) th = SpeakerProfile.human_attribute_name(:last_name) - th = SpeakerProfile.human_attribute_name(:admin) - th + th.admin = SpeakerProfile.human_attribute_name(:admin) + th.actions tbody = render @users