Merge pull request #28 from differentreality/cfp
Cfp option to accept changes in events
This commit is contained in:
commit
b70ba985af
6 changed files with 20 additions and 3 deletions
|
|
@ -48,4 +48,5 @@ class ApplicationController < ActionController::Base
|
||||||
Rails.logger.debug("Access denied!")
|
Rails.logger.debug("Access denied!")
|
||||||
redirect_to root_path, :alert => exception.message
|
redirect_to root_path, :alert => exception.message
|
||||||
end
|
end
|
||||||
|
helper_method :organizer_or_admin?
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
class CallForPapers < ActiveRecord::Base
|
class CallForPapers < ActiveRecord::Base
|
||||||
attr_accessible :start_date, :end_date, :hard_deadline, :description
|
attr_accessible :start_date, :end_date, :hard_deadline, :description, :schedule_changes
|
||||||
belongs_to :conference
|
belongs_to :conference
|
||||||
|
|
||||||
validates_presence_of :start_date, :end_date, :hard_deadline
|
validates_presence_of :start_date, :end_date, :hard_deadline
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,5 @@
|
||||||
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
|
||||||
= f.input :hard_deadline, :as => :string, :input_html => { :id => "cfp-hard-datepicker", :readonly => "readonly" }
|
= f.input :hard_deadline, :as => :string, :input_html => { :id => "cfp-hard-datepicker", :readonly => "readonly" }
|
||||||
= f.input :description, :hint => "Welcome text for the Call for Papers"
|
= f.input :description, :hint => "Welcome text for the Call for Papers"
|
||||||
|
= f.input :schedule_changes
|
||||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||||
|
|
@ -1,10 +1,19 @@
|
||||||
= semantic_form_for(@event, :url => @url) do |f|
|
= semantic_form_for(@event, :url => @url) do |f|
|
||||||
%section#basic
|
%section#basic
|
||||||
= f.inputs :name => "Session Information" do
|
= f.inputs :name => "Session Information" do
|
||||||
= f.input :title, :as => :string, :required => true
|
- if !@conference.call_for_papers.schedule_changes && @event.state == "confirmed" && !organizer_or_admin?
|
||||||
|
Title: #{@event.title}
|
||||||
|
%br
|
||||||
|
%br
|
||||||
|
- else
|
||||||
|
= f.input :title, :as => :string, :required => true
|
||||||
= f.input :subtitle, :as => :string
|
= f.input :subtitle, :as => :string
|
||||||
%section#details
|
%section#details
|
||||||
- unless @event.state === "unconfirmed" || @event.state === "confirmed"
|
- if (@event.state === "unconfirmed" || @event.state === "confirmed") && !organizer_or_admin? && !@conference.call_for_papers.schedule_changes
|
||||||
|
Event type: #{@event.event_type.title}
|
||||||
|
%br
|
||||||
|
%br
|
||||||
|
- else
|
||||||
= f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false, :label => "Session Type"
|
= f.input :event_type_id,:as => :select, :collection => @event_types, :include_blank => false, :label => "Session Type"
|
||||||
= f.input :require_registration
|
= f.input :require_registration
|
||||||
= f.input :abstract, :input_html => {:rows => 5, :class => "span11"},
|
= f.input :abstract, :input_html => {:rows => 5, :class => "span11"},
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
%h2.pull-left
|
%h2.pull-left
|
||||||
= "My Proposals for #{@conference.title}"
|
= "My Proposals for #{@conference.title}"
|
||||||
.pull-right{:style=>"margin-top:20px;"}
|
.pull-right{:style=>"margin-top:20px;"}
|
||||||
|
- if @conference.cfp_open? || organizer_or_admin?
|
||||||
= link_to "New Proposal", new_conference_proposal_path(@conference.short_title), :class => "btn btn-primary"
|
= link_to "New Proposal", new_conference_proposal_path(@conference.short_title), :class => "btn btn-primary"
|
||||||
- if @person.proposal_count(@conference) > 0
|
- if @person.proposal_count(@conference) > 0
|
||||||
.row-fluid
|
.row-fluid
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddScheduleChangesToCallForPapers < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :call_for_papers, :schedule_changes, :boolean, :default => 0
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue