User#show

This commit is contained in:
Andrew Radev 2015-05-30 16:26:48 +03:00
parent e98a0c956c
commit ea3c8e70fd
4 changed files with 61 additions and 8 deletions

View File

@ -0,0 +1,24 @@
.speaker-profile {
@extend .col-sm-offset-2;
@extend .col-sm-8;
.center {
text-align: center;
}
.profile-image {
@extend .img-thumbnail;
max-width: 171px;
max-height: 180px;
}
.social {
@extend .btn-group;
margin-top: 10px;
a {
@extend .btn;
@extend .btn-default;
}
}
}

View File

@ -8,6 +8,7 @@
@import "morris"; @import "morris";
@import "users";
@import "colors"; @import "colors";
@import "layout"; @import "layout";
@import "forms"; @import "forms";

View File

@ -7,7 +7,9 @@
= simple_nested_form_for [:management, @user], wrapper: :horizontal_form, html: { class: 'form-horizontal' } do |f| = simple_nested_form_for [:management, @user], wrapper: :horizontal_form, html: { class: 'form-horizontal' } do |f|
.panel.panel-primary .panel.panel-primary
.panel-heading .panel-heading
h1.panel-title = t 'views.user.info' h1.panel-title
= t 'views.user.info'
= link_to icon(:eye), [:management, @user], class: 'btn btn-xs btn-info pull-right'
.panel-body .panel-body
.row .row

View File

@ -2,12 +2,38 @@
= @user.name = @user.name
.row .row
.col-lg-2 .speaker-profile
= image_tag(@user.profile_picture.medium.url) .panel.panel-default
.panel-heading
h1.panel-title
= @user.name
= link_to icon(:edit), edit_management_user_path(@user), class: 'btn btn-xs btn-danger pull-right'
.panel-body
.center
= image_tag @user.speaker_profile.picture.medium.url, class: "profile-image"
- if @user.speaker_profile.organisation.present?
div
=> icon :briefcase
= @user.speaker_profile.organisation
div.social
= link_to "mailto://#{@user.email}"
= icon :envelope
- if @user.speaker_profile.github.present?
= link_to "https://github.com/#{@user.speaker_profile.github}"
= icon :github
- if @user.speaker_profile.twitter.present?
= link_to "https://twitter.com/#{@user.speaker_profile.twitter}"
= icon :twitter
.col-lg-10 hr
h1.page-header
= @user.name
- if @profile.present? h4 = SpeakerProfile.human_attribute_name(:biography)
p.biography= simple_format @profile.biography = simple_format @user.speaker_profile.biography
h4 = t :contacts
- if @user.speaker_profile.twitter.present?
p #{icon :twitter} @#{@user.speaker_profile.twitter}
- if @user.speaker_profile.public_email.present?
p #{icon :envelope} #{@user.speaker_profile.public_email} (#{t(:public)})
p #{icon :envelope} #{@user.email} (#{t(:private)})
p #{glyph :phone} #{Phony.format(@user.speaker_profile.mobile_phone, format: :international)}