issue 70 trash link modify in document, comment admin

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8866 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-08-24 08:57:45 +00:00
parent 670b327bc2
commit 0f1ffbb83c
6 changed files with 41 additions and 24 deletions

View file

@ -9,6 +9,7 @@
$lang->comment_list = '댓글 목록';
$lang->cmd_toggle_checked_comment = '선택항목 반전';
$lang->cmd_delete_checked_comment = '선택항목 삭제';
$lang->trash = '휴지통';
$lang->cmd_trash = '휴지통으로 이동';
$lang->comment_count = '댓글 수';
$lang->about_comment_count = '댓글을 정해진 수 만큼만 표시하고 그 이상일 경우 목록으로 이동할 수 있게 합니다.';

View file

@ -9,6 +9,7 @@
<a href="{getUrl('','act','dispCommentAdminList', 'Y')}" <!--@if($search_keyword == '')-->class="active"<!--@end-->>All</a>
| <a href="{getUrl('search_target','is_secret','search_keyword', 'N')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'N')-->class="active"<!--@end-->>{$secret_name_list['N']}</a>
| <a href="{getUrl('search_target','is_secret','search_keyword', 'Y')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'Y')-->class="active"<!--@end-->>{$secret_name_list['Y']}</a>
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispTrashAdminList', 'origin_module', 'comment')}">{$lang->trash}</a>
</div>
<table width="100%" border="1" cellspacing="0" id="commentListTable">
<caption>

View file

@ -11,7 +11,7 @@
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'N')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'N')-->class="active"<!--@end-->>{$status_name_list['PUBLIC']}</a>
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'Y')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'Y')-->class="active"<!--@end-->>{$status_name_list['SECRET']}</a>
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'temp')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'temp')-->class="active"<!--@end-->>{$status_name_list['TEMP']}</a>
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispTrashAdminList')}">{$lang->cmd_trash}</a>
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispTrashAdminList', 'origin_module', 'document')}">{$lang->cmd_trash}</a>
</div>
<table width="100%" border="1" cellspacing="0" id="documentListTable">
<caption>

View file

@ -11,6 +11,7 @@
<conditions>
<condition operation="equal" column="T.remover_srl" default="M.member_srl" notnull="notnull" />
<condition operation="in" column="trash_srl" var="trashSrl" filter="number" pipe="and" />
<condition operation="in" column="origin_module" var="originModule" pipe="and" />
</conditions>
<navigation>
<index var="sort_index" default="trash_srl" order="desc" />

View file

@ -10,25 +10,37 @@ var confirm_restore_msg = '{$lang->confirm_restore}';
<input type="hidden" name="act" value="procTrashAdminEmptyTrash" />
<input type="hidden" name="page" value="{$page}" />
<input type="hidden" name="is_all" value="true" />
<h1 class="h1">{$lang->document}</h1>
<h1 class="h1">
<!--@if($origin_module == 'document')-->
{$lang->document}
<!--@elseif($origin_module == 'comment')-->
{$lang->comment}
<!--@end-->
</h1>
<div class="table even">
<div class="cnb">
<!--@if($origin_module == 'document')-->
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">All</a>
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'N')}">{$status_name_list['PUBLIC']}</a>
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'Y')}">{$status_name_list['SECRET']}</a>
| <a href="{getUrl('search_target', 'is_secret', 'search_keyword', 'temp')}">{$status_name_list['TEMP']}</a>
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispTrashAdminList')}" class="active">{$lang->cmd_trash}</a>
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'N')}">{$status_name_list['PUBLIC']}</a>
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'Y')}">{$status_name_list['SECRET']}</a>
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'temp')}">{$status_name_list['TEMP']}</a>
<!--@elseif($origin_module == 'comment')-->
<a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList')}">All</a>
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList', 'search_target','is_secret','search_keyword', 'N')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'N')-->class="active"<!--@end-->>{$secret_name_list['N']}</a>
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispCommentAdminList', 'search_target','is_secret','search_keyword', 'Y')}" <!--@if($search_target == 'is_secret' && $search_keyword == 'Y')-->class="active"<!--@end-->>{$secret_name_list['Y']}</a>
<!--@end-->
| <a href="{getUrl('', 'module', 'admin', 'act', 'dispTrashAdminList', 'origin_module', $origin_module)}" class="active">{$lang->trash}</a>
</div>
<table width="100%" border="1" cellspacing="0" id="trashListTable">
<caption>
{$lang->cmd_trash}({number_format($total_count)})
{$lang->trash}({number_format($total_count)})
<span class="side"><span class="btn"><a href="#listManager" class="modalAnchor" onclick="getTrashList();">선택한 글 관리...</a></span>
<span class="btn"><button type="submit" name="is_all" value="true">{$lang->empty_trash_all}</button></span></span>
</caption>
<thead>
<tr>
<th scope="col" class="title">{$lang->document} ({$lang->trash_type})</th>
<th scope="col" class="title">{$lang->document}</th>
<th scope="col">{$lang->trash_nick_name}</th>
<th scope="col">{$lang->trash_date}</th>
<th scope="col">{$lang->ipaddress}</th>
@ -38,7 +50,7 @@ var confirm_restore_msg = '{$lang->confirm_restore}';
</thead>
<tfoot>
<tr>
<th scope="col" class="title">{$lang->document} ({$lang->trash_type})</th>
<th scope="col" class="title">{$lang->document}</th>
<th scope="col">{$lang->trash_nick_name}</th>
<th scope="col">{$lang->trash_date}</th>
<th scope="col">{$lang->ipaddress}</th>
@ -49,17 +61,7 @@ var confirm_restore_msg = '{$lang->confirm_restore}';
<tbody>
<!--@foreach($trash_list as $no => $oTrashVO)-->
<tr>
<td class="title">
{$oTrashVO->getTitle()} (
<!--@if($oTrashVO->getOriginModule() == 'document')-->
{$lang->document}
<!--@else if($oTrashVO->getOriginModule() == 'comment')-->
{$lang->replies}
<!--@else-->
{$lang->etc}
<!--@end-->
)
</td>
<td class="title">{$oTrashVO->getTitle()}</td>
<td><span class="member_{$oTrashVO->getMemberSrl()">{htmlspecialchars($oTrashVO->getNickName())}</span></td>
<td>{zdate($oTrashVO->getRegdate(), "Y-m-d H:i:s")}</td>
<td>{$oTrashVO->getIpaddress()}</td>

View file

@ -20,26 +20,38 @@ class trashAdminView extends trash {
* @brief trash list
**/
function dispTrashAdminList() {
$origin_module = Context::get('origin_module');
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 5; // /< the number of pages that appear in the page navigation
$args->search_target = Context::get('search_target'); // /< search (title, contents ...)
$args->search_keyword = Context::get('search_keyword'); // /< keyword to search
$args->originModule = Context::get('origin_module');
$oTrashModel = getModel('trash');
$output = $oTrashModel->getTrashList($args);
// get Status name list
$oDocumentModel = &getModel('document');
$statusNameList = $oDocumentModel->getStatusNameList();
if($origin_module == 'document')
{
// get Status name list
$oDocumentModel = &getModel('document');
$statusNameList = $oDocumentModel->getStatusNameList();
Context::set('status_name_list', $statusNameList);
}
else if($origin_module == 'comment')
{
// get a list by using comment->getCommentList.
$oCommentModel = &getModel('comment');
$secretNameList = $oCommentModel->getSecretNameList();
Context::set('secret_name_list', $secretNameList);
}
Context::set('trash_list', $output->data);
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
Context::set('page_navigation', $output->page_navigation);
Context::set('status_name_list', $statusNameList);
// 템플릿 파일 지정
$this->setTemplateFile('trash_list');