Complete new interface

This commit is contained in:
Fu Matthew authored and chris committed 2013-01-14 19:18:25 +08:00
1 parent 16cfd27fe9
commit e1e003af6e
17 files changed
+178 -57

No files matched your search

@@ -26,6 +26,7 @@ class Admin::PagePartsController < ApplicationController
@part = PagePart.find(params[:id])
@module_apps = ModuleApp.excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc)
@module_app = @part.module_app ? @part.module_app : @module_apps[0]
@user_choose = @part.widget_path
@r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag
@tag_objects = @r_tag.classify.constantize.all rescue nil
@@ -41,6 +42,7 @@ class Admin::PagePartsController < ApplicationController
@tags = AnnouncementTag.all
when 'gallery'
@albums = GalleryAlbum.all
@tags = []
when 'web_resource'
@categories = WebLinkCategory.all
@tags = WebResourceTag.all
@@ -103,6 +105,7 @@ class Admin::PagePartsController < ApplicationController
@tags = AnnouncementTag.all
when 'gallery'
@albums = GalleryAlbum.all
@tags = []
when 'web_resource'
@categories = WebLinkCategory.all
@tags = WebResourceTag.all
@@ -119,9 +122,10 @@ class Admin::PagePartsController < ApplicationController
def reload_widget_styles
@module_app = ModuleApp.find(params[:module_app_id])
@part = PagePart.find params[:part_id]
@user_choose =@widget_path= params[:id]
@widget_style = @module_app.widgets[params[:id]]
respond_to do |format|
format.js {}
end