git-svn-id: http://xe-core.googlecode.com/svn/trunk@1351 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-04-26 08:24:38 +00:00
parent ed9300b6d1
commit caf00ee52d
7 changed files with 63 additions and 21 deletions

View file

@ -361,7 +361,7 @@
/** /**
* @brief 월별 보관현황을 가져옴 * @brief 월별 보관현황을 가져옴
**/ **/
function getgetMonthlyArchivedList($obj) { function getMonthlyArchivedList($obj) {
if($obj->mid) { if($obj->mid) {
$oModuleModel = &getModel('module'); $oModuleModel = &getModel('module');
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid); $obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
@ -371,7 +371,6 @@
// 넘어온 module_srl은 array일 수도 있기에 array인지를 체크 // 넘어온 module_srl은 array일 수도 있기에 array인지를 체크
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl); if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl; else $args->module_srl = $obj->module_srl;
$args->list_count = $obj->list_count;
$output = executeQuery('document.getMonthlyArchivedList', $args); $output = executeQuery('document.getMonthlyArchivedList', $args);
if(!$output->toBool()) return $output; if(!$output->toBool()) return $output;
@ -380,5 +379,28 @@
return $output; return $output;
} }
/**
* @brief 특정달의 일별 현황을 가져옴
**/
function getDailyArchivedList($obj) {
if($obj->mid) {
$oModuleModel = &getModel('module');
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
unset($obj->mid);
}
// 넘어온 module_srl은 array일 수도 있기에 array인지를 체크
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
$args->regdate = $obj->regdate;
$output = executeQuery('document.getDailyArchivedList', $args);
if(!$output->toBool()) return $output;
if(!is_array($output->data)) $output->data = array($output->data);
return $output;
}
} }
?> ?>

View file

@ -0,0 +1,16 @@
<query id="getMonthlyArchivedList" action="select">
<tables>
<table name="documents" />
</tables>
<columns>
<column name="substr(regdate,1,8)" alias="month"/>
<column name="count(*)" alias="count" />
</columns>
<conditions>
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
<condition operation="like_prefix" column="regdate" var="regdate" pipe="and" />
</conditions>
<groups>
<group column="substr(regdate,1,8)" />
</groups>
</query>

View file

@ -24,7 +24,7 @@
// document 모듈의 model 객체를 받아서 getMonthlyArchivedList() method를 실행 // document 모듈의 model 객체를 받아서 getMonthlyArchivedList() method를 실행
$oDocumentModel = &getModel('document'); $oDocumentModel = &getModel('document');
$output = $oDocumentModel->getgetMonthlyArchivedList($obj); $output = $oDocumentModel->getMonthlyArchivedList($obj);
// 템플릿 파일에서 사용할 변수들을 세팅 // 템플릿 파일에서 사용할 변수들을 세팅
if(count($mid_list)==1) $plugin_info->module_name = $mid_list[0]; if(count($mid_list)==1) $plugin_info->module_name = $mid_list[0];

View file

@ -19,12 +19,16 @@
$title = $args->title; $title = $args->title;
$mid_list = explode(",",$args->mid_list); $mid_list = explode(",",$args->mid_list);
// DocumentModel::getMonthlyArchivedList()를 이용하기 위한 변수 정리 // DocumentModel::getDailyArchivedList()를 이용하기 위한 변수 정리
$obj->mid = $mid_list; $obj->mid = $mid_list;
$obj->regdate = date("Ym");
// document 모듈의 model 객체를 받아서 getMonthlyArchivedList() method를 실행 // document 모듈의 model 객체를 받아서 getDailyArchivedList() method를 실행
$oDocumentModel = &getModel('document'); $oDocumentModel = &getModel('document');
$output = $oDocumentModel->getgetMonthlyArchivedList($obj); $output = $oDocumentModel->getDailyArchivedList($obj);
print "<xmp>";
print_r($output);
print "</xmp>";
// 템플릿 파일에서 사용할 변수들을 세팅 // 템플릿 파일에서 사용할 변수들을 세팅
if(count($mid_list)==1) $plugin_info->module_name = $mid_list[0]; if(count($mid_list)==1) $plugin_info->module_name = $mid_list[0];

View file

@ -4,8 +4,8 @@
<!--%import("normal/style.css")--> <!--%import("normal/style.css")-->
<!--@end--> <!--@end-->
<div class="archive_list_{$colorset}" style="width:100%"> <div class="calendar_{$colorset}" style="width:100%">
<div class="archive_list_box"> <div class="calendar_box">
<!--@if($plugin_info->title)--> <!--@if($plugin_info->title)-->
<div class="title_box"> <div class="title_box">
@ -13,7 +13,7 @@
</div> </div>
<!--@end--> <!--@end-->
<div class="archive_box"> <div class="archive_box">
<!--@foreach($plugin_info->archive_list as $val)--> <!--@foreach($plugin_info->calendar as $val)-->
<div class="archive"> <div class="archive">
<a href="{getUrl('mid',$mid,'search_target','regdate','search_keyword',$val->month)}">{zdate($val->month,'Y. m')} ({$val->count})</a> <a href="{getUrl('mid',$mid,'search_target','regdate','search_keyword',$val->month)}">{zdate($val->month,'Y. m')} ({$val->count})</a>
</div> </div>

View file

@ -1,51 +1,51 @@
.archive_list_normal { .calendar_normal {
} }
.archive_list_normal .archive_list_box { .calendar_normal .calendar_box {
margin-bottom:5px; margin-bottom:5px;
} }
.archive_list_normal .archive_list_box .title_box { .calendar_normal .calendar_box .title_box {
padding:5px; padding:5px;
height:14px; height:14px;
overflow:hidden; overflow:hidden;
color:#888888; color:#888888;
} }
.archive_list_normal .archive_list_box .title_box .title { .calendar_normal .calendar_box .title_box .title {
font-weight:bold; font-weight:bold;
height:14px; height:14px;
float:left; float:left;
} }
.archive_list_normal .archive_list_box .archive_box { .calendar_normal .calendar_box .archive_box {
padding:5px; padding:5px;
clear:both; clear:both;
border:3px solid #EEEEEE; border:3px solid #EEEEEE;
overflow:hidden; overflow:hidden;
} }
.archive_list_normal .archive_list_box .archive { .calendar_normal .calendar_box .archive {
float:left; float:left;
margin-right:5px; margin-right:5px;
color:#AAAAAA; color:#AAAAAA;
} }
.archive_list_normal .archive_list_box .archive A { .calendar_normal .calendar_box .archive A {
text-decoration:none; text-decoration:none;
color:#555555; color:#555555;
} }
.archive_list_normal .archive_list_box .archive A:hover { .calendar_normal .calendar_box .archive A:hover {
text-decoration:underline; text-decoration:underline;
color:#000000; color:#000000;
} }
.archive_list_normal .archive_list_box .archive A:visited { .calendar_normal .calendar_box .archive A:visited {
color:#AAAAAA; color:#AAAAAA;
} }
.archive_list_normal .archive_list_box .archive .archive A { .calendar_normal .calendar_box .archive .archive A {
font-size:7pt; font-size:7pt;
font-family:tahoma; font-family:tahoma;
color:#AAAAAA; color:#AAAAAA;

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<skin> <skin>
<title xml:lang="ko">월별 보관 현황 목록 출력</title> <title xml:lang="ko">달력 및 글 현황 표시</title>
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28"> <maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name> <name xml:lang="ko">제로</name>
<description xml:lang="ko">월별 보관 현황 목록을 출력합니다.</description> <description xml:lang="ko">calendar플러그인의 블로그에 어울리는 기본 스킨입니다.</description>
</maker> </maker>
<colorset> <colorset>
<color name="normal"> <color name="normal">