* add message count. Thanks for TrilCat pointing out that we've lost it.
authorWilfried Göesgens <willi@citadel.org>
Thu, 5 Feb 2009 21:52:13 +0000 (21:52 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 5 Feb 2009 21:52:13 +0000 (21:52 +0000)
webcit/msg_renderers.c
webcit/static/t/msg_listselector_bottom.html
webcit/static/t/msg_listselector_top.html

index 5688bc181f3908aa20833a86992d6c92c52be07c..5112aba61955429c55416588275b9fa99c34b6cc 100644 (file)
@@ -420,6 +420,12 @@ void tmplput_MAIL_SUMM_ALLRCPT(StrBuf *Target, WCTemplputParams *TP)
 }
 
 
+
+void tmplput_SUMM_COUNT(StrBuf *Target, WCTemplputParams *TP)
+{
+       StrBufAppendPrintf(Target, "%d", GetCount( WC->summ));
+}
+
 HashList *iterate_get_mailsumm_All(StrBuf *Target, WCTemplputParams *TP)
 {
        return WC->summ;
@@ -1122,6 +1128,7 @@ InitModule_MSGRENDERERS
                         groupchange_sender,
                         CTX_MAILSUM);
 
+       RegisterNamespace("SUMM:COUNT", 0, 0, tmplput_SUMM_COUNT, CTX_NONE);
        /* iterate over all known mails in WC->summ */
        RegisterIterator("MAIL:SUMM:MSGS", 0, NULL, iterate_get_mailsumm_All,
                         NULL,NULL, CTX_MAILSUM, CTX_NONE, IT_NOFLAG);
index 20c653137c84f59f1d0720814351a3cbd5d2a5fc..49cbe68fc656bfd93bd33249bc3ac5c902897d75 100644 (file)
@@ -4,7 +4,7 @@
        OnChange="location.href=msgomaticbottom.whichones.options[selectedIndex].value">
 <?CONTEXTSTR>
 </select>
-
+<?_("of")> <?SUMM:COUNT> <?_("messages")>
 <input type="radio" name="direction" value="" 
   OnChange="location.href='<?URLPART(0)>?SortBy=date&SortOrder=1'"
   <?%("COND:BSTR", 1, "SortOrder", 1, "checked", "")>
index 3f4709b3cce367d0ff4b7dfcb7b2a3163816f585..bf0fd0377c822461667410441bb2e19fe663e322 100644 (file)
@@ -4,7 +4,7 @@
        OnChange="location.href=msgomatictop.whichones.options[selectedIndex].value">
 <?CONTEXTSTR>
 </select>
-
+<?_("of")> <?SUMM:COUNT> <?_("messages")>
 <input type="radio" name="direction" value="" 
   OnChange="location.href='<?URLPART(0)>?SortBy=date&SortOrder=1'"
   <?%("COND:BSTR", 1, "SortOrder", 1, "checked", "")>