Add position ordering and hiding page for i18n

This commit is contained in:
Christophe Vilayphiou committed 2012-05-06 00:35:13 +08:00
1 parent f190ce18ee
commit ce1fecaf93
5 files changed
+35 -8

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ class PagesController < ApplicationController
def show
#begin
@item = Item.first(:conditions => {:full_name => params[:page_name]})
if @item && @item.is_published
if @item && @item.is_published && (@item.enabled_for.nil? ? true : @item.enabled_for.include?(I18n.locale.to_s))
case @item._type
when 'Page'
render_page(params)