issue 219, added setting for multilanguage on layout modify page

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9453 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2011-09-30 07:49:27 +00:00
parent 254349a7f3
commit 38f168cd48
3 changed files with 64 additions and 3 deletions

View file

@ -0,0 +1,23 @@
<block cond="$use_multilang">
<div id="langEdit" class="langEdit tgContent">
<ul class="langList"></ul>
<div class="langInput form">
<h2>{$lang->multilingual} <strong>{$lang->cmd_modify}</strong> | <a href="#langEdit">{$lang->cmd_insert}</a></h2>
<ul>
{@
/* 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);
}
<li loop="$lang_supported=>$code,$name" class="{$code}"><label for="{$code}_var1">{$name}</label> <input type="text" value="" id="{$code}_var1" /></li>
</ul>
<div class="action">
<div class="btnArea">
<span class="btn small"><input type="submit" value="{$lang->use}|{$lang->use_after_save}" /></span>
</div>
<p><a href="{getUrl('act','dispModuleAdminLangcode')}">{$lang->multilingual_manager}</a></p>
</div>
</div>
</div>
</block>

View file

@ -0,0 +1,27 @@
<block cond="$use_multilang_textarea">
<style type="text/css">
#langEditTextarea textarea { width: 258px; }
</style>
<div id="langEditTextarea" class="langEdit tgContent">
<ul class="langList"></ul>
<div class="langInput form">
<h2>{$lang->multilingual} <strong>{$lang->cmd_modify}</strong> | <a href="#langEdit">{$lang->cmd_insert}</a></h2>
<ul>
{@
/* 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);
}
<li loop="$lang_supported=>$code,$name" class="{$code}"><label for="{$code}_var1">{$name}</label> <textarea id="{$code}_var1"></textarea></li>
</ul>
<div class="action">
<div class="btnArea">
<span class="btn small"><input type="submit" value="{$lang->use}|{$lang->use_after_save}" /></span>
</div>
<p><a href="{getUrl('act','dispModuleAdminLangcode')}">{$lang->multilingual_manager}</a></p>
</div>
</div>
</div>
</block>

View file

@ -56,9 +56,19 @@
<li>
<p class="q">{$var->title}</p>
<div class="a">
<input cond="$var->type == 'text'" type="text" name="{$name}" value="{htmlspecialchars($var->value)}" />
<div cond="$var->type == 'text'" class="multiLangEdit">
{@$use_multilang = true}
<input type="hidden" name="{$name}" value="{htmlspecialchars($var->value)}" class="vLang" />
<input type="text" id="{$name}" value="{$var->value}" class="vLang" />
<span class="desc"><a href="#langEdit" class="editUserLang tgAnchor">{$lang->cmd_set_multilingual}</a></span>
</div>
<textarea cond="$var->type == 'textarea'" name="{$name}" cols="42" rows="5">{htmlspecialchars($var->value)}</textarea>
<div cond="$var->type == 'textarea'" class="multiLangEdit">
{@$use_multilang_textarea = true}
<input type="hidden" name="{$name}" value="{htmlspecialchars($var->value)}" class="vLang" />
<textarea id="{$name}" cols="42" rows="5" class="vLang">{$var->value}</textarea>
<span class="desc"><a href="#langEditTextarea" class="editUserLang tgAnchor">{$lang->cmd_set_multilingual}</a></span>
</div>
<block cond="$var->type == 'image'">
<block cond="$var->value">
@ -141,5 +151,6 @@
<input type="submit" value="{$lang->cmd_insert}"|cond="$act == 'dispLayoutAdminInsert'" value="{$lang->cmd_save}"|cond="$act == 'dispLayoutAdminModify'" />
</span>
</div>
<include target="include.multilang.html" />
<include target="include.multilang.textarea.html" />
</form>