Clean up message template/output
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 23 Apr 2010 18:12:59 +0000 (12:12 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 23 Apr 2010 20:43:53 +0000 (14:43 -0600)
imp/message.php
imp/templates/imp/message/message.html
imp/templates/imp/message/navbar_actions.html
imp/templates/imp/message/navbar_navigate.html
imp/templates/imp/message/navbar_top.html
imp/themes/mozilla/screen.css
imp/themes/screen.css

index 279f84c..52d6353 100644 (file)
@@ -458,7 +458,6 @@ if (Horde_Util::nonInputVar('next_url')) {
 /* Prepare the navbar actions template. */
 $a_template = $injector->createInstance('Horde_Template');
 $a_template->setOption('gettext', true);
-$a_template->set('readonly', $readonly);
 $compose_params = array('identity' => $identity, 'thismailbox' => $mailbox_name, 'uid' => $uid);
 if (!$prefs->getValue('compose_popup')) {
     $compose_params += array('start' => $msgindex, 'mailbox' => $imp_mbox['mailbox']);
@@ -501,11 +500,11 @@ if (IMP::threadSortAvailable($imp_mbox['mailbox'])) {
     $a_template->set('show_thread', Horde::widget(IMP::generateIMPUrl('thread.php', $imp_mbox['mailbox'], $uid, $mailbox_name)->add(array('start' => $msgindex)), _("View Thread"), 'widget', '', '', _("_View Thread"), true));
 }
 
-if ($registry->hasMethod('mail/blacklistFrom')) {
+if (!$readonly && $registry->hasMethod('mail/blacklistFrom')) {
     $a_template->set('blacklist', Horde::widget($self_link->copy()->add('actionID', 'blacklist'), _("Blacklist"), 'widget', '', '', _("_Blacklist"), true));
 }
 
-if ($registry->hasMethod('mail/whitelistFrom')) {
+if (!$readonly && $registry->hasMethod('mail/whitelistFrom')) {
     $a_template->set('whitelist', Horde::widget($self_link->copy()->add('actionID', 'whitelist'), _("Whitelist"), 'widget', '', '', _("_Whitelist"), true));
 }
 
index 9ee0597..e3f5cd6 100644 (file)
@@ -1,9 +1,13 @@
 <div id="msgheaders">
- <table cellspacing="0">
+ <table>
 <loop:headers>
   <tr<if:headers.class> class="<tag:headers.class />"</if:headers.class>>
-   <td class="item<tag:headers.i /> rightAlign nowrap"><strong><tag:headers.name />:</strong>&nbsp;</td>
-   <td class="item<tag:headers.i /> msgheader"><tag:headers.val /></td>
+   <td class="item<tag:headers.i /> rightAlign nowrap">
+    <strong><tag:headers.name />:</strong>
+   </td>
+   <td class="item<tag:headers.i /> msgheader">
+    <tag:headers.val />
+   </td>
   </tr>
 </loop:headers>
  </table>
index 95cf5b3..c1f888a 100644 (file)
@@ -1,16 +1,20 @@
-<table class="navbaractions" width="100%" cellspacing="0">
+<table class="navbaractions">
  <tr>
   <td class="mboxcontrol <if:isbottom>topborder<else:isbottom>bottomborder</else:isbottom></if:isbottom>">
    <ul class="msgactions">
-<if:readonly><else:readonly>
+<if:delete>
     <li><tag:delete /></li>
-</else:readonly></if:readonly>
+</if:delete>
 <if:reply>
     <li><tag:reply />
      <ul>
       <li><tag:reply_sender /></li>
-      <if:reply_list><li><tag:reply_list /></li></if:reply_list>
-      <if:show_reply_all><li><tag:show_reply_all /></li></if:show_reply_all>
+<if:reply_list>
+      <li><tag:reply_list /></li>
+</if:reply_list>
+<if:show_reply_all>
+      <li><tag:show_reply_all /></li>
+</if:show_reply_all>
      </ul>
     </li>
     <li><tag:forward />
     </li>
     <li><tag:redirect /></li>
 </if:reply>
-    <if:show_thread><li><tag:show_thread /></li></if:show_thread>
-<if:readonly><else:readonly>
-    <if:blacklist><li><tag:blacklist /></li></if:blacklist>
-    <if:whitelist><li><tag:whitelist /></li></if:whitelist>
-</else:readonly></if:readonly>
-    <if:view_source><li><tag:view_source /></li></if:view_source>
-    <if:resume><li><tag:resume /></li></if:resume>
+<if:show_thread>
+    <li><tag:show_thread /></li>
+</if:show_thread>
+<if:blacklist>
+    <li><tag:blacklist /></li>
+</if:blacklist>
+<if:whitelist>
+    <li><tag:whitelist /></li>
+</if:whitelist>
+<if:view_source>
+    <li><tag:view_source /></li>
+</if:view_source>
+<if:resume>
+    <li><tag:resume /></li>
+</if:resume>
     <li><tag:save_as /></li>
-<if:readonly><else:readonly>
-    <if:spam><li><tag:spam /></li></if:spam>
-    <if:notspam><li><tag:notspam /></li></if:notspam>
-</else:readonly></if:readonly>
+<if:spam>
+    <li><tag:spam /></li>
+</if:spam>
+<if:notspam>
+    <li><tag:notspam /></li>
+</if:notspam>
     <li<if:atc><else:atc> class="lastnavbar"</else:atc></if:atc>><tag:headers />
      <ul>
-      <if:common_headers><li><tag:common_headers /></li></if:common_headers>
-      <if:all_headers><li><tag:all_headers /></li></if:all_headers>
-      <if:list_headers><li><tag:list_headers /></li></if:list_headers>
+<if:common_headers>
+      <li><tag:common_headers /></li>
+</if:common_headers>
+<if:all_headers>
+      <li><tag:all_headers /></li>
+</if:all_headers>
+<if:list_headers>
+      <li><tag:list_headers /></li>
+</if:list_headers>
      </ul>
     </li>
 <if:atc>
     <li class="lastnavbar"><tag:atc />
      <ul>
-      <if:show_parts_all><li><tag:show_parts_all /></li></if:show_parts_all>
-      <if:download_all><li><tag:download_all /></li></if:download_all>
-      <if:strip_all><li><tag:strip_all /></li></if:strip_all>
+<if:show_parts_all>
+      <li><tag:show_parts_all /></li>
+</if:show_parts_all>
+<if:download_all>
+      <li><tag:download_all /></li>
+</if:download_all>
+<if:strip_all>
+      <li><tag:strip_all /></li>
+</if:strip_all>
      </ul>
     </li>
 </if:atc>
index e9f8446..1a8006f 100644 (file)
@@ -39,7 +39,7 @@
 </else:usepop></if:usepop>
 </else:readonly></if:readonly>
    <div class="rightFloat nowrap">
-    <tag:back_to />&nbsp;
+    <tag:back_to />
     <if:prev><tag:prev /></if:prev><tag:prev_img /><if:prev></a></if:prev>
     <if:next><tag:next /></if:next><tag:next_img /><if:next></a></if:next>
    </div>
@@ -51,4 +51,6 @@
  </tr>
 </if:isbottom>
 </table>
-<if:isbottom></form></if:isbottom>
+<if:isbottom>
+</form>
+</if:isbottom>
index c8f66fe..746534a 100644 (file)
@@ -1,14 +1,17 @@
 <form method="post" id="messages" name="messages" action="<tag:message_url />">
-<tag:form_input />
-<input type="hidden" id="targetMbox" name="targetMbox" />
-<input type="hidden" id="actionID" name="actionID" />
-<input type="hidden" id="message_token" name="message_token" value="<tag:message_token />" />
-<input type="hidden" name="mailbox" value="<tag:mailbox />" />
-<input type="hidden" name="thismailbox" value="<tag:thismailbox />" />
-<input type="hidden" name="start" value="<tag:start />" />
-<input type="hidden" name="uid" value="<tag:uid />" />
-<input type="hidden" id="newMbox" name="newMbox" />
-<input type="hidden" name="flag" />
-<h1 class="header">
- <tag:label /> <span style="unicode-bidi: embed"><tag:msg_count /></span> <tag:status />
-</h1>
+ <tag:form_input />
+ <input type="hidden" id="targetMbox" name="targetMbox" />
+ <input type="hidden" id="actionID" name="actionID" />
+ <input type="hidden" id="message_token" name="message_token" value="<tag:message_token />" />
+ <input type="hidden" name="mailbox" value="<tag:mailbox />" />
+ <input type="hidden" name="thismailbox" value="<tag:thismailbox />" />
+ <input type="hidden" name="start" value="<tag:start />" />
+ <input type="hidden" name="uid" value="<tag:uid />" />
+ <input type="hidden" id="newMbox" name="newMbox" />
+ <input type="hidden" name="flag" />
+
+ <h1 class="header">
+  <tag:label />
+  <span style="unicode-bidi: embed"><tag:msg_count /></span>
+  <tag:status />
+ </h1>
index f0bc114..8b3e1ec 100644 (file)
@@ -9,6 +9,6 @@
 }
 
 /* Message body styling. */
-#messageBody {
+.messageBody {
     padding: 2px;
 }
index 73f48db..1760a9f 100644 (file)
@@ -99,6 +99,10 @@ table.mboxactions {
 }
 
 /* Navbar action styling. */
+table.navbaractions {
+    border-collapse: collapse;
+    width: 100%;
+}
 ul.msgactions, ul.msgactions ul {
     list-style: none;
 }
@@ -175,6 +179,11 @@ div.msgActions, #fmanager div.folderActions {
     padding-left: 15px;
 }
 
+/* Message headers styling. */
+#msgheaders table {
+    border-collapse: collapse;
+}
+
 /* Message body styling. */
 .messageBody {
     border-top: 1px solid #ccc;
@@ -419,8 +428,8 @@ td.msgheader {
     width: 100%;
 }
 .msgheader img {
-    vertical-align: middle;
-    padding: 1px 1px 1px 2px;
+    padding: 0 1px 0 2px;
+    vertical-align: bottom;
 }
 
 /* Contacts styles. */