* add contexttype, so the subst can precheck the context pointer for us, and bad...
[citadel.git] / webcit / summary.c
index a98e421e0a1f88b87e634abeaa92faad30261554..2752cbd3a752a0e5cccc0fd8a384558a16f830dc 100644 (file)
@@ -28,10 +28,10 @@ void output_date(void) {
  * \brief Dummy section
  */
 void dummy_section(void) {
-       svprintf("BOXTITLE", WCS_STRING, "(dummy section)");
-       do_template("beginbox");
+       svput("BOXTITLE", WCS_STRING, "(dummy section)");
+       do_template("beginbox", NULL);
        wprintf(_("(nothing)"));
-       do_template("endbox");
+       do_template("endbox", NULL);
 }
 
 
@@ -137,10 +137,11 @@ void server_info_section(void) {
        char message[512];
 
        snprintf(message, sizeof message,
-               _("You are connected to %s, running %s with %s, and located in %s.  Your system administrator is %s."),
+               _("You are connected to %s, running %s with %s, server build %s and located in %s.  Your system administrator is %s."),
                serv_info.serv_humannode,
                serv_info.serv_software,
                PACKAGE_STRING,
+               serv_info.serv_svn_revision,
                serv_info.serv_bbs_city,
                serv_info.serv_sysadm);
        escputs(message);
@@ -215,7 +216,7 @@ void summary_inner_div(void) {
        wprintf(_("Who's online now"));
        wprintf("</div><div class=\"boxcontent\">");    
        wprintf("<div id=\"who_inner\">");      
-       who_inner_div(); 
+       do_template("wholistsummarysection", NULL);
        wprintf("</div></div></div>");
        wprintf("</td>");
 
@@ -258,7 +259,7 @@ void summary(void) {
         wprintf("</h2></div>");
        wprintf("<ul class=\"room_actions\">\n");
        wprintf("<li class=\"start_page\">");
-       offer_start_page();
+       offer_start_page(NULL, 0, NULL, NULL, CTX_NONE);
         wprintf("</li></ul>");
         wprintf("</div>");
 
@@ -279,7 +280,7 @@ void summary(void) {
                "                            { method: 'get', frequency: 120 }  );      "
                " new Ajax.PeriodicalUpdater('calendar_inner', 'calendar_inner_html',           "
                "                            { method: 'get', frequency: 90 }  );       "
-               " new Ajax.PeriodicalUpdater('who_inner', 'who_inner_html',             "
+               " new Ajax.PeriodicalUpdater('do_template', 'template=wholistsummarysection',   "
                "                            { method: 'get', frequency: 30 }  );       "
                "</script>                                                              \n"
        );
@@ -287,5 +288,16 @@ void summary(void) {
        wDumpContent(1);
 }
 
+void 
+InitModule_SUMMARY
+(void)
+{
+       WebcitAddUrlHandler(HKEY("new_messages_html"), new_messages_section, AJAX);
+       WebcitAddUrlHandler(HKEY("tasks_inner_html"), tasks_section, AJAX);
+       WebcitAddUrlHandler(HKEY("calendar_inner_html"), calendar_section, AJAX);
+       WebcitAddUrlHandler(HKEY("mini_calendar"), ajax_mini_calendar, AJAX);
+       WebcitAddUrlHandler(HKEY("summary"), summary, 0);
+       WebcitAddUrlHandler(HKEY("summary_inner_div"), summary_inner_div, AJAX);
+}
 
 /*@}*/