댓글 신고시 신고 이유를 적을 수 있게 함

- 댓글에도 신고 이유를 적을 수 있다.
- 코드 정리
This commit is contained in:
MinSoo Kim 2016-01-29 01:22:09 +09:00
parent a9915a7986
commit 4bbd91bd3c
18 changed files with 415 additions and 41 deletions

View file

@ -140,6 +140,50 @@ class commentAdminView extends comment
$this->setTemplateFile('declared_list');
}
/**
* Display a reported comment and log of reporting
* @return void
*/
function dispCommentAdminDeclaredLogByCommentSrl()
{
// option for a list
$args = new stdClass;
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 10; // /< the number of pages that appear in the page navigation
$args->comment_srl = intval(Context::get('target_srl'));
// get Status name list
$oCommentModel = getModel('comment');
$oMemberModel = getModel('member');
$oComment = $oCommentModel->getComment($args->comment_srl);
$declared_output = executeQuery('comment.getDeclaredLogByCommentSrl', $args);
if($declared_output->data && count($declared_output->data))
{
$reporter_list = array();
foreach($declared_output->data as $key => $log)
{
$reporter_list[$log->member_srl] = $oMemberModel->getMemberInfoByMemberSrl($log->member_srl);
}
}
// Set values of document_model::getDocumentList() objects for a template
Context::set('total_count', $declared_output->total_count);
Context::set('total_page', $declared_output->total_page);
Context::set('page', $declared_output->page);
Context::set('declare_log', $declared_output->data);
Context::set('reporter_list', $reporter_list);
Context::set('declared_comment', $oComment);
Context::set('page_navigation', $declared_output->page_navigation);
// Set the template
$this->setLayoutFile('popup_layout');
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('declared_log');
}
}
/* End of file comment.admin.view.php */
/* Location: ./modules/comment/comment.admin.view.php */