Merge pull request #28 from differentreality/cfp

Cfp option to accept changes in events
This commit is contained in:
Henne Vogelsang 2013-08-15 02:31:36 -07:00
commit b70ba985af
6 changed files with 20 additions and 3 deletions

View file

@ -48,4 +48,5 @@ class ApplicationController < ActionController::Base
Rails.logger.debug("Access denied!")
redirect_to root_path, :alert => exception.message
end
helper_method :organizer_or_admin?
end

View file

@ -1,5 +1,5 @@
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
validates_presence_of :start_date, :end_date, :hard_deadline

View file

@ -8,4 +8,5 @@
= 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 :description, :hint => "Welcome text for the Call for Papers"
= f.input :schedule_changes
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,10 +1,19 @@
= semantic_form_for(@event, :url => @url) do |f|
%section#basic
= 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
%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 :require_registration
= f.input :abstract, :input_html => {:rows => 5, :class => "span11"},

View file

@ -4,6 +4,7 @@
%h2.pull-left
= "My Proposals for #{@conference.title}"
.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"
- if @person.proposal_count(@conference) > 0
.row-fluid

View file

@ -0,0 +1,5 @@
class AddScheduleChangesToCallForPapers < ActiveRecord::Migration
def change
add_column :call_for_papers, :schedule_changes, :boolean, :default => 0
end
end