clarion/app/views/management/personal_profiles/show.html.slim

122 lines
5.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- content_for :title
= @profile.name
.row
.col-lg-12
h1.page-header
= PersonalProfile.model_name.human.mb_chars.capitalize
.row
.col-sm-5.col-md-4
.panel.panel-default
.panel-image
= image_tag @profile.picture
.panel-body
.media
.media-body
h4.media-heading
= @profile.name
hr
= simple_format @profile.biography
ul.list-group
- if @profile.mobile_phone.present?
li.list-group-item
h5.list-group-item-heading = PersonalProfile.human_attribute_name :mobile_phone
p.list-group-item-text = Phony.format(@profile.mobile_phone, format: :international)
- if @profile.organisation.present?
li.list-group-item
h5.list-group-item-heading = PersonalProfile.human_attribute_name :organisation
p.list-group-item-text = @profile.organisation
- if @profile.twitter.present?
li.list-group-item
h5.list-group-item-heading = PersonalProfile.human_attribute_name :twitter
p.list-group-item-text
= link_to "@#{@profile.twitter}", "https://twitter.com/#{@profile.twitter}", target: '_blank'
- if @profile.github.present?
li.list-group-item
h5.list-group-item-heading = PersonalProfile.human_attribute_name :github
p.list-group-item-text
= link_to @profile.github, "https://github.com/#{@profile.github}", target: '_blank'
- if @profile.public_email.present?
li.list-group-item
h5.list-group-item-heading = PersonalProfile.human_attribute_name :public_email
p.list-group-item-text = @profile.public_email
li.list-group-item
h5.list-group-item-heading = t '.private_email'
p.list-group-item-text = @user.email
.panel-footer
.text-right
.btn-group.btn-group-sm
= action_buttons @conference, @profile, [:edit, :destroy]
.col-sm-7.col-md-8
.row
.col-md-6
.panel.panel-info
.panel-heading
.row
.col-xs-3
= icon 'files-o', '', class: 'fa-5x'
.col-xs-9.text-right
.huge
= @user.events_participated_in.size
div
= Event.model_name.human(count: @user.events_participated_in.size)
.col-md-6
.panel class="panel-#{rating_label_color(@user.average_rating || 5)}" title=human_rating(@user.average_rating)
.panel-heading
.row
.col-xs-3
= icon 'star', '', class: 'fa-5x'
.col-xs-9.text-right
.huge
= number_with_precision(@user.average_rating, precision: 2, strip_insignificant_zeros: true) || ''
div
= User.human_attribute_name(:average_rating).downcase
h2 = t '.talk_history'
.panel.panel-default
- if @user.events_participated_in.any?
table.table.table-striped.table-hover.record-table
thead
tr
th.main
= Event.human_attribute_name :title
th.text-center
= Event.human_attribute_name :rating
th.text-center.hidden-md.hidden-sm.hidden-xs
= Event.human_attribute_name :rank
th.hidden-md.hidden-sm.hidden-xs
= Event.human_attribute_name :conference
th.hidden-md.hidden-sm.hidden-xs
= Event.human_attribute_name :status
th
tbody
- @user.events_participated_in.order(created_at: :desc).each do |event|
tr
td = event.title
td.text-center
- if event.rated?
.large
.label class="label-#{rating_label_color(event.average_rating)}" title=human_rating(event.average_rating)
= number_with_precision event.average_rating, precision: 2, strip_insignificant_zeros: true
td.text-center.hidden-md.hidden-sm.hidden-xs
- if event.ranked?
.large
.label.label-info = event.rank
td.hidden-md.hidden-sm.hidden-xs
= event.conference.title
td.hidden-md.hidden-sm.hidden-xs
span class="label label-lg label-#{proposition_status_class(event.status)}"
= icon(proposition_status_glyph(event.status), t("activerecord.attributes.proposition.statuses.#{event.status}"))
td.actions
.btn-group.btn-group-sm
= action_buttons event.conference, event, [:show]
h2 = t '.comments_from_the_audience'
- if @user.feedbacks_with_comment.size > 0
.panel.panel-default
table.table.table-striped
tbody
= render partial: '/management/shared/feedback', collection: @user.feedbacks_with_comment.order(created_at: :desc)
- else
p = t '.no_comments_received'