Hidden multis: Move from sidebar to user page

Multis set to "hidden" will no longer be shown on the
user's sidebar. Instead, they'll be shown in a box
on their user page (only visible to that user).
This commit is contained in:
Keith Mitchell
2015-02-20 14:35:52 -08:00
parent 14087b336f
commit 8b7903c080
3 changed files with 7 additions and 4 deletions

View File

@@ -1964,8 +1964,9 @@ class ProfilePage(Reddit):
rb.push(scb)
public_multis = [m for m in LabeledMulti.by_owner(self.user)
if m.is_public()]
multis = LabeledMulti.by_owner(self.user)
public_multis = [m for m in multis if m.is_public()]
if public_multis:
scb = SideContentBox(title=_("public multireddits"), content=[
SidebarMultiList(public_multis)

View File

@@ -6922,6 +6922,7 @@ dd { margin-left: 20px; }
.visibility-group {
margin-right: 8px;
margin-bottom: 8px;
}
}

View File

@@ -36,10 +36,11 @@
<h2><a href="/user/${thing.multi.owner.name}">${_('curated by /u/%s') % thing.multi.owner.name}</a></h2>
<div class="gray-buttons settings">
%if thing.can_edit:
<span class="visibility-group">
<div class="visibility-group">
<label><input type="radio" name="visibility" value="private" ${'checked' if thing.multi.visibility == 'private' else ''}>${_('private')}</label>
<label><input type="radio" name="visibility" value="public" ${'checked' if thing.multi.visibility == 'public' else ''}>${_('public')}</label>
</span>
<label><input type="radio" name="visibility" value="hidden" ${'checked' if thing.multi.visibility == 'hidden' else ''}>${_('hidden')}</label>
</div>
%if thing.can_copy:
<button class="show-copy">${_('copy')}</button>
%endif