move check if user is logged in out of template

This commit is contained in:
pixeldesu 2015-08-28 16:36:49 +02:00
parent 8c5badf0b8
commit a9ad31b285
3 changed files with 17 additions and 17 deletions

View File

@ -6,6 +6,8 @@ class StaticController < ApplicationController
format.html
format.js
end
else
return render 'static/front'
end
end

View File

@ -1,3 +1,4 @@
- provide(:title, "#{APP_CONFIG['site_name']}")
.jumbotron.j2-jumbo.text-center.particle-jumbotron
#particles
.particle-content

View File

@ -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'