X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fwipi.git;a=blobdiff_plain;f=plugin%2Ftheme%2Fdeadfoxjunction.py;fp=plugin%2Ftheme%2Fdeadfoxjunction.py;h=4a363332d02980af1f24c07b09ec2a4fae7f1fdd;hp=13929c791fec2563608bf0a37d77cd159d88d6c3;hb=d7e54511f0b549e56a53df6f7c12f865b007837d;hpb=32ee0419a78537ec95b1d71e0335c48446f62051 diff --git a/plugin/theme/deadfoxjunction.py b/plugin/theme/deadfoxjunction.py index 13929c7..4a36333 100644 --- a/plugin/theme/deadfoxjunction.py +++ b/plugin/theme/deadfoxjunction.py @@ -22,3 +22,54 @@ class Theme(SiteTheme): html = SiteTheme.endPage(self, d) html += u'\n' return html + + def recentchanges_entry(self, d): + """ + Assemble a single recentchanges entry (table row) + + Based on the same function from ThemeBase, but with the comment + on a second table row, since the available horizontal space in + this theme is fairly limited. + + @param d: parameter dictionary + @rtype: string + @return: recentchanges entry html + """ + _ = self.request.getText + html = [] + html.append('\n') + + html.append('%(icon_html)s\n' % d) + + html.append('%(pagelink_html)s\n' % d) + + html.append('') + if d['time_html']: + html.append("%(time_html)s" % d) + html.append('\n') + + html.append('%(info_html)s\n' % d) + + html.append('') + if d['editors']: + html.append('
'.join(d['editors'])) + html.append('\n') + html.append('\n') + html.append('\n') + + html.append('') + if d['comments']: + if d['changecount'] > 1: + notfirst = 0 + for comment in d['comments']: + html.append('%s#%02d %s' % ( + notfirst and '
' or '', comment[0], comment[1])) + notfirst = 1 + else: + comment = d['comments'][0] + html.append('%s' % comment[1]) + html.append('\n') + + html.append('\n') + + return ''.join(html)