diff --git a/app/controllers/admin/events_controller.rb b/app/controllers/admin/events_controller.rb index 81a0cdb4..9e5b38bc 100644 --- a/app/controllers/admin/events_controller.rb +++ b/app/controllers/admin/events_controller.rb @@ -113,12 +113,10 @@ class Admin::EventsController < ApplicationController flash[:notice] = "Update not successful." end - expire_page :controller => '/schedule', :action => :index redirect_back_or_to(admin_conference_event_path(@conference.short_title, @event)) end def create - expire_page :controller => '/schedule', :action => :index end def update_state @@ -127,7 +125,6 @@ class Admin::EventsController < ApplicationController redirect_to(admin_conference_events_path(:conference_id => @conference.short_title), :notice => "Update Email Template before Sending Mails") and return end event.send(:"#{params[:transition]}!", :send_mail => params[:send_mail]) - expire_page :controller => '/schedule', :action => :index redirect_to(admin_conference_events_path(:conference_id => @conference.short_title), :notice => "Updated state") end diff --git a/app/controllers/admin/schedule_controller.rb b/app/controllers/admin/schedule_controller.rb index b8f673ee..d35f0b15 100644 --- a/app/controllers/admin/schedule_controller.rb +++ b/app/controllers/admin/schedule_controller.rb @@ -47,7 +47,6 @@ class Admin::ScheduleController < ApplicationController startTime = DateTime.strptime(time, "%Y-%m-%d %k:%M") event.start_time = startTime event.save! - expire_page :controller => '/schedule', :action => :index render :json => {"status" => "ok"} end diff --git a/app/views/admin/events/index.html.haml b/app/views/admin/events/index.html.haml index dca7aacb..6b608947 100644 --- a/app/views/admin/events/index.html.haml +++ b/app/views/admin/events/index.html.haml @@ -106,26 +106,35 @@ %ul.dropdown-menu - if event.transition_possible? :accept - %li= link_to "Accept event (no email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :accept, :send_mail => false), - :method => :put, :hint => "Accept this event without sending an automated email." - %li= link_to "Accept event (WITH email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :accept, :send_mail => true), - :method => :put, :hint => "Accept this event and send an automated email." + %li= link_to 'Accept event (no email)', + update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: false), + method: :patch, hint: 'Accept this event without sending an automated email.' + %li= link_to 'Accept event (WITH email)', + update_state_admin_conference_event_path(@conference.short_title, event, transition: :accept, send_mail: true), + method: :patch, hint: 'Accept this event and send an automated email.' - if event.transition_possible? :reject - %li= link_to "Reject event (no email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :reject, :send_mail => false), - :method => :put, :confirm => "Are you sure?", - :hint => "Reject this event without sending an automated email." - %li= link_to "Reject event (WITH email)", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :reject, :send_mail => true), - :method => :put, :confirm => "Are you sure?", - :hint => "Reject this event and send an automated email." + %li= link_to 'Reject event (no email)', + update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: false), + method: :patch, confirm: 'Are you sure?', + hint: 'Reject this event without sending an automated email.' + %li= link_to 'Reject event (WITH email)', + update_state_admin_conference_event_path(@conference.short_title, event, transition: :reject, send_mail: true), + method: :patch, confirm: 'Are you sure?', + hint: 'Reject this event and send an automated email.' - if event.transition_possible? :start_review - %li= link_to "Start review", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :start_review), - :method => :put + %li= link_to 'Start review', + update_state_admin_conference_event_path(@conference.short_title, event, transition: :start_review), + method: :patch - if event.transition_possible? :confirm - %li= link_to "Confirm event", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :confirm), - :method => :put, :hint => "Confirm that the speaker(s) will be present and that the event will actually take place." + %li= link_to 'Confirm event', + update_state_admin_conference_event_path(@conference.short_title, event, transition: :confirm), + method: :patch, + hint: 'Confirm that the speaker(s) will be present and that the event will actually take place.' - if event.transition_possible? :cancel - %li= link_to "Cancel event", update_state_admin_conference_event_path(@conference.short_title, event, :transition => :cancel), - :method => :put, :hint => "Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance." + %li= link_to 'Cancel event', + update_state_admin_conference_event_path(@conference.short_title, event, :transition => :cancel), + method: :patch, + hint: 'Mark this event as cancelled. Usually this means that the speakers had to cancel their appearance.' :javascript $(document).ready(function() { diff --git a/app/views/proposal/index.html.haml b/app/views/proposal/index.html.haml index 33cd0828..3d820f50 100644 --- a/app/views/proposal/index.html.haml +++ b/app/views/proposal/index.html.haml @@ -28,7 +28,8 @@ %td .pull-right - if event.transition_possible? :confirm - = link_to "Confirm", conference_proposal_confirm_path(@conference.short_title, event, :send_mail=>false), :method => :put, :class => "btn btn-mini btn-success" - = link_to "Edit", edit_conference_proposal_path(@conference.short_title, event.id), :class => "btn btn-mini btn-primary" - = link_to "Withdraw", conference_proposal_path(@conference.short_title, event.id), :method => :delete, - :confirm => "Are you sure you want to withdraw this proposal?", :class => "btn btn-mini btn-danger" + = link_to 'Confirm', + conference_proposal_confirm_path(@conference.short_title, event, send_mail: false), method: :patch, class: 'btn btn-mini btn-success' + = link_to 'Edit', edit_conference_proposal_path(@conference.short_title, event.id), class: 'btn btn-mini btn-primary' + = link_to 'Withdraw', conference_proposal_path(@conference.short_title, event.id), method: :delete, + confirm: 'Are you sure you want to withdraw this proposal?', class: 'btn btn-mini btn-danger'