Announcement preivew

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-05-04 15:50:45 +08:00
1 parent f6307abfbf
commit 453cb21066
15 files changed
+122 -44

No files matched your search

+2 -2
View File
@@ -96,9 +96,9 @@ class ApplicationController < ActionController::Base
end
# Render the page
def render_page(id = nil)
def render_page(param)
if @item
render :text => process_page(@item, id), :layout => 'page_layout'
render :text => process_page(@item, param[:id],param), :layout => 'page_layout'
else
render :text => '404 Not Found'
end
+4 -2
View File
@@ -19,7 +19,7 @@ class PagesController < ApplicationController
if @item && @item.is_published
case @item._type
when 'Page'
render_page(params[:id])
render_page(params)
when 'Link'
redirect_to "http://#{@item[:url]}"
end
@@ -40,7 +40,9 @@ class PagesController < ApplicationController
end
def show_from_link
redirect_to "/#{@item.full_name}?id=#{params[:id]}"
# debugger
# a=1
redirect_to "/#{@item.full_name}?id=#{params[:id]}&preview=#{params[:preview]}"
end
def load_orbit_bar