Merge pull request #58 from differentreality/schedule_public

show schedule in home page only if it is set as public
This commit is contained in:
Henne Vogelsang 2014-04-09 12:09:11 +02:00
commit ec2323e957
4 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,5 @@
class CallForPapers < ActiveRecord::Base
attr_accessible :start_date, :end_date, :hard_deadline, :description, :schedule_changes, :rating, :rating_desc
attr_accessible :start_date, :end_date, :hard_deadline, :description, :schedule_changes, :rating, :rating_desc, :schedule_public
belongs_to :conference
validates_presence_of :start_date, :end_date, :hard_deadline

View file

@ -8,6 +8,7 @@
= 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.input :schedule_public
= f.input :rating, :hint => "Enter the number of different rating levels you want to have for voting on proposals. Enter 0 if you do not want to vote on proposals."
= f.input :rating_desc, :label => "Rating Description", :hint => "Enter comments about voting process.", :input_html => {:value => "1 is for 'I don't like this proposal',\n2 is for 'I am ok with this proposal.',\n3 is for 'I love this proposal!'", :rows => 5, :class => "span6"}
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -29,7 +29,7 @@
= link_to "Modify Registration", register_conference_path(conference.short_title), :class =>"btn btn-default"
- else
= link_to "Register", register_conference_path(conference.short_title), :class =>"btn btn-success"
= link_to "Schedule", conference_schedule_path(conference.short_title), :class =>"btn btn-default"
= link_to "Schedule", conference_schedule_path(conference.short_title), :class =>"btn btn-default" if conference.call_for_papers and conference.call_for_papers.schedule_public
- if !current_user.nil? && current_user.person.proposal_count(conference) > 0
= link_to "View My Proposals", conference_proposal_index_path(conference.short_title), :class =>"btn btn-default"
- elsif conference.cfp_open?

View file

@ -0,0 +1,5 @@
class AddSchedulePublicToCallForPapers < ActiveRecord::Migration
def change
add_column :call_for_papers, :schedule_public, :boolean
end
end