mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 05:42:13 +09:00
Add sort options to declared document/comment list
- 신고된 문서 열람 화면에서 작성일순 정렬 옵션 추가 (최근 신고순 옵션은 이미 있음) - 신고된 댓글 열람 화면에서 작성일순, 최근 신고순 정렬 옵션 추가 - 신고된 문서와 댓글 열람 화면에서 일관성있는 표시를 위해 컬럼 순서를 일부 조정
This commit is contained in:
parent
eacf1c43f0
commit
be9d357f51
6 changed files with 121 additions and 24 deletions
|
|
@ -177,8 +177,16 @@ class documentAdminView extends document
|
|||
$args->page_count = 10; // /< the number of pages that appear in the page navigation
|
||||
$args->order_type = strtolower(Context::get('order_type')) === 'asc' ? 'asc' : 'desc';
|
||||
|
||||
// select sort method
|
||||
$sort_index = Context::get('sort_index');
|
||||
if (!in_array($sort_index, array('declared_latest', 'declared_count', 'regdate')))
|
||||
{
|
||||
$sort_index = 'declared_latest';
|
||||
}
|
||||
Context::set('sort_index', $sort_index);
|
||||
|
||||
// get latest declared list
|
||||
if (Context::get('sort_index') === 'declared_latest')
|
||||
if ($sort_index === 'declared_latest')
|
||||
{
|
||||
$declared_output = executeQueryArray('document.getDeclaredLatest', $args);
|
||||
if ($declared_output->data && count($declared_output->data))
|
||||
|
|
@ -205,6 +213,14 @@ class documentAdminView extends document
|
|||
}
|
||||
else
|
||||
{
|
||||
if ($sort_index === 'declared_count')
|
||||
{
|
||||
$args->sort_index = 'document_declared.declared_count';
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->sort_index = 'documents.regdate';
|
||||
}
|
||||
$declared_output = executeQueryArray('document.getDeclaredList', $args);
|
||||
if ($declared_output->data && count($declared_output->data))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<tr>
|
||||
<th scope="col" class="title">{$lang->title}</th>
|
||||
<th scope="col" class="nowr">{$lang->writer}</th>
|
||||
<th scope="col" class="nowr"><a href="{getUrl('sort_index', 'declared_count')}">{$lang->declared_count} <block cond="$sort_index != 'declared_latest'">▼</block></a></th>
|
||||
<th scope="col" class="nowr">{$lang->readed_count}</th>
|
||||
<th scope="col" class="nowr">{$lang->cmd_vote}(+/-)</th>
|
||||
<th scope="col" class="nowr">{$lang->original_date}</th>
|
||||
<th scope="col" class="nowr"><a href="{getUrl('sort_index', 'declared_count')}">{$lang->declared_count} <block cond="$sort_index == 'declared_count'">▼</block></a></th>
|
||||
<th scope="col" class="nowr"><a href="{getUrl('sort_index', 'regdate')}">{$lang->original_date} <block cond="$sort_index == 'regdate'">▼</block></a></th>
|
||||
<th scope="col" class="nowr"><a href="{getUrl('sort_index', 'declared_latest')}">{$lang->latest_declared_date} <block cond="$sort_index == 'declared_latest'">▼</block></a></th>
|
||||
<th scope="col"><input type="checkbox" name="cart" title="Check All" /></th>
|
||||
</tr>
|
||||
|
|
@ -47,9 +47,9 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<tr loop="$document_list => $no,$oDocument">
|
||||
<td class="title"><a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank">{$oDocument->getTitle()}</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('declared_count')} (<a href="{getUrl('', 'act', 'dispDocumentAdminDeclaredLogByDocumentSrl', 'target_srl',$oDocument->document_srl)}" onclick="popopen(this.href, 'admin_popup');return false">{$lang->improper_document_declare_reason}</a>)</td>
|
||||
<td class="nowr">{$oDocument->get('readed_count')}</td>
|
||||
<td class="nowr">{$oDocument->get('voted_count')}/{$oDocument->get('blamed_count')}</td>
|
||||
<td class="nowr">{$oDocument->get('voted_count')} / {$oDocument->get('blamed_count')}</td>
|
||||
<td class="nowr">{$oDocument->get('declared_count')} (<a href="{getUrl('', 'act', 'dispDocumentAdminDeclaredLogByDocumentSrl', 'target_srl',$oDocument->document_srl)}" onclick="popopen(this.href, 'admin_popup');return false">{$lang->improper_document_declare_reason}</a>)</td>
|
||||
<td class="nowr">{$oDocument->getRegdate("Y-m-d H:i")}</td>
|
||||
<td class="nowr">{zdate($oDocument->get('latest_declared'), 'Y-m-d H:i')}</td>
|
||||
<td><input type="checkbox" name="cart" value="{$oDocument->document_srl}" /></td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue