mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 08:48:18 -05:00
listing: odd/even class should happen after keep_fn.
This commit is contained in:
@@ -108,7 +108,6 @@ class Builder(object):
|
||||
|
||||
types = {}
|
||||
wrapped = []
|
||||
count = 0
|
||||
|
||||
modlink = {}
|
||||
modlabel = {}
|
||||
@@ -214,11 +213,6 @@ class Builder(object):
|
||||
if not item.verdict.endswith("-approved"):
|
||||
w.link_notes.append(w.verdict)
|
||||
|
||||
w.rowstyle = getattr(w, 'rowstyle', "")
|
||||
w.rowstyle += ' ' + ('even' if (count % 2) else 'odd')
|
||||
|
||||
count += 1
|
||||
|
||||
if c.user_is_admin and getattr(item, 'ip', None):
|
||||
w.ip_span = ip_span(item.ip)
|
||||
else:
|
||||
|
||||
@@ -89,6 +89,11 @@ class Listing(object):
|
||||
p.update({'after':next._fullname, 'before':None, 'count':acount})
|
||||
self.after = next._fullname
|
||||
self.next = (request.path + utils.query_string(p))
|
||||
|
||||
for count, thing in enumerate(self.things):
|
||||
thing.rowstyle = getattr(thing, 'rowstyle', "")
|
||||
thing.rowstyle += ' ' + ('even' if (count % 2) else 'odd')
|
||||
|
||||
#TODO: need name for template -- must be better way
|
||||
return Wrapped(self)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user