Sponsor dashboard added, with sponsor component for splash page
This commit is contained in:
parent
643b8b173a
commit
ea119a8158
36 changed files with 549 additions and 12 deletions
|
|
@ -3,13 +3,16 @@
|
|||
|
||||
class Conference < ActiveRecord::Base
|
||||
attr_accessible :title, :short_title, :social_tag, :contact_email, :timezone, :html_export_path,
|
||||
:start_date, :end_date, :rooms_attributes, :tracks_attributes, :dietary_choices_attributes,
|
||||
:use_dietary_choices, :use_supporter_levels, :supporter_levels_attributes, :social_events_attributes,
|
||||
:start_date, :end_date, :rooms_attributes, :tracks_attributes,
|
||||
:dietary_choices_attributes,
|
||||
:use_dietary_choices, :use_supporter_levels, :supporter_levels_attributes,
|
||||
:social_events_attributes,
|
||||
:event_types_attributes, :registration_start_date, :registration_end_date, :logo,
|
||||
:questions_attributes, :question_ids, :answers_attributes, :answer_ids,
|
||||
:difficulty_levels_attributes, :use_difficulty_levels,
|
||||
:use_vpositions, :use_vdays, :vdays_attributes, :vpositions_attributes, :use_volunteers,
|
||||
:media_id, :media_type
|
||||
:media_id, :media_type, :sponsorship_levels_attributes, :sponsor_email,
|
||||
:sponsor_description
|
||||
|
||||
has_paper_trail
|
||||
|
||||
|
|
@ -30,6 +33,8 @@ class Conference < ActiveRecord::Base
|
|||
has_many :vdays, :dependent => :destroy
|
||||
has_many :vpositions, :dependent => :destroy
|
||||
has_many :vchoices, :dependent => :destroy
|
||||
has_many :sponsorship_levels, dependent: :destroy
|
||||
has_many :sponsorship_registrations, dependent: :destroy
|
||||
|
||||
belongs_to :venue
|
||||
|
||||
|
|
@ -40,6 +45,7 @@ class Conference < ActiveRecord::Base
|
|||
accepts_nested_attributes_for :venue
|
||||
accepts_nested_attributes_for :dietary_choices, :allow_destroy => true
|
||||
accepts_nested_attributes_for :supporter_levels, :allow_destroy => true
|
||||
accepts_nested_attributes_for :sponsorship_levels, :allow_destroy => true
|
||||
accepts_nested_attributes_for :event_types, :allow_destroy => true
|
||||
accepts_nested_attributes_for :email_settings
|
||||
accepts_nested_attributes_for :questions, :allow_destroy => true
|
||||
|
|
|
|||
16
app/models/organization.rb
Normal file
16
app/models/organization.rb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
class Organization < ActiveRecord::Base
|
||||
attr_accessible :title, :photo, :email_id, :description, :website_url
|
||||
has_many :sponsorship_registrations, dependent: :destroy
|
||||
has_attached_file :photo,
|
||||
:styles => {:thumb => "100x100>", :large => "300x300>" }
|
||||
|
||||
validates_attachment_content_type :photo,
|
||||
:content_type => [/jpg/, /jpeg/, /png/, /gif/],
|
||||
:size => { :in => 0..500.kilobytes }
|
||||
validates_presence_of :title,
|
||||
:email_id,
|
||||
:website_url
|
||||
validates_uniqueness_of :email_id
|
||||
|
||||
|
||||
end
|
||||
6
app/models/sponsorship_level.rb
Normal file
6
app/models/sponsorship_level.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class SponsorshipLevel < ActiveRecord::Base
|
||||
attr_accessible :title, :description
|
||||
belongs_to :conference
|
||||
has_many :sponsorship_registrations
|
||||
validates_presence_of :title
|
||||
end
|
||||
11
app/models/sponsorship_registration.rb
Normal file
11
app/models/sponsorship_registration.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class SponsorshipRegistration < ActiveRecord::Base
|
||||
attr_accessible :name, :email_id, :contact_no, :amount_donated, :method_of_donation,
|
||||
:sponsorship_level_id, :conference_id, :organization_id
|
||||
belongs_to :organization
|
||||
belongs_to :sponsorship_level
|
||||
belongs_to :conference
|
||||
validates_presence_of :name, :email_id, :contact_no, :amount_donated,
|
||||
:method_of_donation, :sponsorship_level,
|
||||
:conference, :organization
|
||||
validates_uniqueness_of :email_id
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue