commit
4356616566
5 changed files with 15 additions and 4 deletions
|
|
@ -3,6 +3,6 @@ class CallForPapers < ActiveRecord::Base
|
||||||
belongs_to :conference
|
belongs_to :conference
|
||||||
|
|
||||||
validates_presence_of :start_date, :end_date, :hard_deadline
|
validates_presence_of :start_date, :end_date, :hard_deadline
|
||||||
validates :rating, :numericality => { :greater_than_or_equal_to => 1, :less_than_or_equal_to => 10 }
|
validates :rating, :numericality => { :greater_than_or_equal_to => 0, :less_than_or_equal_to => 10 }
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@
|
||||||
= 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.input :schedule_changes
|
||||||
= f.input :rating, :hint => "Enter the number of different rating levels you want to have for voting on proposals."
|
= 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.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"}
|
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@
|
||||||
%td
|
%td
|
||||||
= link_to "Delete", conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id),
|
= link_to "Delete", conference_proposal_event_attachment_path(@conference.short_title, @event.id, a.id),
|
||||||
:method => :delete, :confirm => "Are you sure you want to delete this attachment? It's permanant!"
|
:method => :delete, :confirm => "Are you sure you want to delete this attachment? It's permanant!"
|
||||||
- if @conference.call_for_papers.rating
|
- if @conference.call_for_papers.rating > 0
|
||||||
.row-fluid
|
.row-fluid
|
||||||
= link_to "Votes (#{@event.voters.length})", "#", :id => "votes-link"
|
= link_to "Votes (#{@event.voters.length})", "#", :id => "votes-link"
|
||||||
#votes-div
|
#votes-div
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
%td
|
%td
|
||||||
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
|
=link_to event.title, admin_conference_event_path(@conference.short_title, event)
|
||||||
%td
|
%td
|
||||||
- if @conference.call_for_papers.rating
|
- if @conference.call_for_papers.rating != 0
|
||||||
- if event.average_rating.to_f > 0
|
- if event.average_rating.to_f > 0
|
||||||
Rating: (#{event.average_rating}/#{@conference.call_for_papers.rating})
|
Rating: (#{event.average_rating}/#{@conference.call_for_papers.rating})
|
||||||
- else
|
- else
|
||||||
|
|
@ -45,6 +45,8 @@
|
||||||
= javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');"
|
= javascript_tag "$('label[avgrate=true]').prevAll().andSelf().addClass('bright');"
|
||||||
- else
|
- else
|
||||||
= label_tag "label_rating", "", :class => "avgrating"
|
= label_tag "label_rating", "", :class => "avgrating"
|
||||||
|
- else
|
||||||
|
= link_to "(enable voting)", admin_conference_cfp_info_path(@conference.short_title)
|
||||||
|
|
||||||
- if event.submitter.registrations.count < 1
|
- if event.submitter.registrations.count < 1
|
||||||
- bgcolor="#F7819F"
|
- bgcolor="#F7819F"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
class ChangeDefaultRatingInCallForPapers < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
change_column :call_for_papers, :rating, :integer, :default => 3
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
change_column :call_for_papers, :rating, :integer, :null => 1
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue