Display all events except the current one

This commit is contained in:
Petko Bordjukov 2016-10-09 00:29:17 +03:00
parent 085582f946
commit 741a357d22
1 changed files with 23 additions and 22 deletions

View File

@ -43,30 +43,31 @@
= t('.no_profile') = t('.no_profile')
=< link_to icon(:plus, t('.create_profile')), new_management_conference_personal_profile_path(conference_id: @conference.id, user_id: speaker.id), class: ['btn', 'btn-primary', 'btn-xs'] =< link_to icon(:plus, t('.create_profile')), new_management_conference_personal_profile_path(conference_id: @conference.id, user_id: speaker.id), class: ['btn', 'btn-primary', 'btn-xs']
h4 = t '.previous_event_propositions' - if speaker.events_participated_in.where.not(id: @event.id).any?
table.table.table-striped.table-hover.record-table h4 = t '.previous_event_propositions'
thead table.table.table-striped.table-hover.record-table
tr thead
th
= Event.human_attribute_name :title
th
= Event.human_attribute_name :conference
th
= Event.human_attribute_name :status
th
tbody
- speaker.events_participated_in.each do |event|
tr tr
td = event.title th
td = event.conference.title = Event.human_attribute_name :title
td th
span class="label label-lg label-#{proposition_status_class(@event.status)}" = Event.human_attribute_name :conference
= icon(proposition_status_glyph(@event.status), t("activerecord.attributes.proposition.statuses.#{@event.status}")) th
= Event.human_attribute_name :status
th
td.actions tbody
.btn-group.btn-group-sm - speaker.events_participated_in.where.not(id: @event.id).order(created_at: :desc).each do |event|
= action_buttons event.conference, event, [:show] tr
td = event.title
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? - if personal_profile.present?