Minor adjustments to address book view -- fill in
authorArt Cancro <ajc@citadel.org>
Thu, 21 Aug 2008 02:17:07 +0000 (02:17 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 21 Aug 2008 02:17:07 +0000 (02:17 +0000)
missing columns at end if the total number of contacts
is not divisible by 4

webcit/messages.c

index 360be933d45a1266973369940d13d703a683331e..0c11d6b1825dd3d4c203fe49a161536a0b3c4510 100644 (file)
@@ -2123,10 +2123,18 @@ void do_addrbook_view(struct addrbookent *addrbook, int num_ab) {
                ++displayed;
        }
 
+       /* Placeholders for empty columns at end */
+       if ((num_ab % 4) != 0) {
+               for (i=0; i<(4-(num_ab % 4)); ++i) {
+                       wprintf("<td>&nbsp;</td>");
+               }
+       }
+
        wprintf("</tr></table>\n");
        end_tab((num_pages-1), num_pages);
 
-       begin_tab(num_pages, num_pages);        /* There are no submit buttons so this is empty */
+       begin_tab(num_pages, num_pages);
+       /* FIXME there ought to be something here */
        end_tab(num_pages, num_pages);
 
        for (i=0; i<num_pages; ++i) {