clarion/app/views/management/events/_speaker.slim

90 lines
4.0 KiB
Plaintext
Raw Normal View History

2015-10-15 20:04:01 +03:00
- personal_profile = speaker.personal_profile(@conference) || speaker.personal_profiles.last
.panel.panel-default
.panel-body
.media
.media-left.hidden-sm.hidden-xs
- if personal_profile.present?
= image_tag personal_profile.picture.medium.url, class: "profile-image"
- else
= icon :user, class: 'fa-5x'
.media-body
.text-center.visible-sm.visible-xs
- if personal_profile.present?
= image_tag personal_profile.picture.medium.url, class: "profile-image img-thumbnail"
- else
= icon :user, class: 'fa-5x'
- if personal_profile.present?
h4.media-heading
= personal_profile.name
- unless personal_profile.conference == @conference
small<
| (
= t('.profile_from', conference: personal_profile.conference.title)
| )
hr
h4 = PersonalProfile.human_attribute_name(:biography)
= simple_format personal_profile.biography
2015-10-15 19:47:53 +03:00
h4 = t '.contacts'
- if personal_profile.organisation.present?
p #{icon :briefcase} @#{personal_profile.organisation}
- if personal_profile.twitter.present?
p #{icon :twitter} @#{personal_profile.twitter}
- if personal_profile.public_email.present?
p #{icon :envelope} #{personal_profile.public_email} (#{t(:public)})
p #{icon :envelope} #{speaker.email} (#{t(:private)})
p #{glyph :phone} #{Phony.format(personal_profile.mobile_phone, format: :international)}
- else
h4.media-heading
= speaker.email
hr
p
= t('.no_profile')
2016-10-09 05:20:46 +03:00
=< link_to icon('user-plus', t('.create_profile')), new_management_conference_personal_profile_path(conference_id: @conference.id, user_id: speaker.id), class: ['btn', 'btn-primary', 'btn-xs']
2015-10-15 19:47:53 +03:00
- if speaker.events_participated_in.where.not(id: @event.id).any?
h4 = t '.previous_event_propositions'
table.table.table-striped.table-hover.record-table
thead
tr
th
= Event.human_attribute_name :title
2016-10-11 03:31:39 +03:00
th.text-center
= Event.human_attribute_name :rank
th
= Event.human_attribute_name :conference
th
= Event.human_attribute_name :status
th
tbody
- speaker.events_participated_in.where.not(id: @event.id).order(created_at: :desc).each do |event|
tr
td = event.title
2016-10-11 03:31:39 +03:00
td.text-center
- if event.ranked?
2016-10-11 03:31:39 +03:00
.large
.label.label-info = event.rank
td = event.conference.title
td
span class="label label-lg label-#{proposition_status_class(event.status)}"
2016-10-09 00:30:40 +03:00
= 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]
- if personal_profile.present?
.panel-footer
.text-right
.btn-group.btn-group-sm
2016-10-09 05:20:46 +03:00
- if personal_profile.conference == @conference
= action_buttons @conference, personal_profile, [:show, :edit]
- else
= link_to [:management, @conference, :personal_profiles, {personal_profile: {user_id: speaker.id}}], class: ['btn', 'btn-primary'], title: t('actions.clone.title', model: PersonalProfile.model_name.human), method: :post do
=> icon('clone')
= link_to [:new, :management, @conference, :personal_profile, {user_id: speaker.id}], class: ['btn', 'btn-primary'], title: t('actions.create.title', model: PersonalProfile.model_name.human) do
=> icon('user-plus')