From 10ea4333c420c88882112bbe8c7048d43a85e4cd Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Sun, 6 Dec 2015 18:46:02 +0100 Subject: [PATCH] 8946 : webcal : make the month name clickable in the year overview page --- gramps/plugins/webreport/webcal.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gramps/plugins/webreport/webcal.py b/gramps/plugins/webreport/webcal.py index 1e7fbdd6d..110535163 100644 --- a/gramps/plugins/webreport/webcal.py +++ b/gramps/plugins/webreport/webcal.py @@ -588,7 +588,7 @@ class WebCalReport(Report): navigation += container return navigation - def calendar_build(self, cal, year, month): + def calendar_build(self, cal, year, month, clickable=False): """ This does the work of building the calendar @@ -663,8 +663,14 @@ class WebCalReport(Report): thead = Html("thead") table += thead + if clickable: + name = th_txt + self.ext + url = name.lower() + linkable = Html("a", th_txt, href = url, name = url, title = th_txt) + else: + linkable = th_txt trow = Html("tr") + ( - Html("th", th_txt, class_ ='monthName', colspan=7, inline = True) + Html("th", linkable, class_ ='monthName', colspan=7, inline = True) ) thead += trow @@ -930,7 +936,7 @@ class WebCalReport(Report): for month in range(1, 13): # build the calendar - monthly_calendar = self.calendar_build("yg", year, month) + monthly_calendar = self.calendar_build("yg", year, month, clickable=True) content += monthly_calendar # increase progress bar