Index: sandbox/newExpressoMail/prototype/modules/mail/templates/email.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/mail/templates/email.ejs	(revision 7066)
+++ sandbox/newExpressoMail/prototype/modules/mail/templates/email.ejs	(revision 7167)
@@ -1,13 +1,13 @@
 <div class="message">
-	<div class="message-options ui-widget-header ui-corner-all" style="width:100%; clear: both; display: inline-block; height: 30px;">
-		<div class="info" style="float: left; margin: 3px;">
-			<%= data.info.from.email %>
+	<div class="message-options ui-widget-header ui-corner-all" style="width:100%; clear: both; display: inline-block; height: 30px; border-top-left-radius: 0px; border-top-right-radius: 0px;">
+		<div class="info" style="float: left; margin: 3px; padding-top: 5px;">
+			<span><%= data.info.from.full %></span>,<%= data.info.fulldate %> 
 		</div>
-		<div style="float: right; margin: 3px; margin-rigth: 5px; width: auto; display: inline;">
+		<!--<div style="float: right; margin: 3px; width: auto; display: inline;">
 			<span class="messages-controll" style="display: inline; margin-right: 1px;">
 				<button class="button messages-preferences" title="Preferências">&nbsp;</button>
 			</span>
-		</div>
-		<div style="float: right; margin: 3px; margin-rigth: 5px; width: auto; display: inline;">
+		</div> -->
+		<div style="float: right; margin: 3px; width: auto; display: inline;">
 			<span class="messages-controll" style="display: inline; margin-right: 1px;">
 				<button class="button message-prev" title="Mensagem Anterior">&nbsp;</button>
@@ -15,36 +15,71 @@
 			</span>
 		</div>
-		<div style="float: right; margin: 3px; margin-rigth: 5px; width: auto; display: inline;">
-			<span class="message-reply" style="display: inline; margin-right: 1px;">
-				<button class="button message-reply" title="Responder Mensagem">Responder</button>
-				<button class="button message-next" title="Mais opções para responder">&nbsp;</button>
-			</span>
-		</div>
-		<div style="float: right; margin: 3px; margin-rigth: 5px; width: auto; display: inline;">
-			<span class="messages-foward" style="display: inline; margin-right: 1px;">
-				<button class="button message-foward" title="Encaminhar Mensagem">Encaminhar</button>
-			</span>
-		</div>
-		<div style="float: right; margin: 3px; margin-rigth: 5px; width: auto; display: inline;">
-			<span style="display: inline;">
-				<button class="button message-tags" title="Marcadores">&nbsp;</button>
-				<button class="button message-more" title="Mais Ações">Mais</button>
+		<div style="float: right; margin: 3px; width: auto; display: inline; margin-right: 0px;">
+			<span class="messages-remove" style="display: inline; margin-right: 1px;">
 				<button class="button message-remove" title="Excluir">&nbsp;</button>
 			</span>
 		</div>
-		<div class="buttons" style="float: right; margin: 3px; margin-rigth: 5px; width: auto; display: inline;">
+		<% if($.trim(data.info.Draft) == ""){ %>
+		<div style="float: right; margin: 3px; width: auto; display: inline; margin-right: 0px;">
+			<span class="messages-forward" style="display: inline; margin-right: 1px;">
+				<button class="button message-forward" title="Encaminhar Mensagem">&nbsp;</button>
+			</span>
+		</div>
+		<div style="float: right; margin: 3px; width: auto; display: inline;">
+			<span class="message-reply" style="display: inline; margin-right: 1px;">
+				<button class="button message-reply" title="Responder Mensagem">&nbsp;</button>
+				<a href="#" class="button message-reply-options" title="Mais opções para responder">&nbsp;</a>
+				<div class="message-reply-menu-content" style="display:none;"> 
+					<ul>
+						<li><a href="#" class="menu-pass-through">Sem Histórico</a></li>
+						<li><a href="#" class="menu-command configurations">Todos com Histórico</a></li>
+						<li><a href="#" class="menu-command configurations">Todos sem Histórico</a></li>
+					</ul>
+				</div>
+			</span>
+		</div>
+		<% }else{ %>
+		<div style="float: right; margin: 3px; width: auto; display: inline; margin-right: 0px;">
+			<span class="message-edit" style="display: inline; margin-right: 1px;">
+				<button class="button message-edit" title="Editar Rascunho">&nbsp;</button>
+			</span>
+		</div>
+		<% } %>
+		<div style="float: right; margin: 3px; width: auto; display: inline; margin-right: 0px;">
+			<span style="display: inline;">
+				<button class="button message-tags" title="Marcadores">&nbsp;</button>
+				<div class="message-tags-menu-content" style="display:none;"> 
+					<ul>
+					</ul>
+				</div>
+
+				<a class="button message-more" href="#" title="Mais Ações">Mais</a>
+				<div class="message-more-menu-content" style="display:none;"> 
+					<ul>
+						<li><a href="#" class="menu-command configurations">Mover</a></li>
+						<li><a href="#" class="menu-command configurations">Exportar</a></li>
+						<li><a href="#" class="menu-pass-through">Bloquear Remetente</a></li>
+						<li><a href="#" class="menu-pass-through">Reportar Erro</a></li>
+					</ul>
+				</div>
+			</span>
+		</div>
+		<div class="buttons" style="float: right; margin: 3px; width: auto; display: inline;">
 			<span  class="message-flags" style="display: inline; margin-right: 1px;">
 
-				<input type="checkbox" id="check10<%= data.ID %>" class="message-important-flag"/>
-				<label title="Marcar como importante" for="check10<%= data.ID %>" style="height: 22px;"></label>
+				<input type="checkbox" id="check10<%= data.ID %>" class="message-important-flag"
+				<%= data.info.Flagged ? 'checked="checked"' : '' %>
+				/>
+				<label title="Marcar como importante" for="check10<%= data.ID %>">&nbsp;</label>
 
 				<input type="checkbox" id="check2<%= data.ID %>" class="message-unread-flag"/>
-				<label title="Marcar como nao lida" for="check2<%= data.ID %>" style="height: 22px;"></label>
+				<label title="Marcar como nao lida" for="check2<%= data.ID %>">&nbsp;</label>
 
-				<input type="checkbox" id="check3<%= data.ID %>" class="message-spam-flag"/>
-				<label title="Marcar como Spam" for="check3<%= data.ID %>" style="height: 22px;"></label>
+				<input type="checkbox" id="check3<%= data.ID %>" class="message-spam-flag" 
+					<%= data.info.msg_folder.split(cyrus_delimiter)[data.info.msg_folder.split(cyrus_delimiter).length -1] == spamfolder ? 'checked="checked"' : ''%>/>
+				<label title="Marcar como Spam" for="check3<%= data.ID %>">&nbsp;</label>
 
 				<input type="checkbox" id="check4<%= data.ID %>" class="message-followup-flag"/>
-				<label title="Marcar com Sinalizador" for="check4<%= data.ID %>" style="height: 22px;"></label>
+				<label title="Marcar com Sinalizador" for="check4<%= data.ID %>">&nbsp;</label>
 
 			</span>
@@ -52,6 +87,56 @@
 	</div>
 
-	<div class="message-header">
-
+	<div class="message-header" style="background-color : #F3F7FD; width: 100%; font-weight: bold; font-size: 18px; border-left: 5px solid #BBD8FB;border-radius:5px;">
+		<span class="message-subject"><%=data.info.subject%></span>
+		<table class="message-details">
+			<tr>
+				<td>
+					Enviado Por:
+				</td>
+				<td>
+					<%= data.info.reply_toaddress %>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					De:
+				</td>
+				<td>
+					<%= data.info.from.full %>
+				</td>
+			</tr>
+				<td>
+					Para:
+				</td>
+				<td>
+					<%= data.info.toaddress2 %>
+				</td>
+			<tr>
+			</tr>
+				<td>
+					Data:
+				</td>
+				<td>
+					<%= data.info.fulldate %>
+				</td>
+			<tr>
+			<% if(data.info.cc != ""){ %>
+			</tr>
+				<td>
+					CC:
+				</td>
+				<td>
+					<%= data.info.cc %>
+				</td>
+			<tr>
+			<%}%>
+			</tr>
+			<tr>
+			</tr>
+		</table>
+	</div>
+	<div style="border-radius: 5px; width: 100%; height: 12px;border-bottom: 1px solid #CCC; cursor: pointer;" align="center" title="Mostrar/Ocultar Detalhes" class="message-hide-show-details">
+		<span class="ui-icon ui-icon-carat-1-n"></span>
+		<span class="ui-icon ui-icon-carat-1-s" style="display:none;"></span>
 	</div>
 
