HUGE PATCH. This moves all of mime_parser.c and all
[citadel.git] / webcit / calendar_view.c
index 9f8ec9950888531e1736c78d1b8eb780bb14ac4c..b5525b1beb5274d461db2a0b257f008fa628005d 100644 (file)
@@ -260,14 +260,11 @@ void calendar_month_view_display_events(int year, int month, int day)
 
                                wprintf("<font size=-1>"
                                        "<a href=\"display_edit_event?"
-                                       "msgnum=%ld&calview=%s&year=%s&month=%s&day=%s\""
+                                       "msgnum=%ld&calview=month&year=%d&month=%d&day=%d\""
                                        " btt_tooltext=\"",
                                        WC->disp_cal[i].cal_msgnum,
-                                       bstr("calview"),
-                                       bstr("year"),
-                                       bstr("month"),
-                                       bstr("day")
-                                       );
+                                       year, month, day
+                               );
 
                                wprintf("<i>%s</i> ", _("Summary:"));
                                escputs((char *)icalproperty_get_comment(p));
@@ -305,7 +302,7 @@ void calendar_month_view_display_events(int year, int month, int day)
                                                }
                                                else {
                                                        tt = icaltime_as_timet(t);
-                                                       fmt_date(buf, tt, 1);
+                                                       webcit_fmt_date(buf, tt, 1);
                                                        wprintf("<i>%s</i> %s<br>",
                                                                _("Starting date/time:"), buf);
                                                        
@@ -316,7 +313,7 @@ void calendar_month_view_display_events(int year, int month, int day)
                                                        if (q != NULL) {
                                                                t = icalproperty_get_dtend(q);
                                                                tt = icaltime_as_timet(t);
-                                                               fmt_date(buf, tt, 1);
+                                                               webcit_fmt_date(buf, tt, 1);
                                                                wprintf("<i>%s</i> %s<br>", _("Ending date/time:"), buf);
                                                        }
                                                        
@@ -422,12 +419,11 @@ void calendar_month_view_brief_events(time_t thetime, const char *daycolor) {
                                        minutes=difftime % 60;
                                        wprintf("<tr><td bgcolor='%s'>%i:%2i</td><td bgcolor='%s'>"
                                                        "<font size=-1>"
-                                                       "<a href=\"display_edit_event?msgnum=%ld&calview=%s&year=%s&month=%s&day=%s\">",
+                                                       "<a href=\"display_edit_event?msgnum=%ld&calview=calbrief&year=%s&month=%s&day=%s\">",
                                                        daycolor,
                                                        hours, minutes,
                                                        daycolor,
                                                        WC->disp_cal[i].cal_msgnum,
-                                                       bstr("calview"),
                                                        bstr("year"),
                                                        bstr("month"),
                                                        bstr("day")
@@ -543,7 +539,7 @@ void calendar_month_view(int year, int month, int day) {
                colheader_time = thetime + (i * 86400) ;
                localtime_r(&colheader_time, &colheader_tm);
                wc_strftime(colheader_label, sizeof colheader_label, "%A", &colheader_tm);
-               wprintf("<td align=center width=14%%>"
+               wprintf("<th align=center width=14%%>"
                        "<font color=\"#FFFFFF\">%s</font></th>", colheader_label);
 
        }
@@ -936,9 +932,9 @@ void calendar_day_view_display_events(time_t thetime,
                                         escputs((char *)icalproperty_get_comment(q));
                                         wprintf("<br />");
                                         }
-                                fmt_date(buf, event_tt, 1);
+                                webcit_fmt_date(buf, event_tt, 1);
                                 wprintf("<i>%s</i> %s<br>", _("Starting date/time:"), buf);
-                                fmt_date(buf, event_tte, 1);
+                                webcit_fmt_date(buf, event_tte, 1);
                                 wprintf("<i>%s</i> %s<br>", _("Ending date/time:"), buf);
                                 q = icalcomponent_get_first_property(Cal->cal,ICAL_DESCRIPTION_PROPERTY);
                                 if (q) {
@@ -1013,9 +1009,9 @@ void calendar_day_view_display_events(time_t thetime,
                                         escputs((char *)icalproperty_get_comment(q));
                                         wprintf("<br />");
                                         }
-                                fmt_date(buf, event_tt, 1);
+                                webcit_fmt_date(buf, event_tt, 1);
                                 wprintf("<i>%s</i> %s<br>", _("Starting date/time:"), buf);
-                                fmt_date(buf, event_tte, 1);
+                                webcit_fmt_date(buf, event_tte, 1);
                                 wprintf("<i>%s</i> %s<br>", _("Ending date/time:"), buf);
                                q = icalcomponent_get_first_property(Cal->cal,ICAL_DESCRIPTION_PROPERTY);
                                 if (q) {
@@ -1102,7 +1098,7 @@ void calendar_day_view(int year, int month, int day) {
                        "height: %dpx;          "       
                        "\" >                   "
                        "<a href=\"display_edit_event?msgnum=0"
-                       "&year=%d&month=%d&day=%d&hour=%d&minute=0\">",
+                       "&calview=day&year=%d&month=%d&day=%d&hour=%d&minute=0\">",
                        (hour * extratimeline ), extratimeline, 
                        year, month, day, hour
                );
@@ -1129,7 +1125,7 @@ void calendar_day_view(int year, int month, int day) {
                         "top: %dpx; left: 0px;  "
                         "height: %dpx;          "
                         "\" >                   "
-                        "<a href=\"display_edit_event?msgnum=0"
+                        "<a href=\"display_edit_event?msgnum=0&calview=day"
                         "&year=%d&month=%d&day=%d&hour=%d&minute=0\">",
                         gap + ((hour - daystart) * timeline ), timeline,
                         year, month, day, hour
@@ -1157,7 +1153,7 @@ void calendar_day_view(int year, int month, int day) {
                         "top: %dpx; left: 0px;  "
                         "height: %dpx;          "
                         "\" >                   "
-                        "<a href=\"display_edit_event?msgnum=0"
+                        "<a href=\"display_edit_event?msgnum=0&calview=day"
                         "&year=%d&month=%d&day=%d&hour=%d&minute=0\">",
                         gap + ((hour - dayend - 1) * extratimeline ), extratimeline,
                         year, month, day, hour
@@ -1484,7 +1480,7 @@ void do_tasks_view(void) {
                wprintf("</td>\n");
 
                due = get_task_due_date(WC->disp_cal[i].cal);
-               fmt_date(buf, due, 0);
+               webcit_fmt_date(buf, due, 0);
                wprintf("<td><font");
                if (due < time(NULL)) {
                        wprintf(" color=\"#FF0000\"");