]> code.citadel.org Git - citadel.git/blobdiff - webcit/who.c
fix the who is online display
[citadel.git] / webcit / who.c
index 3ac20bc3865a075d45d7f1c9c17813056ca80d8d..d1e05518f925a63fc2d399294c7932c303e816db 100644 (file)
@@ -105,7 +105,7 @@ void who_inner_div(void) {
                        /** room */
                        wprintf("</td>\n\t<td>");
                        escputs(room);
-                       if (strlen(realroom) > 0) {
+                       if (!IsEmptyStr(realroom) ) {
                                wprintf("<br /><i>");
                                escputs(realroom);
                                wprintf("</i>");
@@ -114,7 +114,7 @@ void who_inner_div(void) {
 
                        /** hostname */
                        escputs(host);
-                       if (strlen(realhost) > 0) {
+                       if (!IsEmptyStr(realhost)) {
                                wprintf("<br /><i>");
                                escputs(realhost);
                                wprintf("</i>");
@@ -143,32 +143,35 @@ void who(void)
        );
 
        wprintf("<div id=\"banner\">\n");
-       wprintf("<table class=\"who_banner\"><tr><td>");
-       wprintf("<img src=\"static/usermanag_48x.gif\" alt=\" \" "
-               "align=middle "
-               ">");
-       wprintf("<span class=\"titlebar\"> ");
-
+       wprintf("<div class=\"room_banner\">");
+       wprintf("<img src=\"static/usermanag_48x.gif\">");
+       wprintf("<h1>");
        snprintf(title, sizeof title, _("Users currently on %s"), serv_info.serv_humannode);
        escputs(title);
-
-       wprintf("</span></td><td align=right>");
+       wprintf("</h1></div>");
+       wprintf("<ul class=\"room_actions\">\n");
+       wprintf("<li class=\"start_page\">");
        offer_start_page();
-       wprintf("</td></tr></table>\n");
-       wprintf("</div>\n");
-
-       wprintf("<div id=\"content\" class=\"who_is_online\">\n");
+       wprintf("</li></ul>");
+       wprintf("</div>");
 
-       wprintf("<div style=\"display:inline\" id=\"fix_scrollbar_bug\">");
+       wprintf("<div id=\"content\" class=\"fix_scrollbar_bug who_is_online\">\n");
+       wprintf("<div class=\"box\">");
+       wprintf("<div class=\"boxlabel\">");    
+       snprintf(title, sizeof title, _("Users currently on %s"), serv_info.serv_humannode);
+       escputs(title);
+       wprintf("</div>");      
+       wprintf("<div class=\"boxcontent\">");
+        wprintf("<div id=\"who_inner\" >");
        who_inner_div();
-       wprintf("</div>\n");
+       wprintf("</div>");
 
-       wprintf("<div id=\"instructions\" align=center>");
+       wprintf("<div class=\"instructions\">");
        wprintf(_("Click on a name to read user info.  Click on %s "
                "to send an instant message to that user."),
                "<img align=\"middle\" src=\"static/citadelchat_16x.gif\" alt=\"(p)\" border=\"0\">"
        );
-       wprintf("</div>\n");
+       wprintf("</div></div>\n");
 
        /**
         * JavaScript to make the ajax refresh happen:
@@ -179,7 +182,7 @@ void who(void)
         */
        wprintf(
                "<script type=\"text/javascript\">                                      "
-               " new Ajax.PeriodicalUpdater('fix_scrollbar_bug', 'who_inner_html',     "
+               " new Ajax.PeriodicalUpdater('who_inner', 'who_inner_html',     "
                "                            { method: 'get', frequency: 30 }  );       "
                "</script>                                                              \n"
        );
@@ -206,19 +209,19 @@ void edit_me(void)
 {
        char buf[SIZ];
 
-       if (strlen(bstr("change_room_name_button")) > 0) {
+       if (!IsEmptyStr(bstr("change_room_name_button"))) {
                serv_printf("RCHG %s", bstr("fake_roomname"));
                serv_getln(buf, sizeof buf);
                http_redirect("who");
-       } else if (strlen(bstr("change_host_name_button")) > 0) {
+       } else if (!IsEmptyStr(bstr("change_host_name_button"))) {
                serv_printf("HCHG %s", bstr("fake_hostname"));
                serv_getln(buf, sizeof buf);
                http_redirect("who");
-       } else if (strlen(bstr("change_user_name_button")) > 0) {
+       } else if (!IsEmptyStr(bstr("change_user_name_button"))) {
                serv_printf("UCHG %s", bstr("fake_username"));
                serv_getln(buf, sizeof buf);
                http_redirect("who");
-       } else if (strlen(bstr("cancel_button")) > 0) {
+       } else if (!IsEmptyStr(bstr("cancel_button"))) {
                http_redirect("who");
        } else {
                output_headers(1, 1, 0, 0, 0, 0);