Reimplement CFP toggling

This commit is contained in:
Petko Bordjukov 2016-07-05 18:10:25 +03:00
parent 5ed3045739
commit 36c384bd1d
2 changed files with 8 additions and 3 deletions

View File

@ -2,12 +2,12 @@ module Management
class CallForParticipationsController < ManagementController
def create
current_conference.call_for_participation.open!
render :redraw
redirect_to :back
end
def destroy
current_conference.call_for_participation.close!
render :redraw
redirect_to :back
end
end
end

View File

@ -6,7 +6,12 @@
= @conference.title
.pull-right
= t '.cfp_status'
= render partial: 'management/call_for_participations/status', locals: {conference: @conference}
- if @conference.call_for_participation.in_progress?
= link_to management_conference_call_for_participation_path(@conference), method: :delete, class: 'btn btn-sm btn-success cfp-toggle'
= icon 'dot-circle-o', '', class: 'fa-fw'
- else
= link_to management_conference_call_for_participation_path(@conference), method: :post, class: 'btn btn-sm btn-warning cfp-toggle'
= icon 'circle-o', class: 'fa-fw'
.row
.col-lg-3.col-md-6
.panel.panel-primary