deadfoxjunction: Use custom formatting for recentchangens entries.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 17 Aug 2010 07:00:00 +0000 (09:00 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 17 Aug 2010 07:00:00 +0000 (09:00 +0200)
plugin/theme/deadfoxjunction.py
static/deadfoxjunction/css/common.css

index 13929c791fec2563608bf0a37d77cd159d88d6c3..4a363332d02980af1f24c07b09ec2a4fae7f1fdd 100644 (file)
@@ -22,3 +22,54 @@ class Theme(SiteTheme):
        html = SiteTheme.endPage(self, d)
        html += u'</div><!-- #window -->\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('<tr>\n')
+
+        html.append('<td class="rcicon1">%(icon_html)s</td>\n' % d)
+
+        html.append('<td class="rcpagelink">%(pagelink_html)s</td>\n' % d)
+
+        html.append('<td class="rctime">')
+        if d['time_html']:
+            html.append("%(time_html)s" % d)
+        html.append('</td>\n')
+
+        html.append('<td class="rcicon2">%(info_html)s</td>\n' % d)
+
+        html.append('<td class="rceditor">')
+        if d['editors']:
+            html.append('<br>'.join(d['editors']))
+        html.append('</td>\n')
+        html.append('</tr>\n')
+        html.append('<tr>\n')
+
+        html.append('<td colspan="5" class="rccomment">')
+        if d['comments']:
+            if d['changecount'] > 1:
+                notfirst = 0
+                for comment in d['comments']:
+                    html.append('%s<tt>#%02d</tt>&nbsp;%s' % (
+                        notfirst and '<br>' or '', comment[0], comment[1]))
+                    notfirst = 1
+            else:
+                comment = d['comments'][0]
+                html.append('%s' % comment[1])
+        html.append('</td>\n')
+
+        html.append('</tr>\n')
+
+        return ''.join(html)
index 8e9ae43de843e5380a619b958f60de7aa14007b7..d391c37720acb9f18ea67a5879b50e728adb01c8 100644 (file)
@@ -192,12 +192,15 @@ strong.highlight
 .recentchanges td {
        vertical-align: top;
        border: none;
-       border-bottom: 1pt solid #E6EAF0;
-       background: #F2F4F7;
+}
+
+.recentchanges td.rccomment {
+       border: none;
+       border-bottom: 1pt solid #824900;
 }
 
 .rcdaybreak td {
-       background: #B8C5D9;
+       background: #633500;
        border: none;
 }
 
@@ -225,7 +228,6 @@ strong.highlight
 
 .rccomment {
        width: 50%;
-       color: gray;
        font-size: 0.88em;
 }