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

43 lines
1.8 KiB
Plaintext

= content_tag :tr, class: event.all_participants_have_profiles? ? nil : 'warning'
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
dt.visible-sm.visible-xs = Event.human_attribute_name :participants
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)
td.visible-md.visible-lg.visible-xl
= links_to_event_participants_for(event)
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])