#580 관리자>컨텐츠의 문서/댓글 리스트에 모듈 정보 추가

This commit is contained in:
akasima 2014-03-18 17:06:11 +09:00
parent 1729c87aa7
commit 43fa3c0263
4 changed files with 62 additions and 4 deletions

View file

@ -52,7 +52,7 @@ class commentAdminView extends comment
// get a list by using comment->getCommentList.
$oCommentModel = getModel('comment');
$secretNameList = $oCommentModel->getSecretNameList();
$columnList = array('comment_srl', 'document_srl', 'is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
$columnList = array('comment_srl', 'document_srl','module_srl','is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
$output = $oCommentModel->getTotalCommentList($args, $columnList);
// $modules = $oCommentModel->getDistinctModules();
@ -66,6 +66,31 @@ class commentAdminView extends comment
// Context::set('modules_list', $modules_list);
Context::set('page_navigation', $output->page_navigation);
Context::set('secret_name_list', $secretNameList);
$oModuleModel = getModel('module');
$module_list = array();
$mod_srls = array();
foreach($output->data as $val)
{
$mod_srls[] = $val->module_srl;
}
$mod_srls = array_unique($mod_srls);
// Module List
$mod_srls_count = count($mod_srls);
if($mod_srls_count)
{
$columnList = array('module_srl', 'mid', 'browser_title');
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
if($module_output && is_array($module_output))
{
foreach($module_output as $module)
{
$module_list[$module->module_srl] = $module;
}
}
}
Context::set('module_list', $module_list);
// set the template
$this->setTemplatePath($this->module_path . 'tpl');
$this->setTemplateFile('comment_list');