diff --git a/app/models/conference.rb b/app/models/conference.rb index b5fcf15c..fb3e14ae 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, :color + :media_id, :media_type, :color, :description has_paper_trail diff --git a/app/views/admin/conference/edit.html.haml b/app/views/admin/conference/edit.html.haml index 13000e52..8ad5d0a3 100644 --- a/app/views/admin/conference/edit.html.haml +++ b/app/views/admin/conference/edit.html.haml @@ -6,6 +6,7 @@ = 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.input :description, hint: 'This description will be shown in the program segement of the Splash' = f.inputs :name => "Scheduling" do = f.input :timezone, :as => :time_zone, :hint => "The conference time zone" diff --git a/app/views/conference/_program.html.haml b/app/views/conference/_program.html.haml new file mode 100644 index 00000000..26d0d6de --- /dev/null +++ b/app/views/conference/_program.html.haml @@ -0,0 +1,15 @@ += content_for :splash_nav do + %li + %a{ href: '#program' } Program + +%div.container.text-center + %div.row + %div.col-md-12 + %h1 Program + - if !@conference.description.blank? + %p + = @conference.description + - if @conference.call_for_papers and @conference.call_for_papers.schedule_public + %span You can find the complete schedule in our + %span + = link_to 'Master Schedule', conference_schedule_path(@conference.short_title), target: '_blank' diff --git a/app/views/conference/show.html.haml b/app/views/conference/show.html.haml index fab08020..319cb460 100644 --- a/app/views/conference/show.html.haml +++ b/app/views/conference/show.html.haml @@ -1,3 +1,4 @@ = content_for :brand do = link_to @conference.title, conference_url(@conference.short_title), class: 'navbar-brand' -= render :partial => "home/conference_details", :locals => {:conference => @conference} +%div#program + = render 'program' diff --git a/db/migrate/20140528084706_add_description_to_conference.rb b/db/migrate/20140528084706_add_description_to_conference.rb new file mode 100644 index 00000000..0cb7291d --- /dev/null +++ b/db/migrate/20140528084706_add_description_to_conference.rb @@ -0,0 +1,5 @@ +class AddDescriptionToConference < ActiveRecord::Migration + def change + add_column :conferences, :description, :text + end +end diff --git a/spec/views/conference/show.html.haml_spec.rb b/spec/views/conference/show.html.haml_spec.rb index b822a73e..d72a3070 100644 --- a/spec/views/conference/show.html.haml_spec.rb +++ b/spec/views/conference/show.html.haml_spec.rb @@ -1,10 +1,10 @@ require 'spec_helper' describe 'conference/show.html.haml' do - it 'renders conference details' do - @conference = create(:conference) + it 'renders program partial' do + @conference = create(:conference, description: 'Lorem Ipsum') assign :conference, @conference render - expect(render).to include("#{@conference.title}") + expect(render).to include("#{@conference.description}") + expect(view).to render_template(partial: 'conference/_program') end - end