mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1625 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
49c3b7b5e6
commit
9b37a11ec8
5 changed files with 21 additions and 8 deletions
|
|
@ -224,7 +224,7 @@
|
|||
if($output->order) {
|
||||
$buff .= '$output->order = array(';
|
||||
foreach($output->order as $key => $val) {
|
||||
$buff .= sprintf('array($args->%s?$args->%s:"%s","%s"),', $val->var, $val->var, $val->default, $val->order);
|
||||
$buff .= sprintf('array($args->%s?$args->%s:"%s",in_array($args->%s,array("asc","desc"))?$args->%s:"asc"),', $val->var, $val->var, $val->default, $val->order, $val->order);
|
||||
}
|
||||
$buff .= ');'."\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,8 @@
|
|||
$args->search_keyword = Context::get('search_keyword'); ///< 검색어
|
||||
if($this->module_info->use_category=='Y') $args->category_srl = Context::get('category'); ///< 카테고리 사용시 선택된 카테고리
|
||||
|
||||
$args->sort_index = 'list_order'; ///< 소팅 값
|
||||
$args->sort_index = Context::get('sort_index');
|
||||
$args->order_type = Context::get('order_type');
|
||||
|
||||
// 목록 구함, document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
||||
$output = $oDocumentModel->getDocumentList($args);
|
||||
|
|
|
|||
|
|
@ -29,10 +29,20 @@
|
|||
<!--@end-->
|
||||
<th scope="col" class="title">{$lang->title}</th>
|
||||
<th class="author" scope="col">{$lang->writer}</th>
|
||||
<th class="reading" scope="col"><a href="#">{$lang->readed_count}<img src="./images/{$module_info->colorset}/buttonDescending.gif" alt="" width="5" height="3" class="sort" /></a></th>
|
||||
|
||||
<th class="recommend" scope="col"><a href="#">{$lang->voted_count}<img src="./images/{$module_info->colorset}/buttonDescending.gif" alt="" width="5" height="3" class="sort" /></a></th>
|
||||
<th scope="col" class="date">{$lang->date}</th>
|
||||
<!--@if($order_type == "desc")-->
|
||||
{@ $order_icon = "buttonDescending.gif" }
|
||||
{@ $order_type = "asc"; }
|
||||
<!--@else-->
|
||||
{@ $order_icon = "buttonAscending.gif" }
|
||||
{@ $order_type = "desc"; }
|
||||
<!--@end-->
|
||||
|
||||
<th class="reading" scope="col"><a href="{getUrl('sort_index','readed_count','order_type',$order_type)}">{$lang->readed_count}<!--@if($sort_index=='readed_count')--><img src="./images/{$module_info->colorset}/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th>
|
||||
|
||||
<th class="recommend" scope="col"><a href="{getUrl('sort_index','voted_count','order_type',$order_type)}">{$lang->voted_count}<!--@if($sort_index=='voted_count')--><img src="./images/{$module_info->colorset}/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th>
|
||||
|
||||
<th scope="col" class="date"><a href="{getUrl('sort_index','regdate','order_type',$order_type)}">{$lang->date}<!--@if($sort_index=='regdate')--><img src="./images/{$module_info->colorset}/{$order_icon}" alt="" width="5" height="3" class="sort" /><!--@end--></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
|
@ -120,7 +130,7 @@
|
|||
<div class="buttonRight">
|
||||
|
||||
<ul>
|
||||
<li><a href="{getUrl('act','','document_srl','')}" class="buttonTypeA"><img src="./images/blank.gif" alt="" class="leftCap" /><img src="./images/{$module_info->colorset}/iconList.gif" alt="" width="12" height="13" class="icon" />{$lang->cmd_list}<img src="./images/blank.gif" alt="" class="rightCap" /></a></li>
|
||||
<li><a href="{getUrl('','mid',$mid,'page',$page,'document_srl','')}" class="buttonTypeA"><img src="./images/blank.gif" alt="" class="leftCap" /><img src="./images/{$module_info->colorset}/iconList.gif" alt="" width="12" height="13" class="icon" />{$lang->cmd_list}<img src="./images/blank.gif" alt="" class="rightCap" /></a></li>
|
||||
|
||||
<!--@if($grant->write_document)-->
|
||||
<li><a href="{getUrl('act','dispBoardWrite','document_srl','')}" class="buttonTypeA"><img src="./images/blank.gif" alt="" class="leftCap" /><img src="./images/{$module_info->colorset}/iconWrite.gif" width="12" height="11" class="icon" alt="" />{$lang->cmd_write}<img src="./images/blank.gif" alt="" class="rightCap" /></a></li>
|
||||
|
|
|
|||
|
|
@ -121,7 +121,8 @@
|
|||
**/
|
||||
function getDocumentList($obj, $get_extra_info = false) {
|
||||
|
||||
if(!in_array($obj->sort_index, array('list_order', 'update_order'))) $obj->sort_index = 'list_order';
|
||||
if(!in_array($obj->sort_index, array('list_order','regdate','update_order','readed_count','voted_count'))) $obj->sort_index = 'list_order'; ///< 소팅 값
|
||||
if(!in_array($obj->order_type, array('desc','asc'))) $obj->order_type = 'asc';
|
||||
|
||||
// module_srl 대신 mid가 넘어왔을 경우는 직접 module_srl을 구해줌
|
||||
if($obj->mid) {
|
||||
|
|
@ -137,6 +138,7 @@
|
|||
$args->category_srl = $obj->category_srl?$obj->category_srl:'';
|
||||
|
||||
$args->sort_index = $obj->sort_index;
|
||||
$args->order_type = $obj->order_type;
|
||||
$args->page = $obj->page?$obj->page:1;
|
||||
$args->list_count = $obj->list_count?$obj->list_count:20;
|
||||
$args->page_count = $obj->page_count?$obj->page_count:10;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
<index var="sort_index" default="list_order" order="order_type" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue