Overhaul speaker info in event show
This commit is contained in:
parent
ed85b96f4d
commit
35aa246df4
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
height="665"
|
||||||
|
width="1185"
|
||||||
|
id="svg4"
|
||||||
|
version="1.1"
|
||||||
|
viewBox="0 0 1185 665"
|
||||||
|
role="img"
|
||||||
|
class="svg-inline--fa fa-user-secret fa-w-14"
|
||||||
|
data-icon="user-secret"
|
||||||
|
data-prefix="fas"
|
||||||
|
focusable="false"
|
||||||
|
aria-hidden="true">
|
||||||
|
<metadata
|
||||||
|
id="metadata10">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs8" />
|
||||||
|
<path
|
||||||
|
style="fill:currentColor"
|
||||||
|
id="path2"
|
||||||
|
d="m 752.4,384.79271 23.9,-62.6 c 4,-10.5 -3.7,-21.7 -15,-21.7 h -58.5 c 11,-18.9 17.8,-40.6 17.8,-64 v -0.3 c 39.2,-7.8 64,-19.1 64,-31.7 0,-13.3 -27.3,-25.1 -70.1,-33 -9.2,-32.8 -27,-65.8 -40.6,-82.799998 -9.5,-11.9 -25.9,-15.6 -39.5,-8.8 l -27.6,13.8 c -9,4.5 -19.6,4.5 -28.6,0 l -27.6,-13.8 c -13.6,-6.8 -30,-3.1 -39.5,8.8 -13.5,16.999998 -31.4,49.999998 -40.6,82.799998 -42.7,7.9 -70,19.7 -70,33 0,12.6 24.8,23.9 64,31.7 v 0.3 c 0,23.4 6.8,45.1 17.8,64 h -57.5 c -11.5,0 -19.2,11.7 -14.7,22.3 l 25.8,60.2 c -40.1,23.3 -67.4,66.2 -67.4,115.9 v 44.8 c 0,24.7 20.1,44.8 44.8,44.8 h 358.4 c 24.7,0 44.8,-20.1 44.8,-44.8 v -44.8 c 0,-48.4 -25.8,-90.4 -64.1,-114.1 z m -207.9,171.7 -41.6,-192 49.6,32 24,40 z m 96,0 -32,-120 24,-40 49.6,-32 z m 41.7,-298.5 c -3.9,11.9 -7,24.6 -16.5,33.4 -10.1,9.3 -48,22.4 -64,-25 -2.8,-8.4 -15.4,-8.4 -18.3,0 -17,50.2 -56,32.4 -64,25 -9.5,-8.8 -12.7,-21.5 -16.5,-33.4 -0.8,-2.5 -6.3,-5.7 -6.3,-5.8 v -10.8 c 28.3,3.6 61,5.8 96,5.8 35,0 67.7,-2.1 96,-5.8 v 10.8 c -0.1,0.1 -5.6,3.2 -6.4,5.8 z" />
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
|
@ -1,8 +1,10 @@
|
||||||
.panel .panel-image img {
|
.panel .panel-image img {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
max-height: 250px;
|
||||||
height: auto;
|
height: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,89 +1,33 @@
|
||||||
- personal_profile = speaker.personal_profile(@conference) || speaker.personal_profiles.last
|
- personal_profile = speaker.personal_profile(@conference) || speaker.personal_profiles.last
|
||||||
|
|
||||||
|
.row
|
||||||
|
.col-sm-4
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
|
- if personal_profile.present?
|
||||||
|
.panel-image
|
||||||
|
= image_tag personal_profile.picture.url
|
||||||
.panel-body
|
.panel-body
|
||||||
.media
|
.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
|
.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
|
h4.media-heading
|
||||||
= personal_profile.name
|
= personal_profile.name
|
||||||
- unless personal_profile.conference == @conference
|
|
||||||
small<
|
|
||||||
| (
|
|
||||||
= t('.profile_from', conference: personal_profile.conference.title)
|
|
||||||
| )
|
|
||||||
hr
|
hr
|
||||||
h4 = PersonalProfile.human_attribute_name(:biography)
|
= simple_format(truncate(personal_profile.biography, omission: '... ', length: 300) { link_to(t('.continue'), [:management, @conference, personal_profile])})
|
||||||
= simple_format personal_profile.biography
|
ul.list-group
|
||||||
|
|
||||||
h4 = t '.contacts'
|
|
||||||
- if personal_profile.organisation.present?
|
- if personal_profile.organisation.present?
|
||||||
p #{icon :briefcase} @#{personal_profile.organisation}
|
li.list-group-item
|
||||||
|
h5.list-group-item-heading = PersonalProfile.human_attribute_name :organisation
|
||||||
|
p.list-group-item-text = personal_profile.organisation
|
||||||
- if personal_profile.twitter.present?
|
- if personal_profile.twitter.present?
|
||||||
p #{icon :twitter} @#{personal_profile.twitter}
|
li.list-group-item
|
||||||
- if personal_profile.public_email.present?
|
h5.list-group-item-heading = PersonalProfile.human_attribute_name :twitter
|
||||||
p #{icon :envelope} #{personal_profile.public_email} (#{PersonalProfile.human_attribute_name(:public_email).mb_chars.downcase})
|
p.list-group-item-text
|
||||||
p #{icon :envelope} #{speaker.email} (#{PersonalProfile.human_attribute_name(:email).mb_chars.downcase})
|
= link_to "@#{personal_profile.twitter}", "https://twitter.com/#{personal_profile.twitter}", target: '_blank'
|
||||||
p #{glyph :phone} #{Phony.format(personal_profile.mobile_phone, format: :international)}
|
- if personal_profile.github.present?
|
||||||
- else
|
li.list-group-item
|
||||||
h4.media-heading
|
h5.list-group-item-heading = PersonalProfile.human_attribute_name :github
|
||||||
= speaker.email
|
p.list-group-item-text
|
||||||
hr
|
= link_to personal_profile.github, "https://github.com/#{personal_profile.github}", target: '_blank'
|
||||||
p
|
|
||||||
= t('.no_profile')
|
|
||||||
=< 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']
|
|
||||||
|
|
||||||
- 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
|
|
||||||
th.text-center
|
|
||||||
= t '.rating'
|
|
||||||
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
|
|
||||||
td.text-center
|
|
||||||
- if event.rated?
|
|
||||||
.large
|
|
||||||
.label class="label-#{rating_label_color(event.average_rating)}"
|
|
||||||
= number_with_precision event.average_rating, precision: 2, strip_insignificant_zeros: true
|
|
||||||
td.text-center
|
|
||||||
- if event.ranked?
|
|
||||||
.large
|
|
||||||
.label.label-info = event.rank
|
|
||||||
td = event.conference.title
|
|
||||||
td
|
|
||||||
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]
|
|
||||||
|
|
||||||
|
|
||||||
- if personal_profile.present?
|
|
||||||
.panel-footer
|
.panel-footer
|
||||||
.text-right
|
.text-right
|
||||||
.btn-group.btn-group-sm
|
.btn-group.btn-group-sm
|
||||||
|
@ -94,3 +38,86 @@
|
||||||
=> icon('clone')
|
=> 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
|
= 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')
|
=> icon('user-plus')
|
||||||
|
- else
|
||||||
|
.panel-image
|
||||||
|
= image_tag 'user-secret-solid.svg'
|
||||||
|
.panel-body
|
||||||
|
.media
|
||||||
|
.media-body
|
||||||
|
h4.media-heading
|
||||||
|
speaker.email
|
||||||
|
hr
|
||||||
|
p = t '.the_participant_has_not_created_a_profile'
|
||||||
|
ul.list-group
|
||||||
|
li.list-group-item
|
||||||
|
h5.list-group-item-heading = t '.private_email'
|
||||||
|
p.list-group-item-text = speaker.email
|
||||||
|
|
||||||
|
.col-sm-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
|
||||||
|
= speaker.events_participated_in.size
|
||||||
|
div
|
||||||
|
= Event.model_name.human(count: speaker.events_participated_in.size)
|
||||||
|
.col-md-6
|
||||||
|
.panel class="panel-#{rating_label_color(speaker.average_rating || 5)}" title=human_rating(speaker.average_rating)
|
||||||
|
.panel-heading
|
||||||
|
.row
|
||||||
|
.col-xs-3
|
||||||
|
= icon 'star', '', class: 'fa-5x'
|
||||||
|
.col-xs-9.text-right
|
||||||
|
.huge
|
||||||
|
= number_with_precision(speaker.average_rating, precision: 2, strip_insignificant_zeros: true) || '–'
|
||||||
|
div
|
||||||
|
= User.human_attribute_name(:average_rating).downcase
|
||||||
|
|
||||||
|
.row
|
||||||
|
.col-xs-12
|
||||||
|
h4 = t '.other_event_propositions'
|
||||||
|
- if speaker.events_participated_in.where.not(id: @event.id).any?
|
||||||
|
.panel.panel-default
|
||||||
|
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.hidden-md.hidden-sm.hidden-xs
|
||||||
|
|
||||||
|
tbody
|
||||||
|
- speaker.events_participated_in.where.not(id: @event.id).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)}"
|
||||||
|
= 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]
|
||||||
|
- else
|
||||||
|
p = t '.no_other_event_propositions'
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
h3 = Event.human_attribute_name :participants
|
h3 = Event.human_attribute_name :participants
|
||||||
= render partial: 'speaker', collection: @event.participants
|
= render partial: 'speaker', collection: @event.participants
|
||||||
|
|
||||||
|
- if @conference.start_date.past? || @event.rated?
|
||||||
.row
|
.row
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
h3 = Event.human_attribute_name :feedbacks
|
h3 = Event.human_attribute_name :feedbacks
|
||||||
|
@ -96,7 +97,10 @@
|
||||||
.row
|
.row
|
||||||
.col-xs-12
|
.col-xs-12
|
||||||
h2
|
h2
|
||||||
|
- if @conference.start_date.future?
|
||||||
= t '.conflicts'
|
= t '.conflicts'
|
||||||
|
- else
|
||||||
|
= t '.top_conflicts'
|
||||||
small< = t '.between_approved_events'
|
small< = t '.between_approved_events'
|
||||||
.panel.panel-default
|
.panel.panel-default
|
||||||
table.table.table-striped.table-hover.record-table
|
table.table.table-striped.table-hover.record-table
|
||||||
|
@ -105,13 +109,17 @@
|
||||||
tr
|
tr
|
||||||
th.text-right
|
th.text-right
|
||||||
= t '.percent'
|
= t '.percent'
|
||||||
th
|
th.main
|
||||||
= Event.model_name.human.mb_chars.capitalize
|
= Event.model_name.human.mb_chars.capitalize
|
||||||
th
|
th
|
||||||
tbody
|
tbody
|
||||||
- if @conference.has_vote_results?
|
- if @conference.has_vote_results?
|
||||||
- if @conference.approved_events.count > 2
|
- if @conference.approved_events.count > 2
|
||||||
- @event.conflict_counts.where(right_id: @conference.approved_events.pluck(:id)).includes(:right).each do |conflict_count|
|
- if @conference.start_date.future?
|
||||||
|
- conflict_counts = @event.conflict_counts.where(right_id: @conference.approved_events.pluck(:id)).includes(:right)
|
||||||
|
- else
|
||||||
|
- conflict_counts = @event.conflict_counts.where(right_id: @conference.approved_events.pluck(:id)).includes(:right).limit(5)
|
||||||
|
- conflict_counts.each do |conflict_count|
|
||||||
- conflict_percent = Rational(conflict_count.number_of_conflicts, @conference.number_of_ballots_cast)
|
- conflict_percent = Rational(conflict_count.number_of_conflicts, @conference.number_of_ballots_cast)
|
||||||
tr
|
tr
|
||||||
td.text-right
|
td.text-right
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
.panel-image
|
.panel-image
|
||||||
= image_tag @profile.picture.url
|
= image_tag @profile.picture.url
|
||||||
.panel-body
|
.panel-body
|
||||||
|
|
||||||
.media
|
.media
|
||||||
.media-body
|
.media-body
|
||||||
h4.media-heading
|
h4.media-heading
|
||||||
|
@ -19,6 +18,10 @@
|
||||||
hr
|
hr
|
||||||
= simple_format @profile.biography
|
= simple_format @profile.biography
|
||||||
ul.list-group
|
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?
|
- if @profile.organisation.present?
|
||||||
li.list-group-item
|
li.list-group-item
|
||||||
h5.list-group-item-heading = PersonalProfile.human_attribute_name :organisation
|
h5.list-group-item-heading = PersonalProfile.human_attribute_name :organisation
|
||||||
|
|
|
@ -30,6 +30,13 @@ bg:
|
||||||
no_feedback_received: Все още няма обратна връзка
|
no_feedback_received: Все още няма обратна връзка
|
||||||
no_comments_received: Все още няма коментари
|
no_comments_received: Все още няма коментари
|
||||||
comments: Коментари
|
comments: Коментари
|
||||||
|
top_conflicts: Топ 5 конфликти
|
||||||
|
speaker:
|
||||||
|
continue: Още...
|
||||||
|
other_event_propositions: Други предложени събития
|
||||||
|
the_participant_has_not_created_a_profile: Потребителят не си е създал профил в системата.
|
||||||
|
private_email: Личен e-mail
|
||||||
|
no_other_event_propositions: Няма други предложени събития
|
||||||
ratings:
|
ratings:
|
||||||
poor: Слаб
|
poor: Слаб
|
||||||
average: Среден
|
average: Среден
|
||||||
|
|
Loading…
Reference in New Issue