Fixed Update tagging issue in announcement
This commit is contained in:
parent
6a6640b84c
commit
caef586691
|
@ -64,6 +64,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
# GET /bulletins/1/edit
|
# GET /bulletins/1/edit
|
||||||
def edit
|
def edit
|
||||||
@bulletin = Bulletin.find(params[:id])
|
@bulletin = Bulletin.find(params[:id])
|
||||||
|
@tags = get_tags
|
||||||
is_authorized_sub_manager = @bulletin.category.auth_sub_manager.authorized_user_ids rescue nil
|
is_authorized_sub_manager = @bulletin.category.auth_sub_manager.authorized_user_ids rescue nil
|
||||||
|
|
||||||
if !(is_manager? || is_admin? || is_authorized_sub_manager.include?(current_user.id))
|
if !(is_manager? || is_admin? || is_authorized_sub_manager.include?(current_user.id))
|
||||||
|
@ -121,7 +122,6 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
def update
|
def update
|
||||||
|
|
||||||
@bulletin = Bulletin.find(params[:id])
|
@bulletin = Bulletin.find(params[:id])
|
||||||
|
|
||||||
# @bulletin.image.clear if params[:bulletin][:image_del] == '1'
|
# @bulletin.image.clear if params[:bulletin][:image_del] == '1'
|
||||||
# if params[:bulletin][:image_del] == '1'
|
# if params[:bulletin][:image_del] == '1'
|
||||||
# @bulletin.remove_image!
|
# @bulletin.remove_image!
|
||||||
|
@ -129,11 +129,11 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
# params[:bulletin][:image_del] = nil
|
# params[:bulletin][:image_del] = nil
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
delete_out_invalid_date_from_params
|
delete_out_invalid_date_from_params
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
||||||
if @bulletin.update_attributes(params[:bulletin])
|
if @bulletin.update_attributes(params[:bulletin])
|
||||||
|
@bulletin.tagged_ids = @bulletin.tag_ids if params[:bulletin][:tag_ids].nil?
|
||||||
|
@bulletin.save
|
||||||
# if(is_manager? || is_admin?)
|
# if(is_manager? || is_admin?)
|
||||||
# @bulletin.is_checked = true
|
# @bulletin.is_checked = true
|
||||||
# @bulletin.is_rejected = false
|
# @bulletin.is_rejected = false
|
||||||
|
|
Reference in New Issue