diff --git a/app/models/call_for_papers.rb b/app/models/call_for_papers.rb index 8900f47d..7581fed2 100644 --- a/app/models/call_for_papers.rb +++ b/app/models/call_for_papers.rb @@ -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 diff --git a/app/models/conference.rb b/app/models/conference.rb index 6d48e314..558fa349 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -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 diff --git a/app/models/venue.rb b/app/models/venue.rb index 020a57ff..abf6e22d 100644 --- a/app/models/venue.rb +++ b/app/models/venue.rb @@ -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 diff --git a/app/views/admin/callforpapers/show.html.haml b/app/views/admin/callforpapers/show.html.haml index ea4b61f2..64c42606 100644 --- a/app/views/admin/callforpapers/show.html.haml +++ b/app/views/admin/callforpapers/show.html.haml @@ -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" diff --git a/app/views/admin/conference/edit.html.haml b/app/views/admin/conference/edit.html.haml index f0efbb86..d3b6f166 100644 --- a/app/views/admin/conference/edit.html.haml +++ b/app/views/admin/conference/edit.html.haml @@ -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 diff --git a/app/views/admin/lodgings/index.html.haml b/app/views/admin/lodgings/index.html.haml index 7dc8426a..2141ff2d 100644 --- a/app/views/admin/lodgings/index.html.haml +++ b/app/views/admin/lodgings/index.html.haml @@ -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"} diff --git a/app/views/admin/sponsors/index.html.haml b/app/views/admin/sponsors/index.html.haml index bd36c6a9..84a97c98 100644 --- a/app/views/admin/sponsors/index.html.haml +++ b/app/views/admin/sponsors/index.html.haml @@ -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"} diff --git a/app/views/admin/supporter_levels/index.html.haml b/app/views/admin/supporter_levels/index.html.haml index 71a9305a..23ecee60 100644 --- a/app/views/admin/supporter_levels/index.html.haml +++ b/app/views/admin/supporter_levels/index.html.haml @@ -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"} diff --git a/app/views/admin/tracks/index.html.haml b/app/views/admin/tracks/index.html.haml index 27bdedde..c570a549 100644 --- a/app/views/admin/tracks/index.html.haml +++ b/app/views/admin/tracks/index.html.haml @@ -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"} diff --git a/app/views/admin/venue/venue_info.html.haml b/app/views/admin/venue/venue_info.html.haml index 84888003..bf437061 100644 --- a/app/views/admin/venue/venue_info.html.haml +++ b/app/views/admin/venue/venue_info.html.haml @@ -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 diff --git a/db/migrate/20140617140018_add_checkboxes_for_splash_components_to_conference.rb b/db/migrate/20140617140018_add_checkboxes_for_splash_components_to_conference.rb new file mode 100644 index 00000000..5822c6cd --- /dev/null +++ b/db/migrate/20140617140018_add_checkboxes_for_splash_components_to_conference.rb @@ -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 diff --git a/db/migrate/20140617141918_add_include_cfp_in_splash_to_call_for_papers.rb b/db/migrate/20140617141918_add_include_cfp_in_splash_to_call_for_papers.rb new file mode 100644 index 00000000..415927e4 --- /dev/null +++ b/db/migrate/20140617141918_add_include_cfp_in_splash_to_call_for_papers.rb @@ -0,0 +1,5 @@ +class AddIncludeCfpInSplashToCallForPapers < ActiveRecord::Migration + def change + add_column :call_for_papers, :include_cfp_in_splash, :boolean, default: false + end +end diff --git a/db/migrate/20140617145048_add_venue_checkboxes_to_venue.rb b/db/migrate/20140617145048_add_venue_checkboxes_to_venue.rb new file mode 100644 index 00000000..eeb7bfea --- /dev/null +++ b/db/migrate/20140617145048_add_venue_checkboxes_to_venue.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 16717c99..030cce43 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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|