Merge pull request #258 from gopesht/change_splash_layout
Changed splash layout
This commit is contained in:
commit
89df9a41d3
3 changed files with 57 additions and 53 deletions
|
|
@ -1,42 +1,42 @@
|
||||||
= 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'
|
||||||
|
= content_for :splash do
|
||||||
|
- unless @conference.description.blank?
|
||||||
|
%p= @conference.description
|
||||||
|
|
||||||
- unless @conference.description.blank?
|
- if @conference.include_program_in_splash?
|
||||||
%p= @conference.description
|
%section{ id: 'program' }
|
||||||
|
.pad
|
||||||
|
= render 'program'
|
||||||
|
|
||||||
- if @conference.include_program_in_splash?
|
- if @conference.include_registrations_in_splash?
|
||||||
%section{ id: 'program' }
|
%section{ id: 'registration' }
|
||||||
.pad
|
.pad
|
||||||
= render 'program'
|
= render 'registration'
|
||||||
|
|
||||||
- if @conference.include_registrations_in_splash?
|
|
||||||
%section{ id: 'registration' }
|
|
||||||
.pad
|
|
||||||
= render 'registration'
|
|
||||||
|
|
||||||
|
|
||||||
-unless @conference.call_for_papers.blank?
|
-unless @conference.call_for_papers.blank?
|
||||||
- if @conference.call_for_papers.include_cfp_in_splash?
|
- if @conference.call_for_papers.include_cfp_in_splash?
|
||||||
%section{ id:'callforpapers' }
|
%section{ id:'callforpapers' }
|
||||||
|
.pad
|
||||||
|
= render 'call_for_papers'
|
||||||
|
|
||||||
|
-unless @conference.venue.blank?
|
||||||
|
- if @conference.venue.include_venue_in_splash?
|
||||||
|
%section{ id: 'location' }
|
||||||
|
.pad
|
||||||
|
= render 'location'
|
||||||
|
- unless @conference.venue.lodgings.empty?
|
||||||
|
- if @conference.venue.include_lodgings_in_splash?
|
||||||
|
= render 'lodging'
|
||||||
|
|
||||||
|
- if @conference.include_sponsors_in_splash?
|
||||||
|
%section{ id: 'sponsors' }
|
||||||
.pad
|
.pad
|
||||||
= render 'call_for_papers'
|
= render 'sponsor'
|
||||||
|
|
||||||
-unless @conference.venue.blank?
|
- if @conference.include_social_media_in_splash?
|
||||||
- if @conference.venue.include_venue_in_splash?
|
%section{ id: 'social-media' }
|
||||||
%section{ id: 'location' }
|
|
||||||
.pad
|
.pad
|
||||||
= render 'location'
|
= render 'social_media'
|
||||||
- unless @conference.venue.lodgings.empty?
|
|
||||||
- if @conference.venue.include_lodgings_in_splash?
|
|
||||||
= render 'lodging'
|
|
||||||
|
|
||||||
- if @conference.include_sponsors_in_splash?
|
|
||||||
%section{ id: 'sponsors' }
|
|
||||||
.pad
|
|
||||||
= render 'sponsor'
|
|
||||||
|
|
||||||
- if @conference.include_social_media_in_splash?
|
|
||||||
%section{ id: 'social-media' }
|
|
||||||
.pad
|
|
||||||
= render 'social_media'
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,12 @@
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
= render 'layouts/messages'
|
= render 'layouts/messages'
|
||||||
.container#content
|
- if content_for :splash
|
||||||
= yield
|
#content
|
||||||
|
= yield :splash
|
||||||
|
-else
|
||||||
|
.container#content
|
||||||
|
= yield
|
||||||
|
|
||||||
#footer
|
#footer
|
||||||
.container
|
.container
|
||||||
|
|
|
||||||
|
|
@ -31,49 +31,49 @@ describe 'conference/show.html.haml' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders program partial' do
|
it 'renders program partial' do
|
||||||
expect(render).to include("#{@conference.description}")
|
expect(view.content_for(:splash)).to include("#{@conference.description}")
|
||||||
expect(view).to render_template(partial: 'conference/_program')
|
expect(view).to render_template(partial: 'conference/_program')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders registration partial' do
|
it 'renders registration partial' do
|
||||||
expect(rendered).to include("#{@conference.registration_description}")
|
expect(view.content_for(:splash)).to include("#{@conference.registration_description}")
|
||||||
expect(view).to render_template(partial: 'conference/_registration')
|
expect(view).to render_template(partial: 'conference/_registration')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders call_for_papers partial' do
|
it 'renders call_for_papers partial' do
|
||||||
expect(render).to include("#{@conference.call_for_papers.description}")
|
expect(view.content_for(:splash)).to include("#{@conference.call_for_papers.description}")
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders sponsors partial' do
|
it 'renders sponsors partial' do
|
||||||
expect(view).to render_template(partial: 'conference/_sponsor')
|
expect(view).to render_template(partial: 'conference/_sponsor')
|
||||||
expect(rendered).to include('Lorem Ipsum Dolor')
|
expect(view.content_for(:splash)).to include('Lorem Ipsum Dolor')
|
||||||
expect(rendered).to include('example@example.com')
|
expect(view.content_for(:splash)).to include('example@example.com')
|
||||||
expect(rendered).to include('Platin')
|
expect(view.content_for(:splash)).to include('Platin')
|
||||||
expect(rendered).to include('Example sponsor')
|
expect(view.content_for(:splash)).to include('Example sponsor')
|
||||||
expect(rendered).to include('http://www.example.com')
|
expect(view.content_for(:splash)).to include('http://www.example.com')
|
||||||
expect(rendered).to include('Lorem Ipsum Dolor')
|
expect(view.content_for(:splash)).to include('Lorem Ipsum Dolor')
|
||||||
expect(rendered).to include('rails.jpg')
|
expect(view.content_for(:splash)).to include('rails.jpg')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders social media partial' do
|
it 'renders social media partial' do
|
||||||
expect(view).to render_template('conference/_social_media')
|
expect(view).to render_template('conference/_social_media')
|
||||||
expect(rendered).to include('http://www.fbexample.com')
|
expect(view.content_for(:splash)).to include('http://www.fbexample.com')
|
||||||
expect(rendered).to include('http://www.google-example.com')
|
expect(view.content_for(:splash)).to include('http://www.google-example.com')
|
||||||
expect(rendered).to include('http://youtu.be/rtyutut')
|
expect(view.content_for(:splash)).to include('http://youtu.be/rtyutut')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders location partial' do
|
it 'renders location partial' do
|
||||||
expect(view).to render_template(partial: 'conference/_location')
|
expect(view).to render_template(partial: 'conference/_location')
|
||||||
expect(rendered).to include('Suse Office')
|
expect(view.content_for(:splash)).to include('Suse Office')
|
||||||
expect(rendered).to include('Maxfeldstrasse 5 \n90409 Nuremberg')
|
expect(view.content_for(:splash)).to include('Maxfeldstrasse 5 \n90409 Nuremberg')
|
||||||
expect(rendered).to include('www.opensuse.org')
|
expect(view.content_for(:splash)).to include('www.opensuse.org')
|
||||||
expect(rendered).to include('Lorem Ipsum Dolor')
|
expect(view.content_for(:splash)).to include('Lorem Ipsum Dolor')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'renders lodging partial' do
|
it 'renders lodging partial' do
|
||||||
expect(view).to render_template(partial: 'conference/_lodging')
|
expect(view).to render_template(partial: 'conference/_lodging')
|
||||||
expect(rendered).to include('Example Hotel')
|
expect(view.content_for(:splash)).to include('Example Hotel')
|
||||||
expect(rendered).to include('Lorem Ipsum Dolor')
|
expect(view.content_for(:splash)).to include('Lorem Ipsum Dolor')
|
||||||
expect(rendered).to include('http://www.example.com')
|
expect(view.content_for(:splash)).to include('http://www.example.com')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue