]> code.citadel.org Git - citadel.git/commitdiff
* Add "Tentative" accept button
authorArt Cancro <ajc@citadel.org>
Sat, 19 Oct 2002 17:10:14 +0000 (17:10 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 19 Oct 2002 17:10:14 +0000 (17:10 +0000)
* Only display Accept/Tentative/Decline button when method=REQUEST

webcit/ChangeLog
webcit/calendar.c

index 96be6dea2579aad414fddde19ebc408abff4a2c5..a2619e92ba0f7f02d182d1a8cbdb60e18066a4bf 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
+Revision 400.41  2002/10/19 17:10:14  ajc
+* Add "Tentative" accept button
+* Only display Accept/Tentative/Decline button when method=REQUEST
+
 Revision 400.40  2002/10/19 04:16:37  ajc
 * Save an incoming meeting request into the user's calendar.
 
@@ -1077,3 +1081,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 4410aed9d6abbd93d0a709aa8ec184f5cdb35361..64f977d6fee1573c64c708ee0c185a33a31d2b8f 100644 (file)
@@ -78,7 +78,7 @@ void cal_process_object(icalcomponent *cal,
 ) {
        icalcomponent *c;
        icalproperty *method = NULL;
-       icalproperty_method the_method;
+       icalproperty_method the_method = ICAL_METHOD_NONE;
        icalproperty *p;
        struct icaltimetype t;
        time_t tt;
@@ -105,6 +105,15 @@ void cal_process_object(icalcomponent *cal,
                                </TD></TR>\n"
                        );
                        break;
+                   case ICAL_METHOD_PUBLISH:
+                       wprintf("<TR><TD COLSPAN=2>\n"
+                               "<IMG ALIGN=CENTER "
+                               "SRC=\"/static/vcalendar.gif\">"
+                               "&nbsp;&nbsp;"  
+                               "<B>Published event</B>
+                               </TD></TR>\n"
+                       );
+                       break;
                    default:
                        wprintf("<TR><TD COLSPAN=2>"
                                "I don't know what to do with this.</TD></TR>"
@@ -171,8 +180,8 @@ void cal_process_object(icalcomponent *cal,
                cal_process_object(c, recursion_level+1, msgnum, cal_partnum);
        }
 
-       /* Trailing HTML for the display of this object */
-       if (recursion_level == 0) {
+       /* If this is a REQUEST, display the Accept/Decline buttons */
+       if (the_method == ICAL_METHOD_REQUEST) {
                wprintf("<TR><TD COLSPAN=2>"
                        "<FORM METHOD=\"GET\" "
                        "ACTION=\"/respond_to_request\">\n"
@@ -189,10 +198,15 @@ void cal_process_object(icalcomponent *cal,
                        "<INPUT TYPE=\"hidden\" NAME=\"cal_partnum\" "
                                "VALUE=\"%s\">"
                        "</FORM>"
-                       "</TD></TR></TABLE></CENTER>\n",
+                       "</TD></TR>\n",
                        msgnum, cal_partnum
                );
        }
+
+       /* Trailing HTML for the display of this object */
+       if (recursion_level == 0) {
+               wprintf("</TD></TR></TABLE></CENTER>\n");
+       }
 }