Add categories for all the widgets
This commit is contained in:
1 parent
6a30b0a1e4
commit
18617850e5
4 files changed
+16
-3
No files matched your search
@@ -26,7 +26,12 @@ class Admin::PagePartsController < ApplicationController
|
||||
@module_app = @part.module_app ? @part.module_app : @module_apps[0]
|
||||
@r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag
|
||||
@tag_objects = @r_tag.classify.constantize.all
|
||||
@categories = BulletinCategory.all
|
||||
case @module_app.key
|
||||
when 'bulletin'
|
||||
@categories = BulletinCategory.all
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@@ -59,6 +64,12 @@ class Admin::PagePartsController < ApplicationController
|
||||
|
||||
def reload_widgets
|
||||
@module_app = ModuleApp.find(params[:id])
|
||||
case @module_app.key
|
||||
when 'announcement'
|
||||
@categories = BulletinCategory.all
|
||||
when 'web_resource'
|
||||
@categories = WebLinkCategory.all
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js {}
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user