From: Art Cancro Date: Sun, 22 Sep 2002 03:50:54 +0000 (+0000) Subject: * calendar_view.c: added. (This module will contain month/week/day views) X-Git-Tag: v7.86~6220 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=7d5481a6a8f63c5258d4972d5e7ebee63db7b179;p=citadel.git * calendar_view.c: added. (This module will contain month/week/day views) * Move "add new task" to below "DONE" label. This causes it to appear even when there are no existing tasks (messages) in the room. --- diff --git a/webcit/Makefile.in b/webcit/Makefile.in index c843bbff1..ec48965e6 100644 --- a/webcit/Makefile.in +++ b/webcit/Makefile.in @@ -28,13 +28,13 @@ webserver: webserver.o context_loop.o tools.o \ roomops.o messages.o userlist.o paging.o sysmsgs.o useredit.o \ vcard.o vcard_edit.o preferences.o html2html.o listsub.o \ mime_parser.o graphics.o netconf.o siteconfig.o subst.o \ - calendar.o calendar_tools.o $(LIBOBJS) + calendar.o calendar_tools.o calendar_view.o $(LIBOBJS) $(CC) webserver.o context_loop.o tools.o cookie_conversion.o \ webcit.o auth.o tcp_sockets.o mainmenu.o serv_func.o who.o listsub.o \ roomops.o messages.o userlist.o paging.o sysmsgs.o useredit.o \ locate_host.o siteconfig.o subst.o vcard.o vcard_edit.o floors.o \ mime_parser.o graphics.o netconf.o preferences.o html2html.o \ - summary.o calendar.o calendar_tools.o \ + summary.o calendar.o calendar_tools.o calendar_view.o \ $(LIBOBJS) $(LIBS) -o webserver .c.o: diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c new file mode 100644 index 000000000..148786a0a --- /dev/null +++ b/webcit/calendar_view.c @@ -0,0 +1,48 @@ +/* + * $Id$ + * + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "webcit.h" +#include "webserver.h" + +#ifndef HAVE_ICAL_H + +void do_calendar_view(void) { /* stub for non-libical builds */ + wprintf("
Calendar view not available

\n"); +} + +#else /* HAVE_ICAL_H */ + +/****************************************************************************/ + +/* + * We loaded calendar events into memory during a pass through the + * messages in this room ... now display them. + */ +void do_calendar_view(void) { + wprintf("
Calendar view not available

\n"); +} + + +#endif /* HAVE_ICAL_H */ diff --git a/webcit/messages.c b/webcit/messages.c index f6a88c416..91e282d71 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -837,10 +837,7 @@ void readloop(char *oper) } if (is_tasks) { - wprintf("\n" - "" - "Add new task\n" - ); + wprintf("\n"); } /* Bump these because although we're thinking in zero base, the user @@ -950,7 +947,18 @@ void readloop(char *oper) } if (is_summary) wprintf("\n"); -DONE: wDumpContent(1); +DONE: + if (is_tasks) { + wprintf("" + "Add new task\n" + ); + } + + if (is_calendar) { + do_calendar_view(); + } + + wDumpContent(1); } diff --git a/webcit/webcit.h b/webcit/webcit.h index 4f24c5cad..edcf5e43a 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -348,6 +348,7 @@ ssize_t write(int fd, const void *buf, size_t count); void cal_process_attachment(char *part_source); void display_calendar(long msgnum); void display_task(long msgnum); +void do_calendar_view(void); #ifdef HAVE_ICAL_H void display_edit_task(void);