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 {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
max-height: 250px;
|
||||
height: auto;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
|
|
@ -1,96 +1,123 @@
|
|||
- 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
|
||||
|
||||
h4 = t '.contacts'
|
||||
.row
|
||||
.col-sm-4
|
||||
.panel.panel-default
|
||||
- if personal_profile.present?
|
||||
.panel-image
|
||||
= image_tag personal_profile.picture.url
|
||||
.panel-body
|
||||
.media
|
||||
.media-body
|
||||
h4.media-heading
|
||||
= personal_profile.name
|
||||
hr
|
||||
= simple_format(truncate(personal_profile.biography, omission: '... ', length: 300) { link_to(t('.continue'), [:management, @conference, personal_profile])})
|
||||
ul.list-group
|
||||
- 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?
|
||||
p #{icon :twitter} @#{personal_profile.twitter}
|
||||
- if personal_profile.public_email.present?
|
||||
p #{icon :envelope} #{personal_profile.public_email} (#{PersonalProfile.human_attribute_name(:public_email).mb_chars.downcase})
|
||||
p #{icon :envelope} #{speaker.email} (#{PersonalProfile.human_attribute_name(:email).mb_chars.downcase})
|
||||
p #{glyph :phone} #{Phony.format(personal_profile.mobile_phone, format: :international)}
|
||||
- else
|
||||
h4.media-heading
|
||||
= speaker.email
|
||||
hr
|
||||
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']
|
||||
li.list-group-item
|
||||
h5.list-group-item-heading = PersonalProfile.human_attribute_name :twitter
|
||||
p.list-group-item-text
|
||||
= link_to "@#{personal_profile.twitter}", "https://twitter.com/#{personal_profile.twitter}", target: '_blank'
|
||||
- if personal_profile.github.present?
|
||||
li.list-group-item
|
||||
h5.list-group-item-heading = PersonalProfile.human_attribute_name :github
|
||||
p.list-group-item-text
|
||||
= link_to personal_profile.github, "https://github.com/#{personal_profile.github}", target: '_blank'
|
||||
.panel-footer
|
||||
.text-right
|
||||
.btn-group.btn-group-sm
|
||||
- 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')
|
||||
- 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?
|
||||
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|
|
||||
.panel.panel-default
|
||||
table.table.table-striped.table-hover.record-table
|
||||
thead
|
||||
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?
|
||||
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.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}"))
|
||||
.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]
|
||||
|
||||
|
||||
- if personal_profile.present?
|
||||
.panel-footer
|
||||
.text-right
|
||||
.btn-group.btn-group-sm
|
||||
- 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')
|
||||
td.actions
|
||||
.btn-group.btn-group-sm
|
||||
= action_buttons event.conference, event, [:show]
|
||||
- else
|
||||
p = t '.no_other_event_propositions'
|
||||
|
|
|
@ -65,38 +65,42 @@
|
|||
h3 = Event.human_attribute_name :participants
|
||||
= render partial: 'speaker', collection: @event.participants
|
||||
|
||||
.row
|
||||
.col-xs-12
|
||||
h3 = Event.human_attribute_name :feedbacks
|
||||
- if @event.rated?
|
||||
.row
|
||||
.col-md-10
|
||||
.panel.panel-default
|
||||
.panel-heading = t('.comments')
|
||||
- if @event.feedbacks_with_comment.size > 0
|
||||
table.table.table-striped
|
||||
tbody
|
||||
= render partial: '/management/shared/feedback', collection: @event.feedbacks_with_comment
|
||||
- else
|
||||
.panel-body
|
||||
= t ('.no_comments_received')
|
||||
.col-md-2
|
||||
.panel.panel-info
|
||||
.panel-heading
|
||||
= t '.average_grade'
|
||||
.panel-body.text-right
|
||||
.huge
|
||||
= number_with_precision(@event.average_rating, precision: 2, strip_insignificant_zeros: true) || '–'
|
||||
= t('.total_feedback_grades', total_grades: @event.feedbacks.count, count: @event.feedbacks.count)
|
||||
- else
|
||||
p = t '.no_feedback_received'
|
||||
- if @conference.start_date.past? || @event.rated?
|
||||
.row
|
||||
.col-xs-12
|
||||
h3 = Event.human_attribute_name :feedbacks
|
||||
- if @event.rated?
|
||||
.row
|
||||
.col-md-10
|
||||
.panel.panel-default
|
||||
.panel-heading = t('.comments')
|
||||
- if @event.feedbacks_with_comment.size > 0
|
||||
table.table.table-striped
|
||||
tbody
|
||||
= render partial: '/management/shared/feedback', collection: @event.feedbacks_with_comment
|
||||
- else
|
||||
.panel-body
|
||||
= t ('.no_comments_received')
|
||||
.col-md-2
|
||||
.panel.panel-info
|
||||
.panel-heading
|
||||
= t '.average_grade'
|
||||
.panel-body.text-right
|
||||
.huge
|
||||
= number_with_precision(@event.average_rating, precision: 2, strip_insignificant_zeros: true) || '–'
|
||||
= t('.total_feedback_grades', total_grades: @event.feedbacks.count, count: @event.feedbacks.count)
|
||||
- else
|
||||
p = t '.no_feedback_received'
|
||||
|
||||
|
||||
- if @conference.has_vote_results? or @conference.has_voting_endpoint?
|
||||
.row
|
||||
.col-xs-12
|
||||
h2
|
||||
= t '.conflicts'
|
||||
- if @conference.start_date.future?
|
||||
= t '.conflicts'
|
||||
- else
|
||||
= t '.top_conflicts'
|
||||
small< = t '.between_approved_events'
|
||||
.panel.panel-default
|
||||
table.table.table-striped.table-hover.record-table
|
||||
|
@ -105,13 +109,17 @@
|
|||
tr
|
||||
th.text-right
|
||||
= t '.percent'
|
||||
th
|
||||
th.main
|
||||
= Event.model_name.human.mb_chars.capitalize
|
||||
th
|
||||
tbody
|
||||
- if @conference.has_vote_results?
|
||||
- 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)
|
||||
tr
|
||||
td.text-right
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
.panel-image
|
||||
= image_tag @profile.picture.url
|
||||
.panel-body
|
||||
|
||||
.media
|
||||
.media-body
|
||||
h4.media-heading
|
||||
|
@ -19,6 +18,10 @@
|
|||
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
|
||||
|
|
|
@ -30,6 +30,13 @@ bg:
|
|||
no_feedback_received: Все още няма обратна връзка
|
||||
no_comments_received: Все още няма коментари
|
||||
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:
|
||||
poor: Слаб
|
||||
average: Среден
|
||||
|
|
Loading…
Reference in New Issue