From 8462066efe5f07658bff01d9e89144b27486af44 Mon Sep 17 00:00:00 2001 From: ajc 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 git-svn-id: svn://uncensored.citadel.org/trunk@7051 c9418f8e-8c02-0410-9258-ad310909226a --- 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 0280df6a..9a2aa2f3 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 fd13a57a..33f8f7e8 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 a96ab829..77224cc0 100644 --- a/webcit/static/t/view_message_print.html +++ b/webcit/static/t/view_message_print.html @@ -11,12 +11,10 @@ @ *** -
- +
+ +

- -

-
-- 2.11.4.GIT