Index: /branches/2.2/mobile/inc/class.mobiletemplate.inc.php =================================================================== --- /branches/2.2/mobile/inc/class.mobiletemplate.inc.php (revision 4046) +++ /branches/2.2/mobile/inc/class.mobiletemplate.inc.php (revision 4149) @@ -16,5 +16,6 @@ $template = $GLOBALS['phpgw']->session->appsession('mobile.layout','mobile'); - if($template == "mini_desktop") { + if( $template == "mini_desktop" ) + { $this->template->set_file(array('home_t' => 'pc_template.tpl')); $this->template->set_file(array('home_t_search_bar' => 'search_bar.tpl')); @@ -24,10 +25,11 @@ $this->template->set_var('lang_search_error_message',lang("need choose one option")); $this->template->set_var('lang_search_error_message_four_digits',lang("search word need not be empty and has more then four char")); - } else { + } + else + { $this->template->set_file(array('home_t' => 'template.tpl')); $this->template->set_var('lang_mini_desktop', lang('mini desktop')); - } - - + + } $this->template->set_block('home_t', 'mobile_home'); @@ -119,12 +121,25 @@ } - public function init_mobile() { + public function init_mobile() + { $ui_mobilemail = CreateObject('mobile.ui_mobilemail'); $obj = createobject("expressoMail1_2.functions"); - // setting timezone preference - $zones = $obj->getTimezones(); - $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['timezone'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] : sprintf("%s", array_search("America/Sao_Paulo", $zones)); + // setting timezone preference + $zones = $obj->getTimezones(); + $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['timezone'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['timezone'] : sprintf("%s", array_search("America/Sao_Paulo", $zones)); $this->template->set_var('global_title', lang('expresso mini')); + // button logout + if( isset($_COOKIE['lem']) && isset($_COOKIE['pem']) ) + { + $this->template->set_var('style_1','padding-left:65%;'); + $this->template->set_var('style_2','position:relative; float: right; display: none'); + } + else + { + $this->template->set_var('style_1','position:absolute; float: left;'); + $this->template->set_var('style_2','position:relative; float: right; display: block'); + } + $this->template->set_var('lang_logout', lang('logout')); $this->template->set_var('lang_search', lang('search')); Index: /branches/2.2/mobile/templates/default/template.tpl =================================================================== --- /branches/2.2/mobile/templates/default/template.tpl (revision 4069) +++ /branches/2.2/mobile/templates/default/template.tpl (revision 4149) @@ -17,19 +17,13 @@ -