Permalink
Browse files

Refactor spotlight item param names to be more generic.

  • Loading branch information...
1 parent c22f9c6 commit 6dfb00105b5b6d65f8449164cf7ab57258d2c30b @chromakode chromakode committed Aug 16, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −2 r2/r2/controllers/listingcontroller.py
  2. +2 −2 r2/r2/models/listing.py
  3. +2 −2 r2/r2/templates/spotlightlisting.html
@@ -308,8 +308,8 @@ def spotlight(self):
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()
View
@@ -133,8 +133,8 @@ def __init__(self, *a, **kw):
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

0 comments on commit 6dfb001

Please sign in to comment.