comparison MoinMoin/macro/MonthCalendar.py @ 3234:a739558ca3dc

Page.url() default changed to relative=False
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 10 Mar 2008 00:21:21 +0100
parents 5913913a4dc0
children 16fe48d7e586
comparison
equal deleted inserted replaced
3233:5e120e903ad5 3234:a739558ca3dc
271 colorstep = 85 271 colorstep = 85
272 p = Page(request, thispage) 272 p = Page(request, thispage)
273 qpagenames = '*'.join([wikiutil.quoteWikinameURL(pn) for pn in parmpagename]) 273 qpagenames = '*'.join([wikiutil.quoteWikinameURL(pn) for pn in parmpagename])
274 qtemplate = wikiutil.quoteWikinameURL(parmtemplate) 274 qtemplate = wikiutil.quoteWikinameURL(parmtemplate)
275 querystr = "calparms=%%s,%d,%d,%d,%%d,%%s" % (parmyear, parmmonth, parmoffset) 275 querystr = "calparms=%%s,%d,%d,%d,%%d,%%s" % (parmyear, parmmonth, parmoffset)
276 prevlink = p.url(request, querystr % (qpagenames, parmoffset2 - 1, qtemplate), relative=False) 276 prevlink = p.url(request, querystr % (qpagenames, parmoffset2 - 1, qtemplate))
277 nextlink = p.url(request, querystr % (qpagenames, parmoffset2 + 1, qtemplate), relative=False) 277 nextlink = p.url(request, querystr % (qpagenames, parmoffset2 + 1, qtemplate))
278 prevylink = p.url(request, querystr % (qpagenames, parmoffset2 - 12, qtemplate), relative=False) 278 prevylink = p.url(request, querystr % (qpagenames, parmoffset2 - 12, qtemplate))
279 nextylink = p.url(request, querystr % (qpagenames, parmoffset2 + 12, qtemplate), relative=False) 279 nextylink = p.url(request, querystr % (qpagenames, parmoffset2 + 12, qtemplate))
280 280
281 prevmonth = formatter.url(1, prevlink, 'cal-link', **attrs) + '&lt;' + formatter.url(0) 281 prevmonth = formatter.url(1, prevlink, 'cal-link', **attrs) + '&lt;' + formatter.url(0)
282 nextmonth = formatter.url(1, nextlink, 'cal-link', **attrs) + '&gt;' + formatter.url(0) 282 nextmonth = formatter.url(1, nextlink, 'cal-link', **attrs) + '&gt;' + formatter.url(0)
283 prevyear = formatter.url(1, prevylink, 'cal-link', **attrs) + '&lt;&lt;' + formatter.url(0) 283 prevyear = formatter.url(1, prevylink, 'cal-link', **attrs) + '&lt;&lt;' + formatter.url(0)
284 nextyear = formatter.url(1, nextylink, 'cal-link', **attrs) + '&gt;&gt;' + formatter.url(0) 284 nextyear = formatter.url(1, nextylink, 'cal-link', **attrs) + '&gt;&gt;' + formatter.url(0)
390 r, g, b = (r-colorstep, g, b-colorstep) 390 r, g, b = (r-colorstep, g, b-colorstep)
391 else: 391 else:
392 r, g, b = (r, g+colorstep, b) 392 r, g, b = (r, g+colorstep, b)
393 r, g, b = cliprgb(r, g, b) 393 r, g, b = cliprgb(r, g, b)
394 style = 'background-color:#%02x%02x%02x' % (r, g, b) 394 style = 'background-color:#%02x%02x%02x' % (r, g, b)
395 fmtlink = formatter.url(1, daypage.url(request, query, relative=False), csslink, **attrs) + str(day) + formatter.url(0) 395 fmtlink = formatter.url(1, daypage.url(request, query), csslink, **attrs) + str(day) + formatter.url(0)
396 if day == currentday and month == currentmonth and year == currentyear: 396 if day == currentday and month == currentmonth and year == currentyear:
397 cssday = "cal-today" 397 cssday = "cal-today"
398 fmtlink = "<b>%s</b>" % fmtlink # for browser with CSS probs 398 fmtlink = "<b>%s</b>" % fmtlink # for browser with CSS probs
399 else: 399 else:
400 cssday = "cal-nottoday" 400 cssday = "cal-nottoday"