]> code.citadel.org Git - citadel.git/commitdiff
* Tasks view now uses the same buffer/dump logic as the calendar views, so
authorArt Cancro <ajc@citadel.org>
Tue, 3 Aug 2004 03:55:40 +0000 (03:55 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 3 Aug 2004 03:55:40 +0000 (03:55 +0000)
  we can sort them by due date and do a prettier display.  (Only the logic is
  changed so far.  The prettier display is forthcoming.)

webcit/ChangeLog
webcit/calendar.c
webcit/calendar_view.c
webcit/messages.c
webcit/static/roombanner.html
webcit/webcit.h

index 98fe467a22edfd9adb07afd0e46c78b9717ed6e3..a2a53c814c2a503d0d8f59ec23dded6aa5f96027 100644 (file)
@@ -1,4 +1,9 @@
 $Log$
+Revision 522.20  2004/08/03 03:55:37  ajc
+* Tasks view now uses the same buffer/dump logic as the calendar views, so
+  we can sort them by due date and do a prettier display.  (Only the logic is
+  changed so far.  The prettier display is forthcoming.)
+
 Revision 522.19  2004/07/21 02:57:09  ajc
 * Internet Configuration screen looks a little neater now
 
@@ -1989,3 +1994,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index bc1de49c6023d6f7baed68036a14700f3bf5631e..f1f23b7aaaef630fc35552761523bf5cbdeaff20 100644 (file)
@@ -482,23 +482,6 @@ void display_individual_cal(icalcomponent *cal, long msgnum) {
 
 
 
-/*
- * Display a task in the task list
- */
-void display_individual_task(icalcomponent *vtodo, long msgnum) {
-       icalproperty *p;
-
-       p = icalcomponent_get_first_property(vtodo, ICAL_SUMMARY_PROPERTY);
-       wprintf("<A HREF=\"/display_edit_task?msgnum=%ld&taskrm=", msgnum);
-       urlescputs(WC->wc_roomname);
-       wprintf("\">");
-       if (p != NULL) {
-               escputs((char *)icalproperty_get_comment(p));
-       }
-       wprintf("</A><BR>\n");
-}
-
-
 /*
  * Display a task by itself (for editing)
  *
@@ -805,7 +788,7 @@ void display_calendar(long msgnum) {
 void display_task(long msgnum) {
        display_using_handler(msgnum, "text/calendar",
                                ICAL_VTODO_COMPONENT,
-                               display_individual_task);
+                               display_individual_cal);
 }
 
 void display_edit_task(void) {
index 9c273e386670b74ec80c3af5c63262def4e88029..70c4d537daec5ae9a8f8a5b2d5f39a63d179bb02 100644 (file)
@@ -32,6 +32,10 @@ void do_calendar_view(void) {        /* stub for non-libical builds */
        wprintf("<CENTER><I>Calendar view not available</I></CENTER><BR>\n");
 }
 
+void do_tasks_view(void) {     /* stub for non-libical builds */
+       wprintf("<CENTER><I>Tasks view not available</I></CENTER><BR>\n");
+}
+
 #else  /* WEBCIT_WITH_CALENDAR_SERVICE */
 
 /****************************************************************************/
@@ -578,4 +582,32 @@ void do_calendar_view(void) {
 
 }
 
+
+void do_tasks_view(void) {
+       int i;
+       icalproperty *p;
+
+       if (WC->num_cal) for (i=0; i<(WC->num_cal); ++i) {
+               p = icalcomponent_get_first_property(WC->disp_cal[i],
+                                                       ICAL_SUMMARY_PROPERTY);
+               wprintf("<A HREF=\"/display_edit_task?msgnum=%ld&taskrm=",
+                       WC->cal_msgnum[i] );
+               urlescputs(WC->wc_roomname);
+               wprintf("\">");
+               if (p != NULL) {
+                       escputs((char *)icalproperty_get_comment(p));
+               }
+               wprintf("</A><BR>\n");
+       }
+
+       wprintf("<BR><BR><A HREF=\"/display_edit_task?msgnum=0\">"
+               "Add new task</A>\n"
+       );
+
+
+       /* Free the list */
+       free_calendar_buffer();
+
+}
+
 #endif /* WEBCIT_WITH_CALENDAR_SERVICE */
index c9e0c5588aa1d0ec15c83ca6fb58a97f06bbcaea..e30cc1820cd3474f98e7b849cd09dc98e9987f5b 100644 (file)
@@ -1107,7 +1107,6 @@ void readloop(char *oper)
                is_tasks = 1;
                strcpy(cmd, "MSGS ALL");
                maxmsgs = 32767;
-               wprintf("<UL>");
        }
 
        nummsgs = load_msg_ptrs(cmd);
@@ -1215,10 +1214,6 @@ void readloop(char *oper)
                wprintf("</TABLE>\n");
        }
 
-       if (is_tasks) {
-               wprintf("</UL>\n");
-       }
-
        /* Bump these because although we're thinking in zero base, the user
         * is a drooling idiot and is thinking in one base.
         */
@@ -1331,9 +1326,7 @@ void readloop(char *oper)
 
 DONE:
        if (is_tasks) {
-               wprintf("<A HREF=\"/display_edit_task?msgnum=0\">"
-                       "Add new task</A>\n"
-               );
+               do_tasks_view();        /* Render the task list */
        }
 
        if (is_calendar) {
index 83a9d2e9d0faa714ca9f59e188581330cde1514f..562d60f9eaf4a590f7e854fd4b98df9cc8824035 100644 (file)
@@ -14,6 +14,8 @@
        </TD>
        <TD ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#444455">
                <?VIEWOMATIC>
+       </TD>
+       <TD ALIGN="RIGHT" VALIGN="TOP" BGCOLOR="#444455">
                <SPAN CLASS="room_banner_new_messages"><?NEWMSGS> new of <?TOTALMSGS> messages</SPAN>
                <BR>
                <SPAN CLASS="room_banner_start_page"><?START></SPAN>
index b3e99e71ef722da4962fb38d6dcf4f2441380d10..435bd1df8af7d225dbef83676c23164e4cccc6cf 100644 (file)
@@ -415,6 +415,7 @@ void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum);
 void display_calendar(long msgnum);
 void display_task(long msgnum);
 void do_calendar_view(void);
+void do_tasks_view(void);
 void free_calendar_buffer(void);
 void calendar_summary_view(void);
 int load_msg_ptrs(char *servcmd);