게시판 분류에 color 속성 추가 (color picker는 일괄 처리 예정)

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5081 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2008-12-15 08:12:00 +00:00
parent 1b51eb6c7d
commit 64ec631bba
18 changed files with 80 additions and 23 deletions

View file

@ -1,6 +1,6 @@
<?php
/**
* @class document
* @class document
* @author zero (zero@nzeo.com)
* @brief document 모듈의 high 클래스
**/
@ -85,7 +85,7 @@
// 2007. 11. 20 게시글에 module_srl + is_notice 복합인덱스 만들기
if(!$oDB->isIndexExists("documents","idx_module_notice")) return true;
// 2008. 02. 18 게시글에 module_srl + document_srl 복합인덱스 만들기 (manian님 확인)
if(!$oDB->isIndexExists("documents","idx_module_document_srl")) return true;
@ -94,10 +94,14 @@
**/
if(!$oDB->isColumnExists("documents","extra_vars")) return true;
// 2008. 04. 23 blamed count 컬럼 추가
if(!$oDB->isColumnExists("documents", "blamed_count")) return true;
// 2008. 04. 23 blamed count 컬럼 추가
if(!$oDB->isColumnExists("documents", "blamed_count")) return true;
if(!$oDB->isIndexExists("documents","idx_module_blamed_count")) return true;
if(!$oDB->isColumnExists("document_voted_log", "point")) return true;
if(!$oDB->isColumnExists("document_voted_log", "point")) return true;
// 2008-12-15 문서 분류에 color를 추가
if(!$oDB->isColumnExists("document_categories", "color")) return true;
return false;
}
@ -149,19 +153,19 @@
/**
* 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가, 게시글 관리 action 추가
**/
if(!$oModuleModel->getActionForward('dispDocumentAdminConfig'))
if(!$oModuleModel->getActionForward('dispDocumentAdminConfig'))
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminConfig');
if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument'))
if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument'))
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminManageDocument');
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after'))
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after'))
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
/**
* 2007. 10. 18 : 관리자 페이지의 신고된 목록 보기 action 추가
**/
if(!$oModuleModel->getActionForward('dispDocumentAdminDeclared'))
if(!$oModuleModel->getActionForward('dispDocumentAdminDeclared'))
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminDeclared');
// 2007. 10. 25 문서 분류에 parent_srl, expand를 추가
@ -184,7 +188,7 @@
// 2008. 04. 23 blamed count 컬럼 추가
if(!$oDB->isColumnExists("documents", "blamed_count")) {
$oDB->addColumn('documents', 'blamed_count', 'number', 11, 0, true);
$oDB->addColumn('documents', 'blamed_count', 'number', 11, 0, true);
$oDB->addIndex('documents', 'idx_blamed_count', array('blamed_count'));
}
@ -192,10 +196,15 @@
$oDB->addIndex('documents', 'idx_module_blamed_count', array('module_srl', 'blamed_count'));
}
if(!$oDB->isColumnExists("document_voted_log", "point"))
$oDB->addColumn('document_voted_log', 'point', 'number', 11, 0, true);
return new Object(0,'success_updated');
}
if(!$oDB->isColumnExists("document_voted_log", "point"))
$oDB->addColumn('document_voted_log', 'point', 'number', 11, 0, true);
if(!$oDB->isColumnExists("document_categories","color")) $oDB->addColumn('document_categories',"color","char",7);
return new Object(0,'success_updated');
}
/**
* @brief 캐시 파일 재생성

View file

@ -880,12 +880,13 @@
$mid = $node->mid;
$module_srl = $node->module_srl;
$parent_srl = $node->parent_srl;
$color = $node->color;
// node->group_srls값이 있으면
if($group_srls) $group_check_code = sprintf('($is_admin==true||(is_array($group_srls)&&count(array_intersect($group_srls, array(%s)))))',$group_srls);
else $group_check_code = "true";
$attribute = sprintf(
'mid="%s" module_srl="%d" node_srl="%d" parent_srl="%d" category_srl="%d" text="<?php echo (%s?"%s":"")?>" url="%s" expand="%s" document_count="%d" ',
'mid="%s" module_srl="%d" node_srl="%d" parent_srl="%d" category_srl="%d" text="<?php echo (%s?"%s":"")?>" url="%s" expand="%s" color="%s" document_count="%d" ',
$mid,
$module_srl,
$category_srl,
@ -895,6 +896,7 @@
$title,
getUrl('','mid',$node->mid,'category',$category_srl),
$expand,
$color,
$node->document_count
);
@ -939,7 +941,7 @@
// 속성을 생성한다 ( category_srl_list를 이용해서 선택된 메뉴의 노드에 속하는지를 검사한다. 꽁수지만 빠르고 강력하다고 생각;;)
$attribute = sprintf(
'"mid" => "%s", "module_srl" => "%d","node_srl"=>"%s","category_srl"=>"%s","parent_srl"=>"%s","text"=>$_category_title[%d],"selected"=>(in_array(Context::get("category"),array(%s))?1:0),"expand"=>"%s", "list"=>array(%s),"document_count"=>"%d","grant"=>%s?true:false',
'"mid" => "%s", "module_srl" => "%d","node_srl"=>"%s","category_srl"=>"%s","parent_srl"=>"%s","text"=>$_category_title[%d],"selected"=>(in_array(Context::get("category"),array(%s))?1:0),"expand"=>"%s","color"=>"%s", "list"=>array(%s),"document_count"=>"%d","grant"=>%s?true:false',
$node->mid,
$node->module_srl,
$node->category_srl,
@ -948,6 +950,7 @@
$node->category_srl,
$selected,
$expand,
$node->color,
$child_buff,
$node->document_count,
$group_check_code

View file

@ -513,7 +513,6 @@
$this->_arrangeCategory($document_category, $menu->list, 0);
$this->category_list[$module_srl] = $document_category;
}
return $this->category_list[$module_srl];
}
@ -532,6 +531,7 @@
$obj->parent_srl = $val['parent_srl'];
$obj->title = $obj->text = $val['text'];
$obj->expand = $val['expand']=='Y'?true:false;
$obj->color = $val['color'];
$obj->document_count = $val['document_count'];
$obj->depth = $depth;
$obj->child_count = 0;

View file

@ -13,5 +13,6 @@
<column name="group_srls" var="group_srls" />
<column name="last_update" var="last_update" default="curdate()" />
<column name="list_order" var="list_order" default="0" />
<column name="color" var="color" />
</columns>
</query>

View file

@ -9,6 +9,7 @@
<column name="expand" var="expand" />
<column name="parent_srl" var="parent_srl" filter="number" />
<column name="group_srls" var="group_srls" />
<column name="color" var="color" />
</columns>
<conditions>
<condition operation="equal" column="category_srl" var="category_srl" filter="number" notnull="notnull" />