don't show locales chooser when no additional packages were installed

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@416 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-03-16 22:36:26 +00:00
parent 59fd9f1fa8
commit d09e3dddf4
4 changed files with 12 additions and 5 deletions

View File

@ -8,7 +8,6 @@ function menuloc($id) {
}
function tpl_menu() { global $page, $webimroot, $errors, $current_locale;
?>
<?php if(isset($page) && isset($page['localeLinks'])) { ?>
<li>
<h2><b><?php echo getlocal("lang.choose") ?></b></h2>
<ul class="locales">
@ -17,8 +16,6 @@ function tpl_menu() { global $page, $webimroot, $errors, $current_locale;
<?php } ?>
</ul>
</li>
<?php } ?>
<?php
}
?>

View File

@ -12,7 +12,9 @@
* Evgeny Gryaznov - initial API and implementation
*/
require_once('inc_locales.php');
if(isset($page) && isset($page['localeLinks'])) {
require_once('inc_locales.php');
}
$page['title'] = getlocal("install.title");
$page['fixedwrap'] = true;

View File

@ -12,7 +12,9 @@
* Evgeny Gryaznov - initial API and implementation
*/
require_once('inc_locales.php');
if(isset($page) && isset($page['localeLinks'])) {
require_once('inc_locales.php');
}
$page['title'] = getlocal("page_login.title");
$page['headertitle'] = getlocal("app.title");
$page['show_small_login'] = true;

View File

@ -17,10 +17,12 @@ $page['title'] = getlocal("topMenu.admin");
$page['menuid'] = "main";
function tpl_header() { global $page, $webimroot;
if(isset($page) && isset($page['localeLinks'])) {
?>
<script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/locale.js"></script>
<?php
}
}
function menuseparator() {
@ -103,6 +105,7 @@ if( $page['showadmin'] ) { ?>
<?php menuseparator(); ?>
<?php } ?>
<?php if(isset($page) && isset($page['localeLinks'])) { ?>
<td class="dashitem">
<img src="/webim/images/dash/locale.gif" alt=""/>
<a href='#' id="changelang">
@ -110,6 +113,7 @@ if( $page['showadmin'] ) { ?>
<?php echo getlocal('menu.locale.content') ?>
</td>
<?php menuseparator(); ?>
<?php } ?>
<td class="dashitem">
<img src="/webim/images/dash/exit.gif" alt=""/>
@ -121,6 +125,7 @@ if( $page['showadmin'] ) { ?>
</table>
<?php if(isset($page) && isset($page['localeLinks'])) { ?>
<div id="dashlocalesPopup">
<a href="#" id="dashlocalesPopupClose"><img src="/webim/images/dash/close.gif" alt="X"/></a>
<h2><img src="/webim/images/dash/locale.gif" alt=""/>
@ -132,6 +137,7 @@ if( $page['showadmin'] ) { ?>
</ul>
</div>
<div id="backgroundPopup"></div>
<?php } ?>
<?php
} /* content */