Add multi title property.

This commit is contained in:
Max Goodman
2013-04-08 15:56:48 -07:00
parent 1c91e4db7f
commit fedb7edd10

View File

@@ -1379,6 +1379,12 @@ class LabeledMulti(MultiReddit, tdb_cassandra.Thing):
# is smarter
return 'multi'
@property
def title(self):
if isinstance(self.owner, Account):
return _('%s subreddits curated by /u/%s') % (self.name, self.owner.name)
return _('%s subreddits') % self.name
def can_view(self, user):
return user == self.owner or self.visibility == 'public'