mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Clean up module selector popup dialog
- 모듈 선택 팝업창에서 가상 사이트 검색 기능 삭제 - 게시판 모듈을 기본 선택 및 검색하도록 변경 (전에는 알파벳순으로 정렬되어 출석부 등 문서 이동에 적절하지 않은 모듈이 먼저 노출되는 불편이 있었음)
This commit is contained in:
parent
f58be6185e
commit
26b494f1e5
2 changed files with 6 additions and 40 deletions
|
|
@ -43,30 +43,9 @@ class moduleView extends module
|
|||
*/
|
||||
function dispModuleSelectList()
|
||||
{
|
||||
$args = new stdClass;
|
||||
|
||||
if(Context::get('logged_info')->is_admin === 'Y')
|
||||
{
|
||||
// If site keyword exists, extract information from the sites
|
||||
if($site_keyword = Context::get('site_keyword'))
|
||||
{
|
||||
$args->site_keyword = $site_keyword;
|
||||
}
|
||||
// If there is no site keyword, use as information of the current virtual site
|
||||
else
|
||||
{
|
||||
$args->site_srl = 0;
|
||||
$query_id = 'module.getDefaultModules';
|
||||
}
|
||||
|
||||
Context::set('site_count', executeQuery('module.getSiteCount')->data->count);
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->site_srl = (int) Context::get('site_module_info')->site_srl;
|
||||
}
|
||||
|
||||
// Get a list of modules at the site
|
||||
$args = new stdClass;
|
||||
$args->site_srl = intval(Context::get('site_module_info')->site_srl);
|
||||
$output = executeQueryArray(isset($query_id) ? $query_id : 'module.getSiteModules', $args);
|
||||
|
||||
$mid_list = array();
|
||||
|
|
@ -103,8 +82,8 @@ class moduleView extends module
|
|||
}
|
||||
else
|
||||
{
|
||||
Context::set('selected_mids', array_first($mid_list)->list);
|
||||
Context::set('selected_module', array_first_key($mid_list));
|
||||
Context::set('selected_mids', $mid_list['board']->list);
|
||||
Context::set('selected_module', 'board');
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -2,26 +2,13 @@
|
|||
<div class="x_modal-header">
|
||||
<h1>{$lang->module_selector}</h1>
|
||||
</div>
|
||||
<form action="./" method="post" class="x_modal-body x_form-horizontal" style="max-height:none">
|
||||
<form action="./" method="get" class="x_modal-body x_form-horizontal" no-error-return-url="true" style="max-height:none">
|
||||
<input type="hidden" name="module" value="module" />
|
||||
<input type="hidden" name="act" value="dispModuleSelectList" />
|
||||
<input type="hidden" name="id" value="{$id}" />
|
||||
<input type="hidden" name="type" value="{$type}" />
|
||||
<input type="hidden" name="vid" value="{$vid}" />
|
||||
|
||||
<div class="x_control-group" cond="$logged_info->is_admin === 'Y' && $site_count">
|
||||
<label class="x_control-label" for="site_keyword">{$lang->virtual_site}</label>
|
||||
<div class="x_controls">
|
||||
<span class="x_input-append">
|
||||
<input type="text" name="site_keyword" id="site_keyword" value="{$site_keyword}" />
|
||||
<input type="submit" value="{$lang->cmd_search}" class="x_btn" />
|
||||
</span>
|
||||
<p class="x_help-block">{$lang->about_search_virtual_site}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="selected_module">{$lang->module}</label>
|
||||
<div class="x_controls">
|
||||
<select name="selected_module" id="selected_module">
|
||||
<option loop="$mid_list => $key,$val" value="{$key}" selected="selected"|cond="$key == $selected_module">{$val->title}</option>
|
||||
|
|
@ -43,7 +30,7 @@
|
|||
<tbody>
|
||||
<tr loop="$list => $mid_name,$module_info">
|
||||
<td>{$mid_name}</td>
|
||||
<td>{$module_info->browser_title|autoescape}</td>
|
||||
<td>{$module_info->browser_title}</td>
|
||||
<td><a href="#" onclick="insertModule('{$id|escapejs}', {$module_info->module_srl}, '{$mid_name|escapejs}', '{$module_info->browser_title|escapejs}', {$type=='single'?'false':'true'}); return false;" class="button green"><span>{$type=='single'?$lang->cmd_select:$lang->cmd_insert}</span></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue