Tweak column size

This commit is contained in:
Petko Bordjukov 2014-09-17 19:11:35 +03:00
parent 418bbd067d
commit 2d285b5cc9
3 changed files with 21 additions and 8 deletions

View File

@ -5,6 +5,19 @@
vertical-align: middle !important; 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 { .picture-placeholder {
@extend .img-thumbnail; @extend .img-thumbnail;
@ -16,7 +29,7 @@
} }
} }
.actions { .actions div {
@extend .pull-right; @extend .pull-right;
@extend .btn-group; @extend .btn-group;
white-space: nowrap; white-space: nowrap;

View File

@ -1,5 +1,5 @@
tr id="user-#{user.id}" tr id="user-#{user.id}"
td td.picture
- if user.speaker_profile.present? - if user.speaker_profile.present?
= image_tag user.speaker_profile.picture.thumb.url, class: 'img-thumbnail' = image_tag user.speaker_profile.picture.thumb.url, class: 'img-thumbnail'
- else - else
@ -8,15 +8,15 @@ tr id="user-#{user.id}"
td = user.email td = user.email
td = user.speaker_profile.try(:first_name) or '-' td = user.speaker_profile.try(:first_name) or '-'
td = user.speaker_profile.try(:last_name) or '-' td = user.speaker_profile.try(:last_name) or '-'
td td.admin
- if user.admin? - if user.admin?
span.toggle span.toggle
= link_to glyph(:check), toggle_admin_management_user_path(user), remote: true, method: :post, data: {confirm: t(:are_you_sure)}, class: 'checked' = link_to glyph(:check), toggle_admin_management_user_path(user), remote: true, method: :post, data: {confirm: t(:are_you_sure)}, class: 'checked'
- else - else
span.toggle span.toggle
= link_to glyph(:unchecked), toggle_admin_management_user_path(user), remote: true, method: :post, data: {confirm: t(:are_you_sure)}, class: 'unchecked' = link_to glyph(:unchecked), toggle_admin_management_user_path(user), remote: true, method: :post, data: {confirm: t(:are_you_sure)}, class: 'unchecked'
td td.actions
.actions div
= link_to management_user_path(user), title: t(:view), remote: true, disabled: user.speaker_profile.blank? = link_to management_user_path(user), title: t(:view), remote: true, disabled: user.speaker_profile.blank?
= glyph(:share) = glyph(:share)
= link_to edit_management_user_path(user), title: t(:edit) = link_to edit_management_user_path(user), title: t(:edit)

View File

@ -5,11 +5,11 @@
table.record-table table.record-table
thead thead
tr tr
th = SpeakerProfile.human_attribute_name(:picture) th.picture = SpeakerProfile.human_attribute_name(:picture)
th = User.human_attribute_name(:email) th = User.human_attribute_name(:email)
th = SpeakerProfile.human_attribute_name(:first_name) th = SpeakerProfile.human_attribute_name(:first_name)
th = SpeakerProfile.human_attribute_name(:last_name) th = SpeakerProfile.human_attribute_name(:last_name)
th = SpeakerProfile.human_attribute_name(:admin) th.admin = SpeakerProfile.human_attribute_name(:admin)
th th.actions
tbody tbody
= render @users = render @users