Merge pull request #250 from gopesht/adds_checkboxes_for_splash_components

Adds migrations for checkboxes of splash components
This commit is contained in:
Gopesh Tulsyan 2014-06-17 23:20:14 +05:30
commit a2a9e739f9
14 changed files with 69 additions and 25 deletions

View file

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

View file

@ -16,7 +16,10 @@ class Conference < ActiveRecord::Base
:sponsorship_levels_attributes,
:sponsors_attributes, :facebook_url,
:google_url, :twitter_url, :sponsor_description, :sponsor_email,
:lodging_description
:lodging_description, :include_registrations_in_splash,
:include_sponsors_in_splash, :include_tracks_in_splash,
:include_tickets_in_splash, :include_social_media_in_splash,
:include_program_in_splash
has_paper_trail

View file

@ -1,5 +1,6 @@
class Venue < ActiveRecord::Base
attr_accessible :name, :description, :website, :address, :photo, :lodgings_attributes
attr_accessible :name, :description, :website, :address, :photo, :lodgings_attributes,
:include_venue_in_splash, :include_lodgings_in_splash
has_many :conferences
has_many :lodgings
before_create :generate_guid

View file

@ -1,6 +1,7 @@
.row
.col-md-8
= semantic_form_for(@cfp, :url => admin_conference_callforpapers_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :include_cfp_in_splash, label: 'Include Call for Papers in Splash', hint: 'On setting this true you will enable the call for papers to be displayed on the splash page'
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.input :description, :hint => "Welcome text for the Call for Papers"

View file

@ -1,6 +1,7 @@
.row
.col-md-8
= semantic_form_for(@conference, :url => admin_conference_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :include_program_in_splash, hint: 'On setting this true you will enable the program component to be displayed on the splash page.This component includes tracks, keynote speakers and the schedule'
= f.input :title, :hint => "The full name of the conference, such as 'OpenSUSE Conference 2013'"
= f.input :short_title, :hint => "A short title, such as 'osc2013', to be used in URLs"
= f.input :social_tag, :hint => "The hashtag you'll use on Twitter and Google+. Don't include the '#' sign!'"
@ -12,17 +13,20 @@
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
= f.input :start_date, :as => :string, :input_html => { :id => "conference-start-datepicker", :readonly => "readonly" }
= f.input :end_date, :as => :string, :input_html => { :id => "conference-end-datepicker", :readonly => "readonly" }
= f.inputs name: 'Registration' do
= f.input :include_registrations_in_splash, hint: 'On setting this true you will enable the registrations to be displayed on the splash page'
= f.input :registration_start_date, :as => :string, :input_html => { :id => "conference-reg-start-datepicker", :readonly => "readonly" }
= f.input :registration_end_date, :as => :string, :input_html => { :id => "conference-reg-end-datepicker", :readonly => "readonly" }
= f.input :registration_description, hint: 'This description will appear in registration segment of the splash'
= f.input :registration_description, hint: 'This description will appear in registration segment of the splash'
= f.input :ticket_description, hint: 'This will appear in the Tickets segment of the splash'
= f.input :sponsor_description, hint: 'This will appear in the sponsor segment of the splash'
= f.input :sponsor_email, hint: 'This will appear in the sponsor segment of the splash for the sponsors to contact to the organizers'
= f.input :lodging_description, hint: 'This will appear in the lodging segment of the splash'
= f.inputs :name => "Media" do
= f.inputs :name => 'Social Media' do
- if !@conference.logo.blank?
= image_tag @conference.logo(:thumb)
= f.input :include_social_media_in_splash, hint: 'On setting this true you will enable the social media links to be displayed on the splash page'
= f.input :logo, :label => "Conference Logo", :hint => "This will be displayed on the front page."
= f.input :media_type, :as => :select, :label => "Conference Promo Media Type", :class=>"form-control", :collection => Conference.media_types.values, :include_blank => false, :hint => "This media-item will be used to represent this conference at various places in OSEM."
= f.input :media_id, :label => "Conference Promo Media ID", :as => :string

View file

@ -1,5 +1,6 @@
.row
.col-md-8
= semantic_form_for(@venue, :url => admin_conference_lodging_path(@conference.short_title, @conference.venue.lodgings), :html => {:multipart => true}) do |f|
= f.input :include_lodgings_in_splash, hint: 'On setting this true you will enable the lodgings to be displayed on the splash page'
= dynamic_association :lodgings, "Lodgings", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,5 +1,6 @@
.row
.col-md-8
= semantic_form_for(@conference, :url => admin_conference_sponsor_path(@conference.short_title, @conference.sponsors)) do |f|
= f.input :include_sponsors_in_splash, hint: 'On setting this true you will enable the sponsors to be displayed on the splash page'
= dynamic_association :sponsors, "Sponsors", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -2,5 +2,6 @@
.col-md-8
= semantic_form_for(@conference, :url => admin_conference_supporter_level_path(@conference.short_title, @conference.supporter_levels)) do |f|
= f.input :use_supporter_levels, :label => false
= f.input :include_tickets_in_splash, hint: 'On setting this true you will enable the tickets to be displayed on the splash page'
= dynamic_association :supporter_levels, "Supporter Levels", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,5 +1,6 @@
.row
.col-md-8
= semantic_form_for(@conference, :url => admin_conference_track_path(@conference.short_title, @conference.tracks)) do |f|
= f.input :include_tracks_in_splash, hint: 'On setting this true you will enable the tracks to be displayed on the splash page'
= dynamic_association :tracks, "Tracks", f
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}

View file

@ -1,6 +1,7 @@
.row
.col-md-8
= semantic_form_for(@venue, :url => admin_conference_venue_update_path(@conference.short_title),:html => {:multipart => true}) do |f|
= f.input :include_venue_in_splash, hint: 'On setting this true you will enable the venue to be displayed on the splash page'
= f.input :name, :input_html => {:rows => 1}
= f.input :address, :input_html => {:rows => 1}
= f.input :website

View file

@ -0,0 +1,10 @@
class AddCheckboxesForSplashComponentsToConference < ActiveRecord::Migration
def change
add_column :conferences, :include_registrations_in_splash, :boolean, default: false
add_column :conferences, :include_sponsors_in_splash, :boolean, default: false
add_column :conferences, :include_tracks_in_splash, :boolean, default: false
add_column :conferences, :include_tickets_in_splash, :boolean, default: false
add_column :conferences, :include_social_media_in_splash, :boolean, default: false
add_column :conferences, :include_program_in_splash, :boolean, default: false
end
end

View file

@ -0,0 +1,5 @@
class AddIncludeCfpInSplashToCallForPapers < ActiveRecord::Migration
def change
add_column :call_for_papers, :include_cfp_in_splash, :boolean, default: false
end
end

View file

@ -0,0 +1,6 @@
class AddVenueCheckboxesToVenue < ActiveRecord::Migration
def change
add_column :venues, :include_venue_in_splash, :boolean, default: false
add_column :venues, :include_lodgings_in_splash, :boolean, default: false
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140614174354) do
ActiveRecord::Schema.define(version: 20140617145048) do
create_table "answers", force: true do |t|
t.string "title"
@ -20,15 +20,16 @@ ActiveRecord::Schema.define(version: 20140614174354) do
end
create_table "call_for_papers", force: true do |t|
t.date "start_date", null: false
t.date "end_date", null: false
t.text "description", null: false
t.date "start_date", null: false
t.date "end_date", null: false
t.text "description", null: false
t.integer "conference_id"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "schedule_changes", default: false
t.integer "rating", default: 3
t.boolean "schedule_changes", default: false
t.integer "rating", default: 3
t.boolean "schedule_public"
t.boolean "include_cfp_in_splash", default: false
end
create_table "comments", force: true do |t|
@ -50,15 +51,15 @@ ActiveRecord::Schema.define(version: 20140614174354) do
add_index "comments", ["user_id"], name: "index_comments_on_user_id"
create_table "conferences", force: true do |t|
t.string "guid", null: false
t.string "title", null: false
t.string "short_title", null: false
t.string "guid", null: false
t.string "title", null: false
t.string "short_title", null: false
t.string "social_tag"
t.string "contact_email", null: false
t.string "timezone", null: false
t.string "contact_email", null: false
t.string "timezone", null: false
t.string "html_export_path"
t.date "start_date", null: false
t.date "end_date", null: false
t.date "start_date", null: false
t.date "end_date", null: false
t.integer "venue_id"
t.datetime "created_at"
t.datetime "updated_at"
@ -68,12 +69,12 @@ ActiveRecord::Schema.define(version: 20140614174354) do
t.string "logo_content_type"
t.integer "logo_file_size"
t.datetime "logo_updated_at"
t.boolean "use_dietary_choices", default: false
t.boolean "use_supporter_levels", default: false
t.boolean "use_dietary_choices", default: false
t.boolean "use_supporter_levels", default: false
t.integer "revision"
t.boolean "use_vpositions", default: false
t.boolean "use_vdays", default: false
t.boolean "use_difficulty_levels", default: false
t.boolean "use_vpositions", default: false
t.boolean "use_vdays", default: false
t.boolean "use_difficulty_levels", default: false
t.boolean "use_volunteers"
t.string "media_id"
t.string "media_type"
@ -87,6 +88,12 @@ ActiveRecord::Schema.define(version: 20140614174354) do
t.text "sponsor_description"
t.string "sponsor_email"
t.text "lodging_description"
t.boolean "include_registrations_in_splash", default: false
t.boolean "include_sponsors_in_splash", default: false
t.boolean "include_tracks_in_splash", default: false
t.boolean "include_tickets_in_splash", default: false
t.boolean "include_social_media_in_splash", default: false
t.boolean "include_program_in_splash", default: false
end
create_table "conferences_questions", id: false, force: true do |t|
@ -396,8 +403,8 @@ ActiveRecord::Schema.define(version: 20140614174354) do
create_table "venues", force: true do |t|
t.string "guid"
t.text "name", limit: 255
t.text "address", limit: 255
t.text "name", limit: 255
t.text "address", limit: 255
t.string "website"
t.text "description"
t.string "offline_map_url"
@ -408,6 +415,8 @@ ActiveRecord::Schema.define(version: 20140614174354) do
t.string "photo_content_type"
t.integer "photo_file_size"
t.datetime "photo_updated_at"
t.boolean "include_venue_in_splash", default: false
t.boolean "include_lodgings_in_splash", default: false
end
create_table "versions", force: true do |t|