mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#580 관리자>컨텐츠의 문서/댓글 리스트에 모듈 정보 추가
This commit is contained in:
parent
1729c87aa7
commit
43fa3c0263
4 changed files with 62 additions and 4 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -47,7 +47,12 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<tbody>
|
||||
<tr loop="$comment_list => $no, $val">
|
||||
{@ $comment = $val->getContentText(200)}
|
||||
<td><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" target="_blank"><!--@if(strlen($comment))-->{$comment}<!--@else--><em>{$lang->no_text_comment}</em><!--@end--></a></td>
|
||||
<td>
|
||||
<block cond="isset($module_list[$val->module_srl])">
|
||||
<a href="{getUrl('', 'mid', $module_list[$val->module_srl]->mid)}" target="_blank">{$module_list[$val->module_srl]->browser_title}</a> -
|
||||
</block>
|
||||
<a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" target="_blank"><!--@if(strlen($comment))-->{$comment}<!--@else--><em>{$lang->no_text_comment}</em><!--@end--></a>
|
||||
</td>
|
||||
<td class="nowr"><a href="#popup_menu_area" class="member_{$val->member_srl}">{$val->getNickName()}</a></td>
|
||||
<td class="nowr">{number_format($val->get('voted_count'))}/{number_format($val->get('blamed_count'))}</td>
|
||||
<td class="nowr">{(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class documentAdminView extends document
|
|||
|
||||
// get a list
|
||||
$oDocumentModel = getModel('document');
|
||||
$columnList = array('document_srl', 'title', 'member_srl', 'nick_name', 'readed_count', 'voted_count', 'blamed_count', 'regdate', 'ipaddress', 'status');
|
||||
$columnList = array('document_srl', 'module_srl', 'title', 'member_srl', 'nick_name', 'readed_count', 'voted_count', 'blamed_count', 'regdate', 'ipaddress', 'status');
|
||||
$output = $oDocumentModel->getDocumentList($args, false, true, $columnList);
|
||||
|
||||
// get Status name list
|
||||
|
|
@ -72,6 +72,30 @@ class documentAdminView extends document
|
|||
}
|
||||
Context::set('search_option', $search_option);
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = array();
|
||||
$mod_srls = array();
|
||||
foreach($output->data as $oDocument)
|
||||
{
|
||||
$mod_srls[] = $oDocument->get('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);
|
||||
|
||||
// Specify a template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('document_list');
|
||||
|
|
|
|||
|
|
@ -48,7 +48,11 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr loop="$document_list => $no, $oDocument">
|
||||
<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitleText()))-->{htmlspecialchars($oDocument->getTitleText())}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
|
||||
<td class="title">
|
||||
<block cond="isset($module_list[$oDocument->get('module_srl')])">
|
||||
<a href="{getUrl('', 'mid', $module_list[$oDocument->get('module_srl')]->mid)}" target="_blank">{$module_list[$oDocument->get('module_srl')]->browser_title}</a> -
|
||||
</block>
|
||||
<a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitleText()))-->{htmlspecialchars($oDocument->getTitleText())}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
|
||||
<td class="nowr"><a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</a></td>
|
||||
<td class="nowr">{$oDocument->get('readed_count')}</td>
|
||||
<td class="nowr">{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue