From 3fa4338cb6d1f63b410250f91937c8d4775c728c Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Tue, 15 Sep 2009 08:02:57 +0000 Subject: [PATCH] Some updating of code. Will be update for a while now. svn: r13205 --- src/plugins/webreport/WebCal.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/WebCal.py index e18702c9b..0b4b12f6f 100644 --- a/src/plugins/webreport/WebCal.py +++ b/src/plugins/webreport/WebCal.py @@ -446,13 +446,13 @@ class WebCalReport(Report): # figure out number of rows nrows = get_num_of_rows(num_years, years_in_row) - # begin year division and table + # begin year division yearnav = Html("div", id="navigation") - year_table = Html("table") - for rows in range(0, nrows): - trow = Html("tr") + for row in range(0, (num_years // years_in_row)): + unordered = Html("ul") + yearnav += unordered cols = 1 while (cols <= years_in_row and cal_year <= self.end_year): url = '' @@ -467,7 +467,8 @@ class WebCalReport(Report): # Note. We use '/' here because it is a URL, not a OS dependent # pathname. - url = '/'.join(subdirs + [full_month_name]) + self.ext + url = os.path.join(subdirs, full_month_name) + self.ext +# url = '/'.join(subdirs + [full_month_name]) + self.ext # Figure out if we need
  • or just plain
  • cs = str(cal_year) == currentsection and 'class="CurrentSection"' or '' @@ -483,15 +484,6 @@ class WebCalReport(Report): # increase calendar year cal_year += 1 - # add unordered list to table row - trow += unordered - - # close row and add to table - year_table += trow - - # close table and add to year division - yearnav += year_table - # return yearnav to its caller return yearnav