1. layout에 기존의 blog모듈의 xe_blog 레이아웃 스킨을 적용

2. 레이아웃 편집/수정시 모듈의 관리권한을 그대로 적용되도록 수정


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3556 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-01-21 11:44:53 +00:00
parent da08ff2262
commit bfbf140d7c
60 changed files with 542 additions and 10 deletions

View file

@ -44,7 +44,7 @@ Jeong, Chan Myeong 070601~070630
.blogNotice .item .replyAndTrackback { color:#AAAAAA; font-size:.9em; }
/* boardRead */
.viewDocument { border:1px solid #e0e1db; padding:10px; border-bottom:2px solid #AAAAAA; margin-bottom:20px; }
.viewDocument { border-bottom:2px solid #AAAAAA; margin-bottom:20px; }
.boardRead { margin:0 0 10px 0; }
.boardRead .titleAndUser { overflow:hidden; border-bottom:1px solid #e0e1db; }
@ -113,7 +113,7 @@ Jeong, Chan Myeong 070601~070630
.replyBox .voted { float:left; font-size:.9em; color:#AAAAAA; margin:0 .3em .5em 1em;}
.replyBox .date { float:right; font:.8em Tahoma; color:#cccccc; margin:.3em 0 .5em 0;}
.replyBox .replyOption { float:right; white-space:nowrap; margin-left:.2em;}
.replyBox .replyOption { height:20px; float:right; white-space:nowrap; margin-left:.2em;}
.replyBox .replyOption img { vertical-align:middle;}
.replyBox .replyContent { clear:left; }
@ -243,7 +243,7 @@ Jeong, Chan Myeong 070601~070630
.pageNavigation a.goToFirst img, .pageNavigation a.goToLast img { margin-bottom:2px;}
/* Search Form */
.boardSearch { margin-left:auto; margin-right:auto; clear:both; text-align:center;}
.boardSearch { margin-top:30px; margin-left:auto; margin-right:auto; clear:both; text-align:center;}
.boardSearch select { height:20px; }
.boardSearch input { height:18px; }

View file

@ -49,7 +49,8 @@
<!-- 상단 텍스트 출력 -->
{$module_info->header_text}
<!-- 스킨의 제목/간단한 설명 출력 -->
<!-- 블로그 스킨이 아닐 경우 스킨의 제목/간단한 설명 출력 -->
<!--@if($module_info->default_style != 'blog')-->
<!--@if($module_info->title)-->
<div class="boardHeader">
<div class="boardHeaderBorder">
@ -116,3 +117,4 @@
</ul>
</div>
<!--@end-->

View file

@ -31,7 +31,9 @@
<!--@if($grant->is_admin)-->
<a href="{getUrl('','module','document','act','dispDocumentAdminManageDocument')}" onclick="popopen(this.href,'manageDocument'); return false;" class="button"><span>{$lang->cmd_manage_document}</span></a>
<!--@end-->
<!--@if($module_info->default_style != 'blog')-->
<a href="{getUrl('','mid',$mid,'page',$page,'document_srl','','listStyle',$listStyle)}" class="button"><span>{$lang->cmd_list}</span></a>
<!--@end-->
</div>
<div class="rightButtonBox">
@ -54,7 +56,7 @@
<!-- 검색 -->
<!--@if($grant->view)-->
<!--@if($grant->view && $module_info->default_style != 'blog')-->
<div class="boardSearch">
<form action="{getUrl()}" method="get" onsubmit="return procFilter(this, search)" id="fo_search">
<input type="hidden" name="mid" value="{$mid}" />

View file

@ -135,7 +135,9 @@
<!-- 목록, 수정/삭제 버튼 -->
<div class="contentButton">
<!--@if($module_info->default_style != 'blog')-->
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
<!--@end-->
<!--@if($oDocument->isEditable())-->
<a href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl)}" class="button"><span>{$lang->cmd_modify}</span></a>
<a href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl)}" class="button"><span>{$lang->cmd_delete}</span></a>

View file

@ -66,16 +66,27 @@
// act의 값에 따라서 관리 권한 체크
switch($args->act) {
case 'procLayoutAdminUpdate' :
case 'dispLayoutAdminPreview' :
case 'procLayoutAdminCodeReset' :
case 'procLayoutAdminCodeUpdate' :
// 레이아웃 정보에 할당된 srl이 없으면 패스
if(!$args->layout_srl) return false;
// 모듈중 레이아웃이 해당 srl에 연결될 것이 있는지 확인
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($args->layout_srl);
if(!$module_info) return false;
$module_list = $oModuleModel->getModulesInfoByLayout($args->layout_srl);
$module_count = count($module_list);
if($oModuleModel->isModuleAdmin($module_info, $logged_info)) return true;
$is_granted = false;
for($i=0;$i<$module_count;$i++) {
$module_info = $module_list[$i];
if($oModuleModel->isModuleAdmin($module_list[$i],$logged_info)) {
$is_granted = true;
break;
}
}
return $is_granted;
break;
}

View file

@ -52,6 +52,23 @@
return $this->arrangeModuleInfo($output->data);
}
/**
* @brief layout_srl에 해당하는 모듈의 정보를 구함
**/
function getModulesInfoByLayout($layout_srl) {
// 데이터를 가져옴
$args->layout_srl = $layout_srl;
$output = executeQueryArray('module.getModulesByLayout', $args);
$count = count($output->data);
$modules = array();
for($i=0;$i<$count;$i++) {
$modules[] = $this->arrangeModuleInfo($output->data[$i]);
}
return $modules;
}
/**
* @brief 여러개의 module_srl에 해당하는 모듈의 정보를 구함
**/

View file

@ -0,0 +1,11 @@
<query id="getModulesByLayout" action="select">
<tables>
<table name="modules" />
</tables>
<columns>
<column name="*" />
</columns>
<conditions>
<condition operation="equal" column="layout_srl" var="layout_srl" notnull="notnull" />
</conditions>
</query>