move check if user is logged in out of template
This commit is contained in:
parent
8c5badf0b8
commit
a9ad31b285
|
@ -6,6 +6,8 @@ class StaticController < ApplicationController
|
|||
format.html
|
||||
format.js
|
||||
end
|
||||
else
|
||||
return render 'static/front'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
- provide(:title, "#{APP_CONFIG['site_name']}")
|
||||
.jumbotron.j2-jumbo.text-center.particle-jumbotron
|
||||
#particles
|
||||
.particle-content
|
|
@ -1,20 +1,17 @@
|
|||
- provide(:title, "#{APP_CONFIG['site_name']}")
|
||||
- if user_signed_in?
|
||||
= render 'static/mobile_nav'
|
||||
.container.j2-page
|
||||
.col-md-3.col-sm-4
|
||||
= render 'shared/sidebar'
|
||||
.col-md-9.col-xs-12.col-sm-8.j2-col-reset
|
||||
= render 'layouts/messages'
|
||||
#timeline
|
||||
- @timeline.each do |answer|
|
||||
= render 'shared/answerbox', a: answer
|
||||
= render 'static/mobile_nav'
|
||||
.container.j2-page
|
||||
.col-md-3.col-sm-4
|
||||
= render 'shared/sidebar'
|
||||
.col-md-9.col-xs-12.col-sm-8.j2-col-reset
|
||||
= render 'layouts/messages'
|
||||
#timeline
|
||||
- @timeline.each do |answer|
|
||||
= render 'shared/answerbox', a: answer
|
||||
|
||||
#pagination= will_paginate @timeline, renderer: BootstrapPagination::Rails, page_links: false
|
||||
#pagination= will_paginate @timeline, renderer: BootstrapPagination::Rails, page_links: false
|
||||
|
||||
- if @timeline.next_page
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @timeline.current_page }}
|
||||
Load more
|
||||
.visible-xs= render 'shared/links'
|
||||
- else
|
||||
= render 'static/front'
|
||||
- if @timeline.next_page
|
||||
%button#load-more-btn.btn.btn-default{type: :button, data: { current_page: @timeline.current_page }}
|
||||
Load more
|
||||
.visible-xs= render 'shared/links'
|
Loading…
Reference in New Issue