mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
모듈 선택기능 추가 (위젯의 단일/다수 위젯 선택, 첵크된 게시글 이동/복사시) 사용되며 virtualSite외의 사이트들도 검색후 선택이 가능하도록 개선
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5298 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3345d21c4e
commit
906bb46d19
83 changed files with 970 additions and 543 deletions
|
|
@ -97,5 +97,82 @@
|
|||
$this->setTemplateFile('copy_module');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 선택기
|
||||
**/
|
||||
function dispModuleAdminSelectList() {
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// virtual site의 개수를 추출
|
||||
$output = executeQuery('module.getSiteCount');
|
||||
$site_count = $output->data->count;
|
||||
Context::set('site_count', $site_count);
|
||||
|
||||
// 사이트 검색어 변수 설정
|
||||
$site_keyword = Context::get('site_keyword');
|
||||
|
||||
// 사이트 검색어가 없으면 현재 가상 사이트의 정보를 설정
|
||||
$args = null;
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') {
|
||||
$query_id = 'module.getSiteModules';
|
||||
$module_category_exists = false;
|
||||
if(!$site_keyword) {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
if($site_module_info && $logged_info->is_admin != 'Y') {
|
||||
$site_keyword = $site_module_info->domain;
|
||||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
Context::set('site_keyword', $site_keyword);
|
||||
} else {
|
||||
$query_id = 'module.getDefaultModules';
|
||||
$module_category_exists = true;
|
||||
}
|
||||
// 사이트 검색어가 있으면 해당 사이트(들)의 정보를 추출
|
||||
} else {
|
||||
$args->site_keyword = $site_keyword;
|
||||
}
|
||||
} else {
|
||||
$query_id = 'module.getSiteModules';
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
}
|
||||
|
||||
// 지정된 사이트(혹은 전체)의 module 목록을 구함
|
||||
$output = executeQueryArray($query_id, $args);
|
||||
$category_list = $mid_list = array();
|
||||
if(count($output->data)) {
|
||||
foreach($output->data as $key => $val) {
|
||||
$module = trim($val->module);
|
||||
if(!$module) continue;
|
||||
|
||||
$category = $val->category;
|
||||
$obj = null;
|
||||
$obj->module_srl = $val->module_srl;
|
||||
$obj->browser_title = $val->browser_title;
|
||||
$mid_list[$module]->list[$category][$val->mid] = $obj;
|
||||
}
|
||||
}
|
||||
|
||||
$selected_module = Context::get('selected_module');
|
||||
if(count($mid_list)) {
|
||||
foreach($mid_list as $module => $val) {
|
||||
if(!$selected_module) $selected_module = $module;
|
||||
$xml_info = $oModuleModel->getModuleInfoXml($module);
|
||||
$mid_list[$module]->title = $xml_info->title;
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('mid_list', $mid_list);
|
||||
Context::set('selected_module', $selected_module);
|
||||
Context::set('selected_mids', $mid_list[$selected_module]->list);
|
||||
Context::set('module_category_exists', $module_category_exists);
|
||||
|
||||
// 레이아웃을 팝업으로 지정
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('module_selector');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue