mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-24 21:59:55 +09:00
탭방식 최근글 위젯의 탭을 최종 변경시간이 높은 순으로 정렬
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3070 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8a73eefcbe
commit
52d0bd954c
1 changed files with 12 additions and 1 deletions
|
|
@ -74,6 +74,9 @@
|
|||
$tab_list = $oModuleModel->getMidList($obj);
|
||||
if(!$tab_list || !count($tab_list)) return;
|
||||
|
||||
// 최근글이 등록된 탭의 순서를 정하기 위한 변수
|
||||
$newest_tab = array();
|
||||
|
||||
// 각 모듈에 해당하는 문서들을 구함
|
||||
$obj = null;
|
||||
$obj->list_count = $widget_info->list_count;
|
||||
|
|
@ -94,15 +97,23 @@
|
|||
$oDocument = $oDocumentModel->getDocument();
|
||||
$oDocument->setAttribute($v);
|
||||
$data[$k] = $oDocument;
|
||||
if(!$newest_tab[$key]) $newest_tab[$key] = $oDocument->get('last_update');
|
||||
}
|
||||
$tab_list[$key]->document_list = $data;
|
||||
} else {
|
||||
unset($tab_list[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
if(count($newest_tab)) {
|
||||
arsort($newest_tab);
|
||||
foreach($newest_tab as $key => $val) {
|
||||
$sorted_tab_list[$key] = $tab_list[$key];
|
||||
}
|
||||
} else $sorted_tab_list = $tab_list;
|
||||
|
||||
Context::set('widget_info', $widget_info);
|
||||
Context::set('tab_list', $tab_list);
|
||||
Context::set('tab_list', $sorted_tab_list);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue