mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 23:39:11 -05:00
Revert "Remove unused UserList.addable property."
It turns out it wasn't so unused. :( This reverts commit 984585d54b681d721d33ec614e9b58ae2f39cf2a.
This commit is contained in:
@@ -2810,8 +2810,11 @@ class UserList(Templated):
|
||||
destination = "friend"
|
||||
remove_action = "unfriend"
|
||||
|
||||
def __init__(self, editable=True):
|
||||
def __init__(self, editable=True, addable=None):
|
||||
self.editable = editable
|
||||
if addable is None:
|
||||
addable = editable
|
||||
self.addable = addable
|
||||
Templated.__init__(self)
|
||||
|
||||
def user_row(self, row_type, user, editable=True):
|
||||
@@ -2894,8 +2897,8 @@ class EnemyList(UserList):
|
||||
type = 'enemy'
|
||||
cells = ('user', 'remove')
|
||||
|
||||
def __init__(self, editable=True):
|
||||
UserList.__init__(self, editable)
|
||||
def __init__(self, editable=True, addable=False):
|
||||
UserList.__init__(self, editable, addable)
|
||||
|
||||
@property
|
||||
def table_title(self):
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
%if thing.can_force_add:
|
||||
${add_form(thing.form_title, thing.destination, thing.type, thing.container_name)}
|
||||
%endif
|
||||
%if thing.editable:
|
||||
%if thing.addable:
|
||||
<%call expr="add_form(thing.invite_form_title, thing.destination, thing.invite_type, thing.container_name, verb=_('invite'))">
|
||||
${error_field("ALREADY_MODERATOR", "name")}
|
||||
</%call>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</%def>
|
||||
|
||||
<div class="${thing._class} usertable">
|
||||
%if thing.editable:
|
||||
%if thing.addable:
|
||||
${add_form(thing.form_title, thing.destination, thing.type, thing.container_name)}
|
||||
%endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user