def show(news_id, local_id): comment = NewsComment.get(newsitem=parse_news_id(news_id), local_id=local_id) if not comment or (comment.deleted and not current_user.is_staff): abort(404) return common_comment.show('newsitem', comment)
def vote(news_id, local_id): comment = NewsComment.get(newsitem=parse_news_id(news_id), local_id=local_id, deleted=False) if not comment: abort(404) return common_comment.vote('newsitem', comment)
def edit(news_id, local_id): comment = NewsComment.get(newsitem=parse_news_id(news_id), local_id=local_id, deleted=False) if not comment: abort(404) return common_comment.edit( 'newsitem', comment, template='news/comment_work.html', )
def restore(news_id, local_id): comment = NewsComment.get(newsitem=parse_news_id(news_id), local_id=local_id, deleted=True) if not comment: abort(404) return common_comment.restore( 'newsitem', comment, template='news/comment_restore.html', template_ajax='news/comment_restore_ajax.html', template_ajax_modal=True, )
def abuse_newscomment(news_id, local_id): return abuse_common('newscomment', NewsComment.get(newsitem=parse_news_id(news_id), local_id=local_id, deleted=False))
def abuse_newscomment(news_id, local_id): return abuse_common( 'newscomment', NewsComment.get(newsitem=parse_news_id(news_id), local_id=local_id, deleted=False))