diff --git a/app/views/management/events/_speaker.slim b/app/views/management/events/_speaker.slim index 32ef933..dd043c7 100644 --- a/app/views/management/events/_speaker.slim +++ b/app/views/management/events/_speaker.slim @@ -1,29 +1,18 @@ -- personal_profile = speaker.personal_profile(@conference) || PersonalProfile.new -.row +- personal_profile = speaker.personal_profile(@conference) || speaker.personal_profiles.last + +- if personal_profile.present? .speaker-profile .panel.panel-default .panel-heading h1.panel-title = personal_profile.name - / = link_to icon(:edit), [:edit, :management, @conference, personal_profile], class: 'btn btn-xs btn-danger pull-right' + = link_to icon(:edit), [:edit, :management, @conference, personal_profile], class: 'btn btn-xs btn-danger pull-right' .panel-body .center = image_tag personal_profile.picture.medium.url, class: "profile-image" - - if personal_profile.organisation.present? - div - => icon :briefcase - = personal_profile.organisation - div.social - = link_to "mailto://#{speaker.email}" - = icon :envelope - - if personal_profile.github.present? - = link_to "https://github.com/#{personal_profile.github}" - = icon :github - - if personal_profile.twitter.present? - = link_to "https://twitter.com/#{personal_profile.twitter}" - = icon :twitter - hr + - if personal_profile.organisation.present? + p #{icon :briefcase} @#{personal_profile.organisation} h4 = PersonalProfile.human_attribute_name(:biography) = simple_format personal_profile.biography @@ -34,4 +23,4 @@ - 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)} + p #{glyph :phone} #{Phony.format(personal_profile.mobile_phone, format: :international)} diff --git a/app/views/management/events/show.html.slim b/app/views/management/events/show.html.slim index 36e77a5..9ed8924 100644 --- a/app/views/management/events/show.html.slim +++ b/app/views/management/events/show.html.slim @@ -20,7 +20,6 @@ div.btn-group.btn-group-sm = action_buttons(@conference, @event, [:index, :edit]) - h3 = Event.human_attribute_name :abstract p = simple_format @event.abstract @@ -31,16 +30,4 @@ p = simple_format @event.notes .row .col-lg-12 - .panel.panel-default - .panel-heading - h2 - = @event.title - small< - = @event.subtitle - - = Event.human_attribute_name :user - = render partial: 'speaker', collection: @event.participants - - .panel-footer - div.btn-group.btn-group-sm - = action_buttons(@conference, @event, [:index, :edit]) + = render partial: 'speaker', collection: @event.participants