From: Art Cancro Date: Tue, 6 Jan 2009 04:14:37 +0000 (+0000) Subject: * Restored the original date/time display behavior by replacing DATESTR template... X-Git-Tag: v7.86~1650 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=0fd9be6fb04505f18958093da7c60c72895eeeb7 * Restored the original date/time display behavior by replacing DATESTR template variable with DATEBRIEF (for summary views) and DATEFULL (for the full date/time to be displayed in messages). --- diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index 6ac25d56a..a12407056 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -410,13 +410,20 @@ void examine_time(message_summary *Msg, StrBuf *HdrLine, StrBuf *FoundCharset) { Msg->date = StrTol(HdrLine); } -void tmplput_MAIL_SUMM_DATE_STR(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType) +void tmplput_MAIL_SUMM_DATE_BRIEF(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType) { char datebuf[64]; message_summary *Msg = (message_summary*) Context; webcit_fmt_date(datebuf, Msg->date, 1); StrBufAppendBufPlain(Target, datebuf, -1, 0); } +void tmplput_MAIL_SUMM_DATE_FULL(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType) +{ + char datebuf[64]; + message_summary *Msg = (message_summary*) Context; + webcit_fmt_date(datebuf, Msg->date, 0); + StrBufAppendBufPlain(Target, datebuf, -1, 0); +} void tmplput_MAIL_SUMM_DATE_NO(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Context, int ContextType) { message_summary *Msg = (message_summary*) Context; @@ -1070,7 +1077,8 @@ InitModule_MSGRENDERERS NULL,NULL, CTX_MAILSUM, CTX_NONE, IT_NOFLAG); /* render parts of the message struct */ - RegisterNamespace("MAIL:SUMM:DATESTR", 0, 0, tmplput_MAIL_SUMM_DATE_STR, CTX_MAILSUM); + RegisterNamespace("MAIL:SUMM:DATEBRIEF", 0, 0, tmplput_MAIL_SUMM_DATE_BRIEF, CTX_MAILSUM); + RegisterNamespace("MAIL:SUMM:DATEFULL", 0, 0, tmplput_MAIL_SUMM_DATE_FULL, CTX_MAILSUM); RegisterNamespace("MAIL:SUMM:DATENO", 0, 0, tmplput_MAIL_SUMM_DATE_NO, CTX_MAILSUM); RegisterNamespace("MAIL:SUMM:N", 0, 0, tmplput_MAIL_SUMM_N, CTX_MAILSUM); RegisterNamespace("MAIL:SUMM:FROM", 0, 2, tmplput_MAIL_SUMM_FROM, CTX_MAILSUM); diff --git a/webcit/static/t/section_mailsummary.html b/webcit/static/t/section_mailsummary.html index 15e0fef87..31d78df07 100644 --- a/webcit/static/t/section_mailsummary.html +++ b/webcit/static/t/section_mailsummary.html @@ -1,5 +1,5 @@ " onMouseDown="CtdlMoveMsgMouseDown(event,)"> - + diff --git a/webcit/static/t/section_mailsummary_m.html b/webcit/static/t/section_mailsummary_m.html index 8b96757ce..350954e97 100644 --- a/webcit/static/t/section_mailsummary_m.html +++ b/webcit/static/t/section_mailsummary_m.html @@ -1,5 +1,5 @@
;" onClick="CtdlLoadMsgMouseDown(event,)"> -
+
diff --git a/webcit/static/t/view_message.html b/webcit/static/t/view_message.html index e384c0aa2..aef8a329e 100644 --- a/webcit/static/t/view_message.html +++ b/webcit/static/t/view_message.html @@ -3,7 +3,7 @@ onMouseOver=document.getElementById("msg").style.visibility="visib 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 f6de22605..8051c8b3f 100644 --- a/webcit/static/t/view_message_print.html +++ b/webcit/static/t/view_message_print.html @@ -3,7 +3,7 @@
+
*** diff --git a/webcit/static/t/view_message_replyquote.html b/webcit/static/t/view_message_replyquote.html index 56ee8bb7f..452dc8c7c 100644 --- a/webcit/static/t/view_message_replyquote.html +++ b/webcit/static/t/view_message_replyquote.html @@ -1,6 +1,6 @@
- + <> ***