mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Refactor spotlight item param names to be more generic.
This commit is contained in:
@@ -308,8 +308,8 @@ class HotController(FixListing, ListingController):
|
||||
g.log.error("pos = %d" % pos)
|
||||
raise
|
||||
|
||||
s = SpotlightListing(b, spotlight_links = spotlight_links,
|
||||
visible_link = vislink,
|
||||
s = SpotlightListing(b, spotlight_items = spotlight_links,
|
||||
visible_item = vislink,
|
||||
max_num = self.listing_obj.max_num,
|
||||
max_score = self.listing_obj.max_score).listing()
|
||||
|
||||
|
||||
@@ -133,8 +133,8 @@ class SpotlightListing(Listing):
|
||||
self.show_nums = True
|
||||
self._parent_max_num = kw.get('max_num', 0)
|
||||
self._parent_max_score = kw.get('max_score', 0)
|
||||
self.spotlight_links = kw.get('spotlight_links', [])
|
||||
self.visible_link = kw.get('visible_link', '')
|
||||
self.spotlight_items = kw.get('spotlight_items', [])
|
||||
self.visible_item = kw.get('visible_item', '')
|
||||
|
||||
@property
|
||||
def max_score(self):
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
lookup = dict((t._fullname, t) for t in thing.things)
|
||||
seen = set([])
|
||||
%>
|
||||
%for name in thing.spotlight_links:
|
||||
%for name in thing.spotlight_items:
|
||||
%if name in seen:
|
||||
<% pass %>
|
||||
%elif lookup.has_key(name):
|
||||
<% seen.add(name) %>
|
||||
${unsafe(lookup[name].render(display = (thing.visible_link == name)))}
|
||||
${unsafe(lookup[name].render(display = (thing.visible_item == name)))}
|
||||
%else:
|
||||
<div class="thing id-${name} stub" style="display:none"></div>
|
||||
%endif
|
||||
|
||||
Reference in New Issue
Block a user