Attachment 'MonthCalendar-2.patch'
Download 1 --- MoinMoin/macro/MonthCalendar.py 2010-08-22 00:42:37.812770363 +0200
2 +++ wiki/data/plugin/macro/MonthCalendar.py 2010-08-28 23:44:35.187180732 +0200
3 @@ -7,6 +7,7 @@
4 BasePageName/year-month-day
5
6 @copyright: 2002-2009 MoinMoin:ThomasWaldmann
7 + @copyright: 2010 Modified by MarcelHaefner (http://moinmo.in/MoinMoinBugs/1.9%20MonthCalenderAndSidebarFunctionNotWorking)
8 @license: GNU GPL, see COPYING for details.
9
10 Revisions:
11 @@ -268,11 +269,11 @@
12 p = Page(request, thispage)
13 qpagenames = '*'.join([wikiutil.quoteWikinameURL(pn) for pn in parmpagename])
14 qtemplate = wikiutil.quoteWikinameURL(parmtemplate)
15 - querystr = "calparms=%%s,%d,%d,%d,%%d,,,%%s" % (parmyear, parmmonth, parmoffset)
16 - prevlink = p.url(request, querystr % (qpagenames, parmoffset2 - 1, qtemplate))
17 - nextlink = p.url(request, querystr % (qpagenames, parmoffset2 + 1, qtemplate))
18 - prevylink = p.url(request, querystr % (qpagenames, parmoffset2 - 12, qtemplate))
19 - nextylink = p.url(request, querystr % (qpagenames, parmoffset2 + 12, qtemplate))
20 + querystr = "?calparms=%%s,%d,%d,%d,%%d,,,%%s" % (parmyear, parmmonth, parmoffset)
21 + prevlink = querystr % (qpagenames, parmoffset2 - 1, qtemplate)
22 + nextlink = querystr % (qpagenames, parmoffset2 + 1, qtemplate)
23 + prevylink = querystr % (qpagenames, parmoffset2 - 12, qtemplate)
24 + nextylink = querystr % (qpagenames, parmoffset2 + 12, qtemplate)
25
26 prevmonth = formatter.url(1, prevlink, 'cal-link', **attrs) + '<' + formatter.url(0)
27 nextmonth = formatter.url(1, nextlink, 'cal-link', **attrs) + '>' + formatter.url(0)
28 @@ -389,7 +390,11 @@
29 r, g, b = (r, g+colorstep, b)
30 r, g, b = cliprgb(r, g, b)
31 style = 'background-color:#%02x%02x%02x' % (r, g, b)
32 - fmtlink = formatter.url(1, daypage.url(request, query), csslink, **attrs) + str(day) + formatter.url(0)
33 + if has_calparms:
34 + calparmslink = "?calparms=" + macro.request.args['calparms']
35 + else:
36 + calparmslink = ""
37 + fmtlink = formatter.url(1, daypage.url(request, query) + calparmslink, csslink, **attrs) + str(day) + formatter.url(0)
38 if day == currentday and month == currentmonth and year == currentyear:
39 cssday = "cal-today"
40 fmtlink = "<b>%s</b>" % fmtlink # for browser with CSS probs
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.