update archive

This commit is contained in:
unknown authored and chris committed 2012-08-30 15:17:39 +08:00
1 parent 3ebe7378b9
commit a1560ebcf5
21 files changed
+2409 -47

No files matched your search

+6 -3
View File
@@ -39,8 +39,11 @@ class Admin::PagesController < ApplicationController
@module_app = @item.module_app
@frontend_path = @item.app_frontend_url ? @item.app_frontend_url : @module_app.widgets.keys[0]
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
if @module_app.widgets.any?{|b| b.class == Array}
@frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank?
end
case @item.module_app.key
when 'announcement'
@categories = BulletinCategory.all
@@ -89,7 +92,7 @@ class Admin::PagesController < ApplicationController
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
end
params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] )
params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field]
params[:page][:frontend_field_type] = nil
if @item.update_attributes(params[:page])