diff --git a/app/models/conference.rb b/app/models/conference.rb index c7847610..b5fcf15c 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -9,7 +9,7 @@ class Conference < ActiveRecord::Base :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, :color has_paper_trail @@ -122,7 +122,7 @@ class Conference < ActiveRecord::Base return false end - + private ## diff --git a/app/views/admin/conference/edit.html.haml b/app/views/admin/conference/edit.html.haml index 0176180c..13000e52 100644 --- a/app/views/admin/conference/edit.html.haml +++ b/app/views/admin/conference/edit.html.haml @@ -5,6 +5,7 @@ = 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!'" = f.input :contact_email, :hint => "Contact email address for your conference. Will be used as reply-to address in emails sent out by the system." + = f.input :color, :hint => "The color will be used eg for the dashboard.", :input_html => {:size => 6, :type => "color"} = f.inputs :name => "Scheduling" do = f.input :timezone, :as => :time_zone, :hint => "The conference time zone" diff --git a/db/migrate/20140528072939_add_color_to_conference.rb b/db/migrate/20140528072939_add_color_to_conference.rb new file mode 100644 index 00000000..c3f83980 --- /dev/null +++ b/db/migrate/20140528072939_add_color_to_conference.rb @@ -0,0 +1,5 @@ +class AddColorToConference < ActiveRecord::Migration + def change + add_column :conferences, :color, :string, default: '#000000' + end +end diff --git a/db/schema.rb b/db/schema.rb index 3ea44dfc..56dd290d 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: 20140514140013) do +ActiveRecord::Schema.define(version: 20140528072939) do create_table "answers", force: true do |t| t.string "title" @@ -78,6 +78,7 @@ ActiveRecord::Schema.define(version: 20140514140013) do t.boolean "use_volunteers" t.string "media_id" t.string "media_type" + t.string "color", default: "#000000" end create_table "conferences_questions", id: false, force: true do |t|