mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Merge pull request #1624 from shydah/pr/manage-document-popup
Resolve #1595 - 게시물 관리 사용 시 게시판이 기본 선택되도록 개선
This commit is contained in:
commit
80afa6720c
4 changed files with 38 additions and 6 deletions
|
|
@ -132,7 +132,7 @@
|
|||
</div>
|
||||
<div class="btnArea">
|
||||
<a href="{getUrl('act','dispBoardWrite','document_srl','')}" class="btn">{$lang->cmd_write}</a>
|
||||
<a cond="$grant->manager" href="{getUrl('','module','document','act','dispDocumentManageDocument')}" class="btn" onclick="popopen(this.href,'manageDocument'); return false;">{$lang->cmd_manage_document}</a>
|
||||
<a cond="$grant->manager" href="{getUrl('','mid',$mid,'act','dispDocumentManageDocument')}" class="btn" onclick="popopen(this.href,'manageDocument'); return false;">{$lang->cmd_manage_document}</a>
|
||||
</div>
|
||||
<button type="button" class="bsToggle" title="{$lang->cmd_search}">{$lang->cmd_search}</button>
|
||||
<form cond="$grant->view" action="{getUrl()}" method="get" onsubmit="return procFilter(this, search)" id="board_search" class="board_search" no-error-return-url="true">
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@
|
|||
<a href="{getUrl('act','dispBoardWrite','document_srl','')}" class="btn"><i class="xi-pen"></i> {$lang->cmd_write}</a>
|
||||
<a href="{getUrl('act','dispBoardTagList')}" class="btn" title="{$lang->tag}"><i class="xi-tag"></i> {$lang->tag}</a>
|
||||
<a cond="$grant->manager" class="btn" href="{getUrl('act','dispBoardAdminBoardInfo')}" title="{$lang->cmd_setup}"><i class="xi-cog"></i> {$lang->cmd_setup}</a>
|
||||
<a cond="$grant->manager" href="{getUrl('','module','document','act','dispDocumentManageDocument')}" class="btn" onclick="popopen(this.href,'manageDocument'); return false;">{$lang->cmd_manage_document}</a>
|
||||
<a cond="$grant->manager" href="{getUrl('','mid',$mid,'act','dispDocumentManageDocument')}" class="btn" onclick="popopen(this.href,'manageDocument'); return false;">{$lang->cmd_manage_document}</a>
|
||||
</div>
|
||||
|
||||
<form cond="$grant->view" action="{getUrl()}" method="get" onsubmit="return procFilter(this, search)" id="board_search" class="board_search" no-error-return-url="true">
|
||||
|
|
|
|||
|
|
@ -104,11 +104,40 @@ class documentView extends document
|
|||
Context::set('document_list', array());
|
||||
}
|
||||
|
||||
// Set target module info
|
||||
$target_mid = Context::getRequestVars()->mid ?? '';
|
||||
$module_srl = intval(Context::get('module_srl'));
|
||||
Context::set('module_srl',$module_srl);
|
||||
$module_info = ModuleModel::getModuleInfoByModuleSrl($module_srl);
|
||||
Context::set('mid',$module_info->mid);
|
||||
Context::set('browser_title',$module_info->browser_title);
|
||||
|
||||
// if target mid is provided
|
||||
if($target_mid && $target_mid === Context::get('mid'))
|
||||
{
|
||||
$module_info = ModuleModel::getModuleInfoByMid($target_mid);
|
||||
$module_srl = $module_info ? $module_info->module_srl : 0;
|
||||
}
|
||||
// if module_srl is provided instead of target_mid (legacy)
|
||||
elseif($module_srl > 0)
|
||||
{
|
||||
$module_info = ModuleModel::getModuleInfoByModuleSrl($module_srl);
|
||||
$module_srl = $module_info ? $module_info->module_srl : 0;
|
||||
}
|
||||
// if no module info is provided
|
||||
else
|
||||
{
|
||||
// set module_srl if all documents has one common module_srl
|
||||
$document_module_srl_list = array_unique(array_map(function($document) {
|
||||
return $document->get('module_srl');
|
||||
}, $document_list));
|
||||
if(count($document_module_srl_list) == 1)
|
||||
{
|
||||
$module_srl = array_first($document_module_srl_list);
|
||||
}
|
||||
$module_info = ModuleModel::getModuleInfoByModuleSrl($module_srl);
|
||||
$module_srl = $module_info ? $module_info->module_srl : 0;
|
||||
}
|
||||
|
||||
Context::set('module_srl', $module_srl);
|
||||
Context::set('mid', $module_info ? $module_info->mid : '');
|
||||
Context::set('browser_title', $module_info ? $module_info->browser_title : '');
|
||||
|
||||
// Select Pop-up layout
|
||||
$this->setLayoutPath('./common/tpl');
|
||||
|
|
|
|||
|
|
@ -71,5 +71,8 @@ jQuery(function($){
|
|||
message_content_area.prop("disabled", false);
|
||||
}
|
||||
});
|
||||
<!--@if($module_srl > 0)-->
|
||||
doGetCategoryFromModule({$module_srl});
|
||||
<!--@end-->
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue