# HG changeset patch # User Tero Marttila # Date 1234388285 -7200 # Node ID d4848d807fd1ff63b18edbbe8e028c906bef1dcc # Parent 9fc0eb751b6afaa634c2c5f1d922068b265ff474 center calendar list, add prev/next date to channel_link, add view-last-x-lines form to channel_last/channel diff -r 9fc0eb751b6a -r d4848d807fd1 handlers.py --- a/handlers.py Wed Feb 11 23:22:13 2009 +0200 +++ b/handlers.py Wed Feb 11 23:38:05 2009 +0200 @@ -133,7 +133,7 @@ ) @preferences.handler(prefs.formatter, prefs.timezone, prefs.count) -def channel_link (request, channel, timestamp, formatter, timezone, count) : +def channel_link (request, channel, timestamp, formatter, timezone, count, type=None) : """ Display channel_date for specific UTC timestamp """ @@ -163,6 +163,10 @@ count = count, max = max, lines = lines, + + # for prev/next date + date_next = channel.source.get_next_date(timestamp), + date_prev = channel.source.get_prev_date(timestamp), ) @preferences.handler(prefs.timezone) diff -r 9fc0eb751b6a -r d4848d807fd1 helpers.py --- a/helpers.py Wed Feb 11 23:22:13 2009 +0200 +++ b/helpers.py Wed Feb 11 23:38:05 2009 +0200 @@ -152,13 +152,16 @@ return date.strftime(self.ctx['prefs'][preferences.date_format]) - def build_url (self, url, **params) : + def url (self, url, **params) : """ Build URL with our request object """ return url.build(self.ctx['req'], **params) - + + # old name + build_url = url + def utc_timestamp (self, dtz) : """ Build an UTC timestamp from the given datetime diff -r 9fc0eb751b6a -r d4848d807fd1 static/irclogs.css --- a/static/irclogs.css Wed Feb 11 23:22:13 2009 +0200 +++ b/static/irclogs.css Wed Feb 11 23:38:05 2009 +0200 @@ -141,11 +141,17 @@ text-align: center; font-size: x-large; font-weight: bold; + + margin-bottom: 20px; } /* Calendar */ +div.calendar-list { + text-align: center; +} + table.calendar { - display: inline; + display: inline-table; } table.calendar th { @@ -157,6 +163,10 @@ } +table.calendar tr.month-header form { + padding: 5px; +} + table.calendar tr.month-header a, table.calendar span.prev-month, table.calendar span.next-month { @@ -269,8 +279,6 @@ /* Search form */ div#search { - margin-top: 25px; - padding: 25px; text-align: center; @@ -324,8 +332,6 @@ div.paginate { height: 50px; - padding-top: 20px; - text-align: center; } diff -r 9fc0eb751b6a -r d4848d807fd1 templates/channel.tmpl --- a/templates/channel.tmpl Wed Feb 11 23:22:13 2009 +0200 +++ b/templates/channel.tmpl Wed Feb 11 23:38:05 2009 +0200 @@ -15,21 +15,6 @@ -
  • Browse by Date
  • diff -r 9fc0eb751b6a -r d4848d807fd1 templates/channel_calendar.tmpl --- a/templates/channel_calendar.tmpl Wed Feb 11 23:22:13 2009 +0200 +++ b/templates/channel_calendar.tmpl Wed Feb 11 23:38:05 2009 +0200 @@ -59,8 +59,11 @@ +
    ${channel.title} :: Calendar for ${h.fmt_month(month)}
    + +
    ## three months ${month_table(h.prev_month(month), is_center=False )} ${month_table(month, is_center=True )} ${month_table(h.next_month(month), is_center=False )} - +
    diff -r 9fc0eb751b6a -r d4848d807fd1 templates/channel_last.tmpl --- a/templates/channel_last.tmpl Wed Feb 11 23:22:13 2009 +0200 +++ b/templates/channel_last.tmpl Wed Feb 11 23:38:05 2009 +0200 @@ -2,12 +2,17 @@
    ${channel.title} :: Last ${count} lines
    -...More... +
    + View last lines: +
    + <%include file="lines.tmpl" />
    Other formats available:
    - Plaintext - | PNG - | RSS + Plaintext + | PNG + | RSS