Added description to conference and program segment to splash
removed id from program partial
This commit is contained in:
parent
f825599433
commit
b3d719829e
6 changed files with 28 additions and 6 deletions
|
|
@ -9,7 +9,7 @@ class Conference < ActiveRecord::Base
|
||||||
:questions_attributes, :question_ids, :answers_attributes, :answer_ids,
|
:questions_attributes, :question_ids, :answers_attributes, :answer_ids,
|
||||||
:difficulty_levels_attributes, :use_difficulty_levels,
|
:difficulty_levels_attributes, :use_difficulty_levels,
|
||||||
:use_vpositions, :use_vdays, :vdays_attributes, :vpositions_attributes, :use_volunteers,
|
:use_vpositions, :use_vdays, :vdays_attributes, :vpositions_attributes, :use_volunteers,
|
||||||
:media_id, :media_type, :color
|
:media_id, :media_type, :color, :description
|
||||||
|
|
||||||
has_paper_trail
|
has_paper_trail
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 :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 :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 :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.inputs :name => "Scheduling" do
|
||||||
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
|
= f.input :timezone, :as => :time_zone, :hint => "The conference time zone"
|
||||||
|
|
|
||||||
15
app/views/conference/_program.html.haml
Normal file
15
app/views/conference/_program.html.haml
Normal file
|
|
@ -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'
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
= content_for :brand do
|
= content_for :brand do
|
||||||
= link_to @conference.title, conference_url(@conference.short_title), class: 'navbar-brand'
|
= link_to @conference.title, conference_url(@conference.short_title), class: 'navbar-brand'
|
||||||
= render :partial => "home/conference_details", :locals => {:conference => @conference}
|
%div#program
|
||||||
|
= render 'program'
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddDescriptionToConference < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :conferences, :description, :text
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
describe 'conference/show.html.haml' do
|
describe 'conference/show.html.haml' do
|
||||||
it 'renders conference details' do
|
it 'renders program partial' do
|
||||||
@conference = create(:conference)
|
@conference = create(:conference, description: 'Lorem Ipsum')
|
||||||
assign :conference, @conference
|
assign :conference, @conference
|
||||||
render
|
render
|
||||||
expect(render).to include("#{@conference.title}")
|
expect(render).to include("#{@conference.description}")
|
||||||
|
expect(view).to render_template(partial: 'conference/_program')
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue