Add category for announcement widget
This commit is contained in:
1 parent
7f9a7edc98
commit
fdf4cfad2d
6 files changed
+23
-5
No files matched your search
+5
-1
@@ -13,7 +13,11 @@ class Panel::Announcement::Widget::BulletinsController < ObitWidgetController
|
||||
# deadline
|
||||
# @bulletin_categorys = BulletinCategory.first;
|
||||
# @bulletins = Bulletin.widget_datas(@bulletin_categorys.id).limit(9)
|
||||
@bulletins = Bulletin.widget_datas.limit(9)
|
||||
if params[:category_id]
|
||||
@bulletins = Bulletin.where(:bulletin_category_id => params[:category_id]).widget_datas.limit(9)
|
||||
else
|
||||
@bulletins = Bulletin.widget_datas.limit(9)
|
||||
end
|
||||
|
||||
get_categorys
|
||||
|
||||
|
||||
Reference in new issue
Block a user