diff --git a/modules/layout/conf/module.xml b/modules/layout/conf/module.xml
index c2ecf50d5..8d627421a 100644
--- a/modules/layout/conf/module.xml
+++ b/modules/layout/conf/module.xml
@@ -6,6 +6,7 @@
+
diff --git a/modules/layout/lang/ko.lang.php b/modules/layout/lang/ko.lang.php
index e65b984cf..38c6ef109 100644
--- a/modules/layout/lang/ko.lang.php
+++ b/modules/layout/lang/ko.lang.php
@@ -33,6 +33,7 @@
$lang->cmd_remake_cache = "캐시파일 재생성";
$lang->cmd_move_to_installed_list = "생성된 목록 보기";
$lang->cmd_enable_move_menu = "메뉴 옮기기";
+ $lang->cmd_search_mid = "mid 찾기";
$lang->about_downloaded_layouts = "다운로드 되어 있는 레이아웃 목록";
$lang->about_title = '모듈에 연결시 쉽게 구분할 수 있는 제목을 입력해주세요';
diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php
index a7ce0f6ae..f98714eee 100644
--- a/modules/layout/layout.model.php
+++ b/modules/layout/layout.model.php
@@ -230,6 +230,7 @@
$node = $output->data;
if($node->group_srls) $node->group_srls = explode(',',$node->group_srls);
+ else $node->group_srls = array();
return $node;
}
}
diff --git a/modules/layout/layout.view.php b/modules/layout/layout.view.php
index d3047c889..9a84aea91 100644
--- a/modules/layout/layout.view.php
+++ b/modules/layout/layout.view.php
@@ -73,6 +73,21 @@
$this->setTemplateFile('layout_detail_info');
}
+ /**
+ * @brief 레이아웃에서 선택할 수 있는 mid목록을 보여줌
+ **/
+ function dispLayoutAdminMidList() {
+ // mid 목록을 구해옴
+ $oModuleModel = &getModel('module');
+ $mid_list = $oModuleModel->getMidList();
+ Context::set('mid_list', $mid_list);
+
+ // 레이아웃을 팝업으로 지정
+ $this->setLayoutFile('popup_layout');
+
+ // 템플릿 파일 지정
+ $this->setTemplateFile('mid_list');
+ }
/**
* @brief 레이아웃 목록을 보여줌
@@ -85,7 +100,5 @@
$this->setTemplateFile('downloaded_layout_list');
}
-
-
}
?>
diff --git a/modules/layout/tpl/js/layout_admin.js b/modules/layout/tpl/js/layout_admin.js
index 148aec04d..0cea141a2 100644
--- a/modules/layout/tpl/js/layout_admin.js
+++ b/modules/layout/tpl/js/layout_admin.js
@@ -127,3 +127,20 @@ function doReloadTreeMenu(menu_id) {
var response_tags = new Array('error','message','menu_id', 'xml_file', 'menu_title');
exec_xml('layout', 'procLayoutAdminMakeXmlFile', params, completeInsertLayoutMenu, response_tags, params);
}
+
+/* 레이아웃의 메뉴에 mid 추가 */
+function doInsertMid(mid, menu_id) {
+ if(!opener) {
+ window.close();
+ return;
+ }
+
+ var fo_obj = opener.xGetElementById("fo_"+menu_id);
+ if(!fo_obj) {
+ window.close();
+ return;
+ }
+
+ fo_obj.menu_url.value = "mid="+mid;
+ window.close();
+}
diff --git a/modules/layout/tpl/layout_menu_info.html b/modules/layout/tpl/layout_menu_info.html
index 7334aabc5..674fc08ab 100644
--- a/modules/layout/tpl/layout_menu_info.html
+++ b/modules/layout/tpl/layout_menu_info.html
@@ -19,7 +19,7 @@
| {$lang->menu_url} |
- |
+ |
| {$lang->about_menu_url} |
diff --git a/modules/layout/tpl/mid_list.html b/modules/layout/tpl/mid_list.html
new file mode 100644
index 000000000..4f53556d0
--- /dev/null
+++ b/modules/layout/tpl/mid_list.html
@@ -0,0 +1,19 @@
+
+
+
+
+ | {$lang->mid} |
+ {$lang->title} |
+ {$lang->cmd_select} |
+
+
+
+
+ | {$key} |
+ {$val->browser_title} |
+ {$lang->cmd_select} |
+
+
+
+
+