* Added another conditional for presence/absence of Subject: header
authorArt Cancro <ajc@citadel.org>
Mon, 2 Feb 2009 22:27:43 +0000 (22:27 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 2 Feb 2009 22:27:43 +0000 (22:27 +0000)
* Also moved Subject above the buttons, this allows them to display on the same line when possible

webcit/msg_renderers.c
webcit/static/t/view_message.html
webcit/static/t/view_message_print.html

index 0280df6a112307c21bdf14a28454881adc37c806..9a2aa2f3d0b4c2158faa9c4dc1453fdfb88ecaec 100644 (file)
@@ -403,6 +403,11 @@ int Conditional_MAIL_SUMM_TO(StrBuf *Target, WCTemplputParams *TP)
        message_summary *Msg = (message_summary*) CTX;
        return StrLength(Msg->to) != 0;
 }
+int Conditional_MAIL_SUMM_SUBJ(StrBuf *Target, WCTemplputParams *TP) 
+{
+       message_summary *Msg = (message_summary*) CTX;
+       return StrLength(Msg->subj) != 0;
+}
 void tmplput_MAIL_SUMM_ALLRCPT(StrBuf *Target, WCTemplputParams *TP)
 {
        message_summary *Msg = (message_summary*) CTX;
@@ -1143,6 +1148,7 @@ InitModule_MSGRENDERERS
        RegisterConditional(HKEY("COND:MAIL:SUMM:OTHERNODE"), 0, Conditional_MAIL_SUMM_OTHERNODE, CTX_MAILSUM);
        RegisterConditional(HKEY("COND:MAIL:ANON"), 0, Conditional_ANONYMOUS_MESSAGE, CTX_MAILSUM);
        RegisterConditional(HKEY("COND:MAIL:TO"), 0, Conditional_MAIL_SUMM_TO, CTX_MAILSUM);    
+       RegisterConditional(HKEY("COND:MAIL:SUBJ"), 0, Conditional_MAIL_SUMM_SUBJ, CTX_MAILSUM);        
 
        /* do we have mimetypes to iterate over? */
        RegisterConditional(HKEY("COND:MAIL:MIME:ATTACH"), 0, Conditional_MAIL_MIME_ALL, CTX_MAILSUM);
index fd13a57a8b8dcd9c65322cc39431e042794440d4..33f8f7e8e43bb979946be47795d99805ccdf5e9f 100644 (file)
@@ -11,28 +11,18 @@ onMouseOut=document.getElementById("msg<?MAIL:SUMM:N>").style.visibility="hidden
 <??("X", 1)>
  <?!("COND:MAIL:ANON", 4)>***<??("X", 4)>
  <?!("COND:MAIL:TO", 5)><?_("to")> <?MAIL:SUMM:TO("X")><?!("X", 5)><br/>
- <?!("COND:MAIL:SUMM:CCCC", 6)><?_("CC:")><?MAIL:SUMM:CCCC("X")><??("X", 6)>
-
-
-
+<?!("COND:MAIL:SUMM:CCCC", 6)><?_("CC:")><?MAIL:SUMM:CCCC("X")><??("X", 6)>
+<?!("COND:MAIL:SUBJ", 7)><p class="message_subject"><?_("Subject:")> <?MAIL:SUMM:SUBJECT></p><??("X", 7)>
  <p style="visibility: hidden;" id="msg<?MAIL:SUMM:N>" class="msgbuttons">
-
    <a href="display_enter
 ?recp=%22<?MAIL:SUMM:FROM("U")>%22%3C<?MAIL:SUMM:RFCA("U")>%3E&references=<?MAIL:SUMM:INREPLYTO("U")>%3C<?MAIL:SUMM:RFCA("U")>%3E&subject=<?MAIL:SUMM:SUBJECT("U", 0, "Re:%20", "Re:")>"><span>[</span><?_("Reply")><span>]</span></a> 
-
    <a href="display_enter?replyquote=<?MAIL:SUMM:N>&recp=%22<?MAIL:SUMM:FROM("U")>%22%3C<?MAIL:SUMM:RFCA("U")>%3E&references=<?MAIL:SUMM:INREPLYTO("U")>%3C<?MAIL:SUMM:RFCA("U")>%3E&subject=<?MAIL:SUMM:SUBJECT("U", 0, "Re:%%20", "Re:")>"><span>[</span><?_("ReplyQuoted")><span>]</span></a> 
-
    <a href="display_enter?fwdquote=<?MAIL:SUMM:N>&subject=<?MAIL:SUMM:SUBJECT("U", 0, "Fwd:%%20", "Fwd:")>"><span>[</span><?_("Forward")><span>]</span></a> 
-
    <a href="confirm_move_msg?msgid=<?MAIL:SUMM:N>"><span>[</span><?_("Move")><span>]</span></a> 
-
    <a href="delete_msg?msgid=<?MAIL:SUMM:N>" onclick="return confirm('<?_("Delete this message?")>');"><span>[</span><?_("Delete")><span>]</span> </a> 
-
    <a href="#" onclick="window.open('msgheaders/<?MAIL:SUMM:N>', 'headers<?MAIL:SUMM:N>', 'toolbar=no,location=no,directories=no,copyhistory=no,status=yes,scrollbars=yes,resizable=yes,width=600,height=400'); "><span>[</span><?_("Headers")><span>]</span></a>
-
    <a href="#" onclick="window.open('printmsg/<?MAIL:SUMM:N>', 'print<?MAIL:SUMM:N>', 'toolbar=no,location=no,directories=no,copyhistory=no,status=yes,scrollbars=yes,resizable=yes,width=600,height=400'); "><span>[</span><?_("Print")><span>]</span></a>
  </p>
- <p class="message_subject"><?_("Subject:")> <?MAIL:SUMM:SUBJECT></p>
 </div>
 <div class="message_content"><div>
 <?MAIL:BODY>
index a96ab8291e10c1438c4eaad4c28a075b97ac8bf8..77224cc0d5fd6782c78679a16c299f78c895e9c8 100644 (file)
 <??("COND:MAIL:SUMM:RFCA", 3)><??("X", 3)><?!("COND:MAIL:SUMM:OTHERNODE",3)> @ <?MAIL:SUMM:H_NODE><??("X",3)>
 <??("X", 1)>
  <?!("COND:MAIL:ANON", 4)>***<??("X", 4)>
- <?_("to")> <?MAIL:SUMM:TO("X")><br/>
- <?!("COND:MAIL:SUMM:CCCC", 5)><?_("CC:")><?MAIL:SUMM:CCCC("X")><??("X", 5)>
+ <?!("COND:MAIL:TO", 5)><?_("to")> <?MAIL:SUMM:TO("X")><?!("X", 5)><br/>
+<?!("COND:MAIL:SUMM:CCCC", 6)><?_("CC:")><?MAIL:SUMM:CCCC("X")><??("X", 6)>
+<?!("COND:MAIL:SUBJ", 7)><p class="message_subject"><?_("Subject:")> <?MAIL:SUMM:SUBJECT></p><??("X", 7)>
 </div>
-
-<p class="message_subject"><?_("Subject:")> <?MAIL:SUMM:SUBJECT></p>
-
 <div class="message_content"><div align="justify">
 <?MAIL:BODY>    
 </div>