Fixed Footer to display even if the terms page is absent
This commit is contained in:
parent
7b0ac6b0dc
commit
cb7b7c4edf
|
@ -13,10 +13,10 @@ class FrontController < ApplicationController
|
||||||
|
|
||||||
def show_footer
|
def show_footer
|
||||||
@page = Page.find(:all, :conditions => {:name => /terms/i})
|
@page = Page.find(:all, :conditions => {:name => /terms/i})
|
||||||
@name = @page.first.name if @page.first.name.present?
|
@name = @page.first.name if @page.first.present?
|
||||||
@url = "/#{@name}" if @name.present?
|
@url = "/#{@name}" if @name.present?
|
||||||
|
|
||||||
if (!@site.enable_terms_of_use && @url.present?)
|
if (!@site.enable_terms_of_use && @page.first.present?)
|
||||||
render :text => (@site.footer + "<a href='#{@url}'>Terms of Use</a>")
|
render :text => (@site.footer + "<a href='#{@url}'>Terms of Use</a>")
|
||||||
else
|
else
|
||||||
render :text => @site.footer
|
render :text => @site.footer
|
||||||
|
|
Reference in New Issue