diff --git a/app/controllers/management/call_for_participations_controller.rb b/app/controllers/management/call_for_participations_controller.rb index ced9a29..d7298f6 100644 --- a/app/controllers/management/call_for_participations_controller.rb +++ b/app/controllers/management/call_for_participations_controller.rb @@ -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 diff --git a/app/views/management/conferences/show.html.slim b/app/views/management/conferences/show.html.slim index bfcfcfc..e5bbe36 100644 --- a/app/views/management/conferences/show.html.slim +++ b/app/views/management/conferences/show.html.slim @@ -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