Fix matt's code and add it to filters
This commit is contained in:
1 parent
dc4116bc3d
commit
815e6a8361
2 files changed
+24
-14
No files matched your search
+1
-7
@@ -34,7 +34,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
|
||||
|
||||
# @bulletins = (params[:sort] || @filter) ? get_sorted_and_filtered_bulletins : Bulletin.all.page(params[:page]).per(10)
|
||||
@bulletins = (params[:sort] || @filter) ? get_sorted_and_filtered("bulletin") : Bulletin.all.page(params[:page]).per(10)
|
||||
@bulletins = (params[:sort] || @filter) ? get_sorted_and_filtered("bulletin") : get_viewable("bulletin")
|
||||
@bulletin_categories = BulletinCategory.all
|
||||
|
||||
@bulletin_link = BulletinLink.new
|
||||
@@ -42,12 +42,6 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
|
||||
@bulletin_file = BulletinFile.new
|
||||
@file_url = panel_announcement_back_end_bulletins_path
|
||||
|
||||
if(!is_admin? || !is_manager?)
|
||||
@bulletins.delete_if{ |bulletin|
|
||||
bulletin.is_pending == true && ((!bulletin.bulletin_category.authed_users('fact_check').include?(current_user) rescue nil) || bulletin.create_user_id!=current_user.id)
|
||||
}
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
|
||||
Reference in new issue
Block a user