编辑贴吧tag的权限问题

This commit is contained in:
lizanle 2015-09-19 10:28:30 +08:00
parent ba240c72b7
commit 7b24f9590d
1 changed files with 7 additions and 5 deletions

View File

@ -59,11 +59,13 @@
}
function addTag(){
if($("input[name='addTag']").val().trim() != ""){
$.get(
'<%= add_forum_tag_forum_path(@forum)%>'+"?tag_str="+$("input[name='addTag']").val(),
{}
);
if(<%=@forum.creator.id == User.current.id%>) {
if ($("input[name='addTag']").val().trim() != "") {
$.get(
'<%= add_forum_tag_forum_path(@forum)%>' + "?tag_str=" + $("input[name='addTag']").val(),
{}
);
}
}
}
</script>