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

46 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2016-10-08 22:40:56 +03:00
= content_tag :tr, class: event.all_participants_have_profiles? ? nil : 'warning'
2015-10-15 19:06:41 +03:00
td
dl.dl-horizontal
dt = Event.human_attribute_name :title
dd = event.title
- if event.subtitle.present?
dt = Event.human_attribute_name :subtitle
dd = event.subtitle
2016-10-08 21:19:42 +03:00
dt.visible-sm.visible-xs = Event.human_attribute_name :participants
2016-10-08 22:40:56 +03:00
dd.visible-sm.visible-xs = links_to_event_participants_for(event)
dt = EventType.model_name.human.mb_chars.titleize
dd = event.event_type.name
dt = Event.human_attribute_name :track
dd = event.track.name
dt = Event.human_attribute_name :language
dd = t("locales.#{event.language}")
- if event.ranked?
dt = Event.human_attribute_name :rank
dd title="#{t('management.conferences.vote_results.vote_ratio', votes: event.number_of_votes, total_votes: @conference.number_of_ballots_cast)}"
.label.label-info
= event.rank
=< number_to_percentage(event.per_cent_of_votes, strip_insignificant_zeros: true, precision: 2)
2019-04-29 13:39:02 +03:00
- if event.rated?
dt = t(".average_rating")
dd
=> human_rating(event.average_rating)
.badge class="badge-#{rating_label_color(event.average_rating)}"
= number_with_precision event.average_rating, precision: 2, strip_insignificant_zeros: true
2016-10-08 21:19:42 +03:00
td.visible-md.visible-lg.visible-xl
2016-10-08 22:40:56 +03:00
= links_to_event_participants_for(event)
2015-10-15 19:06:41 +03:00
td.action
.dropdown
button class="btn btn-sm dropdown-toggle btn-#{proposition_status_class(event.status)}" type="button" data-toggle="dropdown" title="#{t "status.#{event.status}"}"
= icon(proposition_status_glyph(event.status))
span.caret<
ul.dropdown-menu
- Proposition.statuses.each do |(status, _)|
- next if status == event.status
li
= link_to [:management, @conference, event.proposition, proposition: {status: status}], method: :patch do
= proposition_status_icon(status)
=< t "status.#{status}"
td.actions
.btn-group.btn-group-sm
= action_buttons(@conference, event, [:show, :edit])