2017-08-15 18:02:51 +03:00
2017-05-17 13:31:27 +03:00
- if booth.transition_possible? :accept
2017-08-15 18:02:51 +03:00
- if can? :accept, booth
- if @conference.booth_limit > 0
2019-07-22 00:59:17 +05:30
- confirm_message = ' You are able to accept '+ pluralize(@conference.booth_limit - (@conference.booths.accepted.count + @conference.booths.confirmed.count), "more #{t'booth'}") + " (#{t'booth'} limit set to #{@conference.booth_limit}). Are you sure you want to accept this one?"
2017-07-28 21:46:48 +03:00
- if @conference.email_settings.send_on_booths_acceptance
- link = 'Accept with email'
2019-07-22 00:59:17 +05:30
- confirm_message = "By accepting this #{t'booth'}, an email will be sent informing the submitter for the acceptance. You may change the state to \'To accept\' until you are completely sure." + confirm_message
2017-07-28 21:46:48 +03:00
- else
2019-07-22 00:59:17 +05:30
- link = "Accept #{t'booth'}"
2017-07-28 21:46:48 +03:00
%li= link_to link,
accept_admin_conference_booth_path(@conference.short_title, booth),
method: :patch ,id: "accept_booth_#{booth.id}",
2017-08-15 18:02:51 +03:00
data: (confirm_message ? { confirm: confirm_message } : nil)
2017-05-17 13:31:27 +03:00
- if booth.transition_possible? :reject
2017-08-02 20:10:47 +03:00
- if @conference.email_settings.send_on_booths_rejection
- link = 'Reject with email'
- else
- link = 'Reject'
%li= link_to link,
2017-05-17 13:31:27 +03:00
reject_admin_conference_booth_path(@conference.short_title, booth),
2017-08-15 18:02:51 +03:00
method: :patch, id: "reject_booth_#{booth.id}",
data: (@conference.email_settings.send_on_booths_rejection ? { confirm: 'By rejecting this booth, an email will be sent informing the submitter about the rejection. You may change the state to \'To reject\' until you are completely sure.'} : nil)
2017-05-17 13:31:27 +03:00
- if booth.transition_possible? :to_reject
2019-07-22 00:59:17 +05:30
%li= link_to "To reject #{t'booth'}",
2017-05-17 13:31:27 +03:00
to_reject_admin_conference_booth_path(@conference.short_title, booth),
2017-08-02 20:10:47 +03:00
method: :patch, id: "to_reject_booth_#{booth.id}"
2017-05-17 13:31:27 +03:00
- if booth.transition_possible? :restart
%li= link_to 'Start review',
restart_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "restart_booth_#{booth.id}"
- if booth.transition_possible? :to_accept
2019-07-22 00:59:17 +05:30
%li= link_to "To accept #{t'booth'}",
2017-05-17 13:31:27 +03:00
to_accept_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "to_accept_booth_#{booth.id}"
- if booth.transition_possible? :cancel
2019-07-22 00:59:17 +05:30
%li= link_to "Cancel #{t'booth'}",
2017-05-17 13:31:27 +03:00
cancel_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "cancel_booth_#{booth.id}"
2017-08-11 15:14:22 +03:00
- if booth.transition_possible? :confirm
2019-07-22 00:59:17 +05:30
%li= link_to "Confirm #{t'booth'}",
2017-08-11 15:14:22 +03:00
confirm_admin_conference_booth_path(@conference.short_title, booth),
method: :patch, id: "confirm_booth_#{booth.id}"