commit
12c5e3d512
54 changed files with 198 additions and 190 deletions
|
|
@ -3,7 +3,7 @@
|
|||
class Cfp < ActiveRecord::Base
|
||||
belongs_to :program
|
||||
|
||||
validates :program_id, presence: true, uniqueness: true
|
||||
validates :program_id, presence: true
|
||||
validates :start_date, :end_date, presence: true
|
||||
validate :before_end_of_conference
|
||||
validate :start_after_end_date
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ class Contact < ActiveRecord::Base
|
|||
|
||||
validates :conference, presence: true
|
||||
# Conferences only have one contact
|
||||
validates :conference_id, uniqueness: {message: 'has already contact details'}
|
||||
|
||||
validates :facebook, :twitter, :googleplus, :instagram,
|
||||
format: URI::regexp(%w(http https)), allow_blank: true
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ class Venue < ActiveRecord::Base
|
|||
|
||||
accepts_nested_attributes_for :commercial, allow_destroy: true
|
||||
validates :name, :street, :city, :country, presence: true
|
||||
validates :conference_id, presence: true, uniqueness: true
|
||||
|
||||
mount_uploader :picture, PictureUploader, mount_on: :photo_file_name
|
||||
|
||||
|
|
@ -32,7 +31,7 @@ class Venue < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def notify_on_venue_changed?
|
||||
return false unless conference.email_settings.send_on_venue_updated
|
||||
return false unless conference.try(:email_settings).try(:send_on_venue_updated)
|
||||
# do not notify unless the address changed
|
||||
return false unless self.name_changed? || self.street_changed? || self.city_changed? || self.country_changed?
|
||||
# do not notify unless the mail content is set up
|
||||
|
|
|
|||
|
|
@ -12,24 +12,24 @@
|
|||
.row
|
||||
.col-md-6.col-md-offset-3.col-sm-10.col-sm-offset-1
|
||||
%p
|
||||
- if @program.event_types.any?
|
||||
- if @conference.program.event_types.any?
|
||||
You can submit proposals for
|
||||
%span.notranslate
|
||||
= "#{event_types(@conference)}."
|
||||
- if @program.tracks.any?
|
||||
- if @conference.program.tracks.any?
|
||||
Proposals should fit in one of the
|
||||
%span.notranslate
|
||||
= "#{pluralize(@program.tracks.count, 'track')}:"
|
||||
= "#{pluralize(@conference.program.tracks.count, 'track')}:"
|
||||
= "#{tracks(@conference)}."
|
||||
The submission period has begun
|
||||
%em.notranslate
|
||||
= @program.cfp.start_date.strftime('%A, %B %-d. %Y')
|
||||
= @conference.program.cfp.start_date.strftime('%A, %B %-d. %Y')
|
||||
and closes
|
||||
%em.notranslate
|
||||
= @program.cfp.end_date.strftime('%A, %B %-d. %Y.')
|
||||
- if @program.cfp_open?
|
||||
= @conference.program.cfp.end_date.strftime('%A, %B %-d. %Y.')
|
||||
- if @conference.program.cfp_open?
|
||||
That means you have only
|
||||
%b.notranslate= pluralize(@program.cfp.remaining_days, 'day')
|
||||
%b.notranslate= pluralize(@conference.program.cfp.remaining_days, 'day')
|
||||
left!
|
||||
Remember
|
||||
%span.notranslate
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
%section#program
|
||||
= render 'schedule_splashpage'
|
||||
|
||||
- if @program.cfp_open? and @conference.splashpage.include_cfp
|
||||
- if @conference.program.cfp_open? and @conference.splashpage.include_cfp
|
||||
%section#callforpapers
|
||||
= render 'call_for_paper'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue