Issue 2380: Admin UI Refactoring - Advanced - Layouts

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11661 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-10-11 03:08:17 +00:00
parent 81149fa5b8
commit 4eac255d7d
10 changed files with 584 additions and 936 deletions

View file

@ -36,6 +36,8 @@
<action name="getFileBoxListHtml" type="model" />
<action name="getLangByLangcode" type="model" />
<action name="getModuleAdminGrant" type="model" />
<action name="getModuleAdminMultilingualHtml" type="model" />
<action name="getModuleAdminLangListHtml" type="model" />
<action name="getModuleInfoByMenuItemSrl" type="model" />
<action name="procModuleAdminInsertCategory" type="controller" standalone="true" ruleset="insertCategory" />

View file

@ -1057,4 +1057,30 @@ Le module [Administration des Modules] montera tous les modules installés et vo
<value xml:lang="en"><![CDATA[If content empty, maintain existing value.]]></value>
<value xml:lang="zh-TW"><![CDATA[If content empty, maintain existing value.]]></value>
</item>
<item name="cmd_save_and_use_it">
<value xml:lang="ko"><![CDATA[저장 &amp; 사용]]></value>
<value xml:lang="en"><![CDATA[Save &amp; Use it]]></value>
</item>
<item name="about_multilingual_manage" type="array">
<item name="text">
<value xml:lang="ko"><![CDATA[지원하는 목록은 [%s]에서 편집 가능.]]></value>
<value xml:lang="en"><![CDATA[You can manage multilingual at [%s].]]></value>
</item>
<item name="link">
<value xml:lang="ko"><![CDATA[콘텐츠>다국어]]></value>
<value xml:lang="en"><![CDATA[Content>Mualtilungal]]></value>
</item>
</item>
<item name="about_multilingual_search_result">
<value xml:lang="ko"><![CDATA[<strong>%d</strong>개의 다국어 세트가 있습니다.]]></value>
<value xml:lang="en"><![CDATA[There are <strong>%d</strong> multilingual sets.]]></value>
</item>
<item name="msg_confirm_save_and_use_multilingual">
<value xml:lang="ko"><![CDATA[현재 상태를 저장하고 사용하시겠습니까?]]></value>
<value xml:lang="en"><![CDATA[Do you want to save and use this status?]]></value>
</item>
<item name="msg_empty_multilingual">
<value xml:lang="ko"><![CDATA[다국어를 입력해 주세요.]]></value>
<value xml:lang="en"><![CDATA[Please enter value for multilingual.]]></value>
</item>
</lang>

View file

@ -421,5 +421,45 @@
return $output;
}
/**
* return multilingual html
*/
function getModuleAdminMultilingualHtml()
{
$oTemplate = TemplateHandler::getInstance();
$tpl = $oTemplate->compile('./modules/module/tpl', 'multilingual_v17.html');
$this->add('html', $tpl);
}
/**
* return multilingual list html
*/
function getModuleAdminLangListHtml()
{
$siteModuleInfo = Context::get('site_module_info');
$args->site_srl = (int)$site_module_info->site_srl;
$args->langCode = Context::get('lang_type');
$args->page = Context::get('page');
$args->sort_index = 'name';
$args->order_type = 'asc';
$args->search_keyword = Context::get('search_keyword');
$args->name = Context::get('name');
$args->list_count = 5;
$args->page_count = 5;
$output = $this->getLangListByLangcode($args);
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
Context::set('lang_code_list', $output->data);
Context::set('page_navigation', $output->page_navigation);
$oTemplate = TemplateHandler::getInstance();
$tpl = $oTemplate->compile('./modules/module/tpl', 'multilingual_v17_list.html');
$this->add('html', $tpl);
}
}
?>

View file

@ -10,6 +10,7 @@
<condition operation="equal" column="site_srl" var="site_srl" notnull="notnull" filter="number" />
<condition operation="in" column="lang_code" var="langCode" pipe="and" />
<condition operation="like" column="value" var="search_keyword" pipe="and" />
<condition operation="equal" column="name" var="name" pipe="and" />
</conditions>
<navigation>
<index var="sort_index" default="list_order" order="order_type" />

View file

@ -0,0 +1,48 @@
{@
/* move current language to the top */
$a = array($lang_type=>$lang_supported[$lang_type]);
unset($lang_supported[$lang_type]);
$lang_supported = array_merge($a, $lang_supported);
}
<div class="x_modal" id="g11n" style="display:none">
<div class="x_modal-header">
<h3>{$lang->cmd_multilingual}</h3>
</div>
<div class="x_modal-body">
<div class="x_tabbable">
<ul class="x_nav x_nav-tabs">
<li class="x_active"><a href="#lang_create">{$lang->cmd_insert}</a></li>
<li><a href="#lang_search">{$lang->cmd_search}</a></li>
</ul>
<div class="x_tab-content">
<form action="" class="x_tab-pane x_active item" id="lang_create">
<fieldset class="editMode">
<textarea loop="$lang_supported => $code, $name" class="{$code}" rows="1" cols="12" title="{$name}" style="margin-right:5px"></textarea>
<div class="x_clearfix">
<button type="reset" class="x_btn cancel">{$lang->cmd_cancel}</button>
<span class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary save-useit">{$lang->cmd_save_and_use_it}</button>
<span>
</div>
</fieldset>
</form>
<div class="x_tab-pane" id="lang_search">
</div>
</div>
</div>
</div>
<div class="x_modal-footer">
<button type="button" class="x_btn x_pull-left" data-hide="#g11n">{$lang->cmd_close}</button>
<p class="x_pull-right">
{@
$link = '<a href="' . getUrl('', 'module', 'admin', 'act', 'dispModuleAdminLangcode') . '">' . $lang->about_multilingual_manage['link'] . '</a>';
$text = sprintf($lang->about_multilingual_manage['text'], $link);
}
{$text}
</p>
</div>
</div>
<script>
xe.msg_confirm_save_and_use_multilingual = '{$lang->msg_confirm_save_and_use_multilingual}';
xe.msg_empty_multilingual = '{$lang->msg_empty_multilingual}';
</script>

View file

@ -0,0 +1,64 @@
{@
/* move current language to the top */
$a = array($lang_type=>$lang_supported[$lang_type]);
unset($lang_supported[$lang_type]);
$lang_supported = array_merge($a, $lang_supported);
}
<p>{sprintf($lang->about_multilingual_search_result, $total_count)}</p>
<fieldset class="list">
<form loop="$lang_code_list => $no, $val" action="" class="item">
<a href="#lang-{$no}" data-toggle="#lang-{$no}" data-lang_code="{$val->name}"><span>{$val->value}<span></a>
<fieldset id="lang-{$no}">
<textarea loop="$lang_supported => $code, $lname" disabled class="{$code}" data-lang="{$code}" rows="1" cols="12" title="{$lname}" style="margin-right:5px"></textarea>
<div class="x_clearfix">
<span class="x_pull-left">
<button type="button" class="x_btn modify">{$lang->cmd_modify}</button>
<button type="reset" class="x_btn cancel">{$lang->cmd_cancel}</button>
</span>
<span class="x_pull-right">
<button type="button" class="x_btn useit x_btn-primary">{$lang->use}</button>
<button type="submit" class="x_btn save x_btn-primary">{$lang->cmd_save_and_use_it}</button>
</span>
</div>
</fieldset>
</form>
</fieldset>
<div class="x_clearfix">
<form cond="$page_navigation" action="./" class="x_pagination x_pull-left" data-search_keyword="{htmlspecialchars($search_keyword)}" no-error-return-url="true">
<ul>
<li class="x_disabled"|cond="!$page || $page == 1"><a href="#" data-page="1" data-search_keyword="{htmlspecialchars($search_keyword)}">&laquo; {$lang->first_page}</a></li>
<block cond="$page_navigation->first_page != 1 && $page_navigation->first_page + $page_navigation->page_count > $page_navigation->last_page - 1 && $page_navigation->page_count != $page_navigation->total_page">
{@$isGoTo = true}
<li>
<a href="#goTo" data-toggle="#goTo" title="{$lang->cmd_go_to_page}">...</a>
<span cond="$isGoTo" id="goTo" class="x_input-append">
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
<button type="submit" class="x_add-on">Go</button>
</span>
</li>
</block>
<!--@while($page_no = $page_navigation->getNextPage())-->
{@$last_page = $page_no}
<li class="x_active"|cond="$page_no == $page"><a href="#" data-page="{$page_no}" data-search_keyword="{htmlspecialchars($search_keyword)}">{$page_no}</a></li>
<!--@end-->
<block cond="$last_page != $page_navigation->last_page && $last_page + 1 != $page_navigation->last_page">
{@$isGoTo = true}
<li>
<a href="#goTo" data-toggle="#goTo" title="{$lang->cmd_go_to_page}">...</a>
<span cond="$isGoTo" id="goTo" class="x_input-append">
<input type="number" min="1" max="{$page_navigation->last_page}" required name="page" title="{$lang->cmd_go_to_page}" />
<button type="submit" class="x_add-on">Go</button>
</span>
</li>
</block>
<li class="x_disabled"|cond="$page == $page_navigation->last_page"><a href="#" data-page="{$page_navigation->last_page}" data-search_keyword="{htmlspecialchars($search_keyword)}" title="{$page_navigation->last_page}">{$lang->last_page} &raquo;</a></li>
</ul>
</form>
<form action="" class="search center x_input-append x_pull-right">
<input type="search" name="search_keyword" required title="Search" value="<!--@if($name)-->{htmlspecialchars($lang_code_list[1]->value)}<!--@else-->{htmlspecialchars($search_keyword)}<!--@end-->">
<span class="x_btn-group">
<button class="x_btn x_btn-inverse" type="submit">{$lang->cmd_search}</button>
<button cond="$search_keyword || $name" id="search_cancel" class="x_btn" type="button">{$lang->cmd_cancel}</button>
</span>
</form>
</div>