This commit is contained in:
Gopesh Tulsyan 2014-06-03 18:42:36 +00:00
commit b27a2b9a58
3 changed files with 23 additions and 16 deletions

View file

@ -1,9 +1,10 @@
= content_for :brand do
= link_to @conference.title, conference_url(@conference.short_title), class: 'navbar-brand'
%div#program
= render 'program'
%div#registration
= render 'registration'
%div#callforpapers
= render 'call_for_papers'
= content_for :splash do
%div#program
= render 'program'
%div#registration
= render 'registration'
%div#callforpapers
= render 'call_for_papers'

View file

@ -21,12 +21,18 @@
- if controller.class.name.split("::").first=="Admin"
= render 'layouts/admin'
-else
.container#messages
.row
.col-md-12
- if content_for :splash
%div#splash
#messages
= render 'layouts/messages'
.container#content
= yield
= yield :splash
-else
.container#messages
.row
.col-md-12
= render 'layouts/messages'
.container#content
= yield
#footer
.container

View file

@ -11,16 +11,16 @@ describe 'conference/show.html.haml' do
end
it 'renders program partial' do
expect(render).to include("#{@conference.description}")
expect(view).to render_template(partial: 'conference/_program')
expect(view.content_for(:splash)).to include("#{@conference.description}")
expect(view.content_for(:splash)).to render_template(partial: 'conference/_program')
end
it 'renders registration partial' do
expect(rendered).to include("#{@conference.registration_description}")
expect(view).to render_template(partial: 'conference/_registration')
expect(view.content_for(:splash)).to include("#{@conference.registration_description}")
expect(view.content_for(:splash)).to render_template(partial: 'conference/_registration')
end
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