parent
05ed41615e
commit
19c5ebf450
|
@ -12,6 +12,8 @@ module TagsHelper
|
|||
@obj = Issue.find_by_id(obj_id)
|
||||
when '4'
|
||||
@obj = Bid.find_by_id(obj_id)
|
||||
when '5'
|
||||
@obj = Forum.find_by_id(obj_id)
|
||||
when '6'
|
||||
@obj = Attachment.find_by_id(obj_id)
|
||||
when '7'
|
||||
|
@ -44,6 +46,8 @@ module TagsHelper
|
|||
if user.id == obj_id
|
||||
@result = true
|
||||
end
|
||||
when '5'
|
||||
@result = is_forum_manager?(user.id,obj_id)
|
||||
when '7'
|
||||
if user.id == obj_id
|
||||
@result = true
|
||||
|
@ -56,6 +60,17 @@ module TagsHelper
|
|||
|
||||
end
|
||||
|
||||
# 判断用户是否是贴吧的管理员
|
||||
# add by chenmin
|
||||
def is_forum_manager?(user_id,forum_id)
|
||||
@result = false
|
||||
@user_id = Forum.find(forum_id).creator_id;
|
||||
if @user_id == user.id
|
||||
@result = true
|
||||
end
|
||||
return @result
|
||||
end
|
||||
|
||||
def tagname_val
|
||||
("#tag_name_name").value
|
||||
end
|
Loading…
Reference in New Issue