Index: branches/2.2/mobile/inc/class.mobiletemplate.inc.php
===================================================================
--- branches/2.2/mobile/inc/class.mobiletemplate.inc.php	(revision 3690)
+++ branches/2.2/mobile/inc/class.mobiletemplate.inc.php	(revision 3727)
@@ -12,5 +12,8 @@
 		function mobiletemplate(){
 			$this->template = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
-			$this->template->set_file(Array('home_t' => 'template.tpl'));	
+			
+			$template = $GLOBALS['phpgw']->session->appsession('mobile.layout','mobile');
+			
+			$this->template->set_file(Array('home_t' => $template=="mini"?'pc_template.tpl':'template.tpl'));	
 			$this->template->set_block('home_t', 'mobile_home');	
 			$this->template->set_block('home_t','success_message');
@@ -26,4 +29,14 @@
 			$pre_content = $this->template->get_var("content");
 			$this->template->set_var("content", $pre_content.$content);
+		}
+		
+		/*
+		* @function set_home
+	 	* @abstract Carrega o atributo "home" do template principal para PC.
+	 	* @author Diógenes Ribeiro Duarte <diogenes.duarte@prodeb.ba.gov.br>
+	 	*/	
+		public function set_home($content) {
+			$pre_content = $this->template->get_var("home");
+			$this->template->set_var("home", $pre_content.$content);
 		}
 		
@@ -68,4 +81,8 @@
 			$class=='ui_home' && $method=='index'?$this->print_logout():$this->print_navbar();
 			$filename = 'inc/class.'.$class.'.inc.php';
+			if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')=="mini") {
+				$ui_home = CreateObject('mobile.ui_home');
+				$ui_home->index(array());
+			}
 			include_once($filename);
 			$obj = new $class();		
@@ -120,4 +137,5 @@
 			$var  = Array(
 				'css'	=> $this->get_mobile_css(),
+				'title' => lang("expresso mini")
 			);		
 			$this->template->set_var($var);		
Index: branches/2.2/mobile/inc/class.ui_home.inc.php
===================================================================
--- branches/2.2/mobile/inc/class.ui_home.inc.php	(revision 3706)
+++ branches/2.2/mobile/inc/class.ui_home.inc.php	(revision 3727)
@@ -9,5 +9,6 @@
 		var $public_functions = array(
 			'index' => true,
-			'search' => true
+			'search' => true,
+			'change_template' => true
 		);
 		
@@ -18,4 +19,10 @@
 			$this->db	= CreateObject('phpgwapi.db');
 			$this->bocalendar = CreateObject('calendar.bocalendar');
+		}
+		
+		function change_template($params) {
+			
+			$GLOBALS['phpgw']->session->appsession('mobile.layout','mobile',$params['template']);
+			header("location: index.php");
 		}
 		
@@ -98,5 +105,9 @@
 			$GLOBALS['phpgw_info']['mobiletemplate']->set_error_msg($params["error_message"]);
 			$GLOBALS['phpgw_info']['mobiletemplate']->set_success_msg($params["success_message"]);
-			$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page'));
+			if($GLOBALS['phpgw']->session->appsession('mobile.layout','mobile')=="mini")
+				$GLOBALS['phpgw_info']['mobiletemplate']->set_home($this->template->fp('out', 'page'));
+			else
+				$GLOBALS['phpgw_info']['mobiletemplate']->set_content($this->template->fp('out', 'page'));
+
 		}
 		
Index: branches/2.2/mobile/mobile_header.inc.php
===================================================================
--- branches/2.2/mobile/mobile_header.inc.php	(revision 3564)
+++ branches/2.2/mobile/mobile_header.inc.php	(revision 3727)
@@ -3,5 +3,5 @@
 	* eGroupWare                                                               *
 	* http://www.egroupware.org                                                *
-	* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
+	* The file written by Mï¿œrio Cï¿œsar Kolling <mario.kolling@serpro.gov.br>    *
 	* --------------------------------------------                             *
 	*  This program is free software; you can redistribute it and/or modify it *
@@ -12,11 +12,12 @@
 
 	/*******************************************\
-	 * Define a aplicação mobile preferencial  *
+	 * Define a aplicaï¿œï¿œo mobile preferencial  *
 	\*******************************************/
-	//TODO: Ler do banco do expresso as preferências do usuário e definir a aplicação móvel padrão
-	// por enquanto isto será hardcoded para mobilemail.
+	//TODO: Ler do banco do expresso as preferï¿œncias do usuï¿œrio e definir a aplicaï¿œï¿œo mï¿œvel padrï¿œo
+	// por enquanto isto serï¿œ hardcoded para mobilemail.
 
 	$GLOBALS['phpgw_info']['flags']['currentapp'] = 'mobile';
-	$GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] = 'home'; //home, mobilecalendar, mobilecc ou mobilemail
+	$GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] = 
+						$GLOBALS['phpgw']->session->appsession('mobilemail.folders','mobile')=="mini"?'mobilecalendar':'home'; //home, mobilecalendar, mobilecc ou mobilemail
 
 	if ( is_null($GLOBALS['phpgw_info']['server']['template_set']) )
@@ -26,10 +27,11 @@
 
 	/*
-	 * @function start_prefered_app
-	 * @abstract Função que chama a aplicação móvel preferencial.
-	 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+	 * @
+
+	 * @abstract Funï¿œï¿œo que chama a aplicaï¿œï¿œo mï¿œvel preferencial.
+	 * @author Mï¿œrio Cï¿œsar Kolling <mario.kolling@serpro.gov.br>
 	 */
 	function start_prefered_app(){
-		//TODO: Determinar qual a aplicação móvel preferida e iniciá-la.			
+		//TODO: Determinar qual a aplicaï¿œï¿œo mï¿œvel preferida e iniciï¿œ-la.			
 		switch($GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app']){
 			case home:
@@ -37,5 +39,5 @@
 				break;			
 			case mobilemail:
-				$link = "ui_mobilemail.mail_list";		
+				$link = "ui_mobilemail.change_folder&folder=0";		
 				break;
 			case mobilecalendar:
Index: branches/2.2/mobile/templates/default/pc_template.tpl
===================================================================
--- branches/2.2/mobile/templates/default/pc_template.tpl	(revision 3727)
+++ branches/2.2/mobile/templates/default/pc_template.tpl	(revision 3727)
@@ -0,0 +1,46 @@
+<!-- BEGIN mobile_home -->
+<html xmlns="http://www.w3.org/1999/xhtml">
+	<head>
+		<title>
+			Expresso Mini
+		</title>
+		<meta content="text/html; width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0; charset=utf-8" http-equiv="Content-Type" name="viewport" />
+		<meta name="format-detection" content="telephone=no" />
+		<link href="templates/css/desktop.css" type="text/css" rel="StyleSheet" />
+		<!--[if lte IE 6]>
+			<link href="templates/css/ie6.css" type="text/css" rel="StyleSheet">
+		<![endif]-->
+	</head>
+	<body>
+		<div id="global">
+			<div class="topo">
+				<h1>
+					Expresso Mini
+				</h1><span><a href="#">Ajuda</a></span>
+			</div>
+			<form method="post" action="index.php?menuaction=mobile.ui_home.search" id="form_search"></form>
+			<div id="busca">
+				<table>
+					<tr>
+						<td class="gd">
+							<input type="text" name="name" />
+						</td>
+						<td class="pq">
+							<button name="search_message" class="btn-generico" onclick="document.getElementById('formu_busca').submit();">BUSCAR</button>
+						</td>
+					</tr>
+				</table>
+			</div><!-- INÃCIO NAVEGAÃÃO -->
+			<div id="navegacao">
+				{home}
+			</div><!-- INÃCIO CONTEÃDO -->
+			<div id="conteudo">
+				{content}
+			</div>
+		</div>
+		<div class="rodape">
+			Projeto ExpressoLivre 2004 - 2010 :: LicenÃ§a de Software
+		</div>
+	</body>
+</html>
+<!-- END mobile_home -->
Index: branches/2.2/mobile/templates/default/template.tpl
===================================================================
--- branches/2.2/mobile/templates/default/template.tpl	(revision 3703)
+++ branches/2.2/mobile/templates/default/template.tpl	(revision 3727)
@@ -30,4 +30,5 @@
 		</div>
 		<div class="rodape">Projeto ExpressoLivre 2004 - 2010 :: Licen&ccedil;a de Software</div>
+		 <div class="rodape center"><a href="index.php?menuaction=mobile.ui_home.change_template&template=mini">Utilizar versão para Desktops</a></div>
 	</body>
 </html>
Index: branches/2.2/mobile/templates/css/desktop.css
===================================================================
--- branches/2.2/mobile/templates/css/desktop.css	(revision 3727)
+++ branches/2.2/mobile/templates/css/desktop.css	(revision 3727)
@@ -0,0 +1,49 @@
+@import url("mobile.css");
+
+/* MACRO ESTRUTURA BROWSER */
+.global{ }
+/*#navegacao{float:left; width:30%}
+#conteudo{float:left; width:70%; min-height:305px;background: #eef7fa } */
+
+ #navegacao, #conteudo { position: absolute; border: 5px solid #F6F6F6; }
+#navegacao {right: 30%; left: 0; }
+#conteudo {left: 30%; right: 0; } 
+
+#titulo-miolo, .menu-contexto{background-color: #3399CC ;color: #FFFFFF;  font-size: small; min-height: 22px; line-height:22px; padding: 4px 2px; font-weight:bold; }
+
+/* CLASSES e IDS MODIFICADAS */
+#campos-correspondencia {background-color: #CEE5EF;  color: #666666; display: table; font-weight: bold;   padding: 10px 0; text-align: left; /*min-height:210px*/ } 
+.rodape{clear:both}
+#pre-calendario{display:table; width:100%}
+.menu-diverso, #palavra-procurada{height:25px}
+.email-data{width:70px;}
+.aviso-positivo, .aviso-negativo {width:50%}
+#titulo-miolo button {height:21px}
+
+/*#corpo_mensagem {margin-left:5px}*/
+#corpo_mensagem #foto {padding:5px 0; text-align:left; margin-left:20px}
+
+.login input[type="text"]{ width:40%}
+
+.posiciona-esquerda{margin-left:5px}
+
+
+div.dt-azul p+p {margin-left:5px}
+div.dt-branco p+p  {margin-left:5px}
+/*div.rodape {position:absolute; bottom:0; width:100%}*/
+
+/*Modificadas 31/01/2011*/
+div.rodape {bottom:0; clear:both; display:table; position:fixed; width:100%;}
+div.margin-rodape {  clear: both;   margin: 0 0 21px 5px; }
+
+div#pre-calendario{padding:10px 0} 
+
+
+@media screen and (-webkit-min-device-pixel-ratio:0) {
+
+.menu-diverso { height: 0px;margin-top:0;  }
+dt.menu-diverso {min-height:21px; padding:4px 0;}
+
+div#titulo-miolo select{margin:0}
+
+}
Index: branches/2.2/mobile/templates/css/ie6.css
===================================================================
--- branches/2.2/mobile/templates/css/ie6.css	(revision 3727)
+++ branches/2.2/mobile/templates/css/ie6.css	(revision 3727)
@@ -0,0 +1,91 @@
+@import url("mobile.css");
+
+/* MACRO ESTRUTURA BROWSER */
+.global{ }
+#navegacao{float:left; width:30%}
+#conteudo{float:left; width:70%; min-height:305px;background: #eef7fa }
+#titulo-miolo{background-color: #3399CC ;color: #FFFFFF;  font-size: small; min-height: 22px; line-height:22px; padding: 4px 0; font-weight:bold; }
+
+
+/* CLASSES e IDS MODIFICADAS */
+#campos-correspondencia {background-color: #CEE5EF;  color: #666666; display: table; font-weight: bold;   padding: 10px 0; text-align: left; /*min-height:210px*/ } 
+.rodape{clear:both}
+#pre-calendario{display:table; width:100%}
+.menu-diverso, #palavra-procurada{height:25px}
+.email-data{width:70px;}
+.aviso-positivo, .aviso-negativo {width:50%}
+#titulo-miolo button {height:21px}
+
+
+
+/* IE6 MODIFICAÇÕES*/
+
+.gd input{width:100%; padding:2px 0;}
+p.descricao{margin-left:25px} /*classe criada*/
+
+
+.login{width:40%; margin:auto; padding:10px 0}
+.login strong {margin:0 0 0 5px; }
+.login input{width:50%; margin:3px 0}
+.login button {margin:0 5px}
+.login p{padding:3px;}
+#bg-aviso{background:#EFF8FB; padding-top:20px;}
+.avisos{background-color:#FAE1E1;}
+.aviso-positivo, .aviso-negativo{ padding:5px; font-size:x-small; color:#333333; background-color:#CEE5EF; width:40%; margin:auto  }
+.aviso-negativo{ background-color:#FAE1E1 }
+.aviso-positivo a,.aviso-negativo a{text-decoration:underline; color:#333333;}
+div.posiciona-esquerda p {margin-left:17px}
+div.posiciona-esquerda p input {margin-left:-19px}
+.email-item{color:#3E3E3D; font:bold small Arial, Helvetica, sans-serif; vertical-align:text-bottom;}
+
+.email-cabecalho{overflow: hidden; width:74%; height:18px; float:left;}
+.email-corpo{margin-top:-5px}
+.btn-anexo a:hover {background:#FAD364; width:40px; padding:3px; color:#333  }
+
+.margin-geral{height:15px}
+.bloco{margin-left:5px}
+.container{margin-bottom:5px}
+#titulo-miolo{height:22px}
+#palavra-procurada {line-height:20px }
+div.posiciona-esquerda p a:hover{background:none; color:#3E3E3D; font:bold small Arial, Helvetica, sans-serif; vertical-align:text-bottom}
+.dt-azul, .dt-branco {background:#EEF7FA; clear:both; display:table;  width:100%;  }
+.dt-branco {background:#FFF}
+.dt-branco a{background:#FFF}
+
+.limpar_div_margin{margin-left:5px}
+.limpar_div_margin input{width:90%}
+
+
+
+#pre-calendario {padding: 10px; background: #eef7fa; width:70%   }
+#semanal { border: none; margin-bottom: 5px }
+#calendario {width:10%;	}
+#calendario thead tr th { color: #333; font-size:small; font-weight:bold;}
+#calendario thead tr th, #calendario tbody tr td { text-align: center } 
+.semana { color:#333;font-size:small; width:100%; font-weight:bold; width: 14%; }
+.dias { border: none }
+.dias a {color: #444;font-size: 11px;cursor: pointer;text-decoration: none;text-align: center;display: block;border: 1px solid #CACACA;width: 27px;height:16px;margin: 0px;padding: 3px 1px 0 0;position: relative;}
+.dias a .qtd_commitment {font-size: 8px;position: absolute;top: 0;right: 0.5px;	color: red;}
+.dias a:hover { color:#999; text-decoration: none }
+a.hoje { background: #FC0; color: #fff }
+a.dia_branco { background: #FFF }
+a.outro_mes { background: #E1E1E1; color: #8B8B8B }
+
+
+
+dt.menu-diverso {min-height:18px; padding:4px 0;}
+dl#lista_miolo dt.menu-diverso{height:0px; padding:0px 0}
+dl#lista_miolo dt.menu-diverso div.margin-geral{margin-top:1px; padding-top:2px;}
+
+span.rotulo-complementar{font-size:x-small; text-decoration:underline; padding:3px; width:130px; margin-left:240px }
+
+
+div.margin-rodape a{margin:-2px}
+div.margin-rodape button{margin-left:1px}
+
+#corpo_mensagem #foto {padding:5px 0; text-align:left; margin-left:20px}
+
+.corrigi-margin{margin-top:-5px}
+
+
+div.rodape {}
