mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue