From 6062245f43444981a00a104bcd79c059567fb038 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 2 Feb 2009 22:27:43 +0000 Subject: [PATCH] * Added another conditional for presence/absence of Subject: header * Also moved Subject above the buttons, this allows them to display on the same line when possible --- webcit/msg_renderers.c | 6 ++++++ webcit/static/t/view_message.html | 14 ++------------ webcit/static/t/view_message_print.html | 8 +++----- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index 0280df6a1..9a2aa2f3d 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -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); diff --git a/webcit/static/t/view_message.html b/webcit/static/t/view_message.html index fd13a57a8..33f8f7e8e 100644 --- a/webcit/static/t/view_message.html +++ b/webcit/static/t/view_message.html @@ -11,28 +11,18 @@ onMouseOut=document.getElementById("msg").style.visibility="hidden ***
- - - - + +

-

diff --git a/webcit/static/t/view_message_print.html b/webcit/static/t/view_message_print.html index a96ab8291..77224cc0d 100644 --- a/webcit/static/t/view_message_print.html +++ b/webcit/static/t/view_message_print.html @@ -11,12 +11,10 @@ @ *** -
- +
+ +

- -

-
-- 2.39.2