X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fsummary.c;h=e8072e5fd8854057199197e83fdc67cec5bdf0fd;hb=d8abfc1ab880919a13cfc012427eab7ee0363334;hp=b7b9084b59467d1fe717aad59bcfa7ffd3744ce1;hpb=e23cf6db4aba7a0831388faab91249c1d086f082;p=citadel.git diff --git a/webcit/summary.c b/webcit/summary.c index b7b9084b5..e8072e5fd 100644 --- a/webcit/summary.c +++ b/webcit/summary.c @@ -47,13 +47,11 @@ void new_messages_section(void) { int number_of_rooms_to_check; char *rooms_to_check = "Mail|Lobby"; - svprintf("BOXTITLE", WCS_STRING, _("Messages")); - do_template("beginbox"); number_of_rooms_to_check = num_tokens(rooms_to_check, '|'); if (number_of_rooms_to_check == 0) return; - wprintf("\n"); + wprintf("
\n"); for (i=0; i\n", + wprintf("\n", extract_int(&buf[4], 1), extract_int(&buf[4], 2) ); } } - wprintf("
"); escputs(room); - wprintf("%d/%d
%d/%d
\n"); - do_template("endbox"); - -} - + wprintf("\n"); -/** - * \brief Wholist section - */ -void wholist_section(void) { - char buf[SIZ]; - char user[SIZ]; - - svprintf("BOXTITLE", WCS_STRING, _("Who's online now")); - do_template("beginbox"); - serv_puts("RWHO"); - serv_getln(buf, sizeof buf); - if (buf[0] == '1') while(serv_getln(buf, sizeof buf), strcmp(buf, "000")) { - extract_token(user, buf, 1, '|', sizeof user); - escputs(user); - wprintf("
\n"); - } - do_template("endbox"); } @@ -106,8 +83,6 @@ void tasks_section(void) { int i; #endif - svprintf("BOXTITLE", WCS_STRING, _("Tasks")); - do_template("beginbox"); #ifdef WEBCIT_WITH_CALENDAR_SERVICE gotoroom("_TASKS_"); if (WC->wc_view != VIEW_TASKS) { @@ -124,18 +99,17 @@ void tasks_section(void) { } else { for (i=0; imsgarr[i]); + display_task(WC->msgarr[i], 0); } } calendar_summary_view(); #else /* WEBCIT_WITH_CALENDAR_SERVICE */ - wprintf(""); + wprintf(""); wprintf(_("(This server does not support task lists)")); - wprintf("\n"); + wprintf("\n"); #endif /* WEBCIT_WITH_CALENDAR_SERVICE */ - do_template("endbox"); } @@ -148,8 +122,6 @@ void calendar_section(void) { int i; #endif - svprintf("BOXTITLE", WCS_STRING, _("Today on your calendar")); - do_template("beginbox"); #ifdef WEBCIT_WITH_CALENDAR_SERVICE gotoroom("_CALENDAR_"); if ( (WC->wc_view != VIEW_CALENDAR) && (WC->wc_view != VIEW_CALBRIEF) ) { @@ -166,17 +138,16 @@ void calendar_section(void) { } else { for (i=0; imsgarr[i]); + display_calendar(WC->msgarr[i], 0); } calendar_summary_view(); } #else /* WEBCIT_WITH_CALENDAR_SERVICE */ - wprintf(""); + wprintf(""); wprintf(_("(This server does not support calendars)")); - wprintf("\n"); + wprintf("\n"); #endif /* WEBCIT_WITH_CALENDAR_SERVICE */ - do_template("endbox"); } /** @@ -185,23 +156,22 @@ void calendar_section(void) { void server_info_section(void) { char message[512]; - svprintf("BOXTITLE", WCS_STRING, _("About this server")); - do_template("beginbox"); - snprintf(message, sizeof message, _("You are connected to %s, running %s with %s, and located in %s. Your system administrator is %s."), serv_info.serv_humannode, serv_info.serv_software, - SERVER, + PACKAGE_STRING, serv_info.serv_bbs_city, serv_info.serv_sysadm); escputs(message); - do_template("endbox"); } /** * \brief summary of inner div???? */ + + + void summary_inner_div(void) { /** * Now let's do three columns of crap. All portals and all groupware @@ -212,34 +182,81 @@ void summary_inner_div(void) { */ wprintf("
" - ""); + "
" + ""); /** * Column One */ wprintf(""); /** - * Column Two + * Column Two */ - wprintf(""); /** * Column Three */ - wprintf(""); + + wprintf(""); + + /** + * Row Two - Column One + */ + wprintf(""); + + /** + * Row Two - Column Two + */ + wprintf(""); + /** * End of columns */ - wprintf("
"); - wholist_section(); + wprintf("
"); + wprintf("
"); + wprintf(_("Messages")); + wprintf("
"); + wprintf("
"); + new_messages_section(); + wprintf("
"); + wprintf("
"); - server_info_section(); - wprintf("
"); + wprintf("
"); + wprintf("
"); + wprintf("
"); + wprintf(_("Tasks")); + wprintf("
"); + wprintf("
"); tasks_section(); + wprintf("
"); + wprintf("
"); - new_messages_section(); - wprintf("
"); + wprintf("
"); + wprintf("
"); + wprintf("
"); + wprintf(_("Today on your calendar")); + wprintf("
"); + wprintf("
"); calendar_section(); + wprintf("
"); + wprintf("
"); + wprintf("
"); + wprintf("
"); + wprintf(_("Who's online now")); + wprintf("
"); + wprintf("
"); + who_inner_div(); + wprintf("
"); + wprintf("
"); + wprintf("
"); + wprintf("
"); + wprintf(_("About this server")); + wprintf("
"); + wprintf("
"); + server_info_section(); + wprintf("
"); + wprintf("
"); + wprintf(""); } @@ -251,33 +268,39 @@ void summary(void) { output_headers(1, 1, 2, 0, 0, 0); wprintf("
\n"); - wprintf("" - "
" - "" - ); - - snprintf(title, sizeof title, _("Summary page for %s"), WC->wc_fullname); - escputs(title); - wprintf("\n"); - wprintf(""); - output_date(); - wprintf("
"); + wprintf("
"); + wprintf(""); + wprintf("

"); + snprintf(title, sizeof title, _("Summary page for %s"), WC->wc_fullname); + escputs(title); + wprintf("

"); + output_date(); + wprintf("

"); + wprintf("
    \n"); + wprintf("
  • "); offer_start_page(); - wprintf("
\n"); + wprintf(""); + wprintf("
"); /** * You guessed it ... we're going to refresh using ajax. * In the future we might consider updating individual sections of the summary * instead of the whole thing. */ - wprintf("
\n
\n"); + wprintf("
\n"); summary_inner_div(); wprintf("
\n"); wprintf( " \n" );