* by feivel: Display week of year; addresses bug 494
authorWilfried Göesgens <willi@citadel.org>
Sun, 18 Oct 2009 16:19:11 +0000 (16:19 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 18 Oct 2009 16:19:11 +0000 (16:19 +0000)
webcit/calendar_view.c
webcit/static/webcit.css

index bee159b82f24cb79fb67d7246e21aec32c86dfc3..5960ff5328ecd2f69f40cf796596cd43af5b5dfb 100644 (file)
@@ -573,6 +573,7 @@ void calendar_month_view(int year, int month, int day) {
        /* Inner table (the real one) */
        wprintf("<table width=100%% border=0 cellpadding=1 cellspacing=1 "
                "bgcolor=#204B78 id=\"inner_month\"><tr>");
+       wprintf("<th align=center width=2%%></th>");
        colheader_time = thetime;
        for (i=0; i<7; ++i) {
                colheader_time = thetime + (i * 86400) ;
@@ -591,7 +592,9 @@ void calendar_month_view(int year, int month, int day) {
 
                /* Before displaying the first day of the week, start a new row */
                if ((i % 7) == 0) {
-                       wprintf("<tr>");
+                       wprintf("<tr><td class=\"week_of_year\">");
+                       wc_strftime(colheader_label, sizeof colheader_label, "%V", &tm);
+                        wprintf("%s ", colheader_label);
                }
 
                wprintf("<td class=\"cal%s\"><div class=\"day\">",
index ab3a16c9e04b2999ff7cf514d145cb8e8710e581..b6e78b0660c5c005e5061ea067c3c194a0699368 100644 (file)
@@ -435,6 +435,11 @@ var sub {
        background-color: #204B78;
 }
 
+.week_of_year {
+       background-color: #e1e1e1;
+       font-size: 70%; 
+}
+
 .day {
        font-weight: 700;
 }