Add experimental hability to see group members (actions for group members are not supported yet)
This commit is contained in:
parent
4d44af2fc0
commit
b86bad024e
@ -127,12 +127,12 @@ class Controller(object):
|
||||
pub.sendMessage("create_buffer", buffer_type="videoBuffer", buffer_title=_("My videos"), parent_tab="videos", kwargs=dict(parent=self.window.tb, name="me_video", composefunc="render_video", session=self.session, endpoint="get", parent_endpoint="video", count=self.session.settings["buffers"]["count_for_video_buffers"]))
|
||||
pub.sendMessage("create_buffer", buffer_type="emptyBuffer", buffer_title=_("Albums"), parent_tab="videos", kwargs=dict(parent=self.window.tb, name="video_albums"))
|
||||
pub.sendMessage("create_buffer", buffer_type="emptyBuffer", buffer_title=_("People"), kwargs=dict(parent=self.window.tb, name="people"))
|
||||
pub.sendMessage("create_buffer", buffer_type="peopleBuffer", buffer_title=_("Online"), parent_tab="people", kwargs=dict(parent=self.window.tb, name="online_friends", composefunc="render_person", session=self.session, endpoint="getOnline", parent_endpoint="friends", count=5000, order="hints", fields="uid, first_name, last_name, last_seen, can_post"))
|
||||
pub.sendMessage("create_buffer", buffer_type="peopleBuffer", buffer_title=_("All friends"), parent_tab="people", kwargs=dict(parent=self.window.tb, name="friends_", composefunc="render_person", session=self.session, endpoint="get", parent_endpoint="friends", count=5000, order="hints", fields="uid, first_name, last_name, last_seen, can_post"))
|
||||
pub.sendMessage("create_buffer", buffer_type="peopleBuffer", buffer_title=_("Online"), parent_tab="people", kwargs=dict(parent=self.window.tb, name="online_friends", composefunc="render_person", session=self.session, endpoint="getOnline", parent_endpoint="friends", count=5000, order="hints", fields="uid, first_name, last_name, last_seen, can_post, can_write_private_message"))
|
||||
pub.sendMessage("create_buffer", buffer_type="peopleBuffer", buffer_title=_("All friends"), parent_tab="people", kwargs=dict(parent=self.window.tb, name="friends_", composefunc="render_person", session=self.session, endpoint="get", parent_endpoint="friends", count=5000, order="hints", fields="uid, first_name, last_name, last_seen, can_post, can_write_private_message"))
|
||||
pub.sendMessage("create_buffer", buffer_type="emptyBuffer", buffer_title=_("Friendship requests"), parent_tab="people", kwargs=dict(parent=self.window.tb, name="requests"))
|
||||
pub.sendMessage("create_buffer", buffer_type="requestsBuffer", buffer_title=_("Pending requests"), parent_tab="requests", kwargs=dict(parent=self.window.tb, name="friend_requests", composefunc="render_person", session=self.session, count=1000, fields="can_post"))
|
||||
pub.sendMessage("create_buffer", buffer_type="requestsBuffer", buffer_title=_("I follow"), parent_tab="requests", kwargs=dict(parent=self.window.tb, name="friend_requests_sent", composefunc="render_person", session=self.session, count=1000, out=1, fields="can_post"))
|
||||
pub.sendMessage("create_buffer", buffer_type="requestsBuffer", buffer_title=_("Subscribers"), parent_tab="requests", kwargs=dict(parent=self.window.tb, name="subscribers", composefunc="render_person", session=self.session, count=1000, need_viewed=1, fields="can_post"))
|
||||
pub.sendMessage("create_buffer", buffer_type="requestsBuffer", buffer_title=_("Pending requests"), parent_tab="requests", kwargs=dict(parent=self.window.tb, name="friend_requests", composefunc="render_person", session=self.session, count=1000, fields="can_post, can_write_private_message"))
|
||||
pub.sendMessage("create_buffer", buffer_type="requestsBuffer", buffer_title=_("I follow"), parent_tab="requests", kwargs=dict(parent=self.window.tb, name="friend_requests_sent", composefunc="render_person", session=self.session, count=1000, out=1, fields="can_post, can_write_private_message"))
|
||||
pub.sendMessage("create_buffer", buffer_type="requestsBuffer", buffer_title=_("Subscribers"), parent_tab="requests", kwargs=dict(parent=self.window.tb, name="subscribers", composefunc="render_person", session=self.session, count=1000, need_viewed=1, fields="can_post, can_write_private_message"))
|
||||
# pub.sendMessage("create_buffer", buffer_type="notificationBuffer", buffer_title=_("Notifications"), parent_tab=None, loadable=False, kwargs=dict(parent=self.window.tb, name="notifications", composefunc="render_notification", session=self.session, endpoint="get", parent_endpoint="notifications", count=100, filters="wall,mentions,comments,likes,reposted,followers,friends"))
|
||||
pub.sendMessage("create_buffer", buffer_type="documentBuffer", buffer_title=_("Documents"), parent_tab=None, loadable=True, kwargs=dict(parent=self.window.tb, name="documents", composefunc="render_document", session=self.session, endpoint="get", parent_endpoint="docs"))
|
||||
pub.sendMessage("create_buffer", buffer_type="emptyBuffer", buffer_title=_("Groups"), kwargs=dict(parent=self.window.tb, name="communities"))
|
||||
@ -641,7 +641,7 @@ class Controller(object):
|
||||
user = self.session.get_user(user_id, key="user1")
|
||||
name_ = _("{user1_nom}'s videos").format(**user)
|
||||
elif buffer_type == "friends":
|
||||
buffer = buffers.peopleBuffer(parent=self.window.tb, name="friends_{0}".format(user_id,), composefunc="render_person", session=self.session, create_tab=False, endpoint="get", parent_endpoint="friends", count=5000, fields="uid, first_name, last_name, last_seen", user_id=user_id)
|
||||
buffer = buffers.peopleBuffer(parent=self.window.tb, name="friends_{0}".format(user_id,), composefunc="render_person", session=self.session, create_tab=False, endpoint="get", parent_endpoint="friends", count=5000, fields="uid, first_name, last_name, last_seen, can_post, can_write_private_message", user_id=user_id)
|
||||
user = self.session.get_user(user_id, key="user1")
|
||||
name_ = _("{user1_nom}'s friends").format(**user)
|
||||
wx.CallAfter(self.complete_buffer_creation, buffer=buffer, name_=name_, position=self.window.search("timelines"))
|
||||
@ -1082,9 +1082,9 @@ class Controller(object):
|
||||
if (self.session.db["group_info"][current_buffer.group_id].get("is_admin") != None and self.session.db["group_info"][current_buffer.group_id].get("is_admin") == 1):
|
||||
pub.sendMessage("create_buffer", buffer_type="emptyBuffer", buffer_title=_("People"), parent_tab=current_buffer.tab.name, kwargs=dict(parent=self.window.tb, name=current_buffer.tab.name+"_people"))
|
||||
pub.sendMessage("create_buffer", buffer_type="peopleBuffer", buffer_title=_("Members"), parent_tab=current_buffer.name+"_people", get_items=True, kwargs=dict(parent=self.window.tb, name=current_buffer.name+"_members", composefunc="render_person", session=self.session, endpoint="getMembers", parent_endpoint="groups", count=1000, order=sorting, fields="uid, first_name, last_name, last_seen, can_post", group_id=-1*current_buffer.kwargs["owner_id"]))
|
||||
pub.sendMessage("create_buffer", buffer_type="peopleBuffer", buffer_title=_("Invited users"), parent_tab=current_buffer.name+"_people", get_items=True, kwargs=dict(parent=self.window.tb, name=current_buffer.name+"_invites", composefunc="render_person", session=self.session, endpoint="getInvitedUsers", parent_endpoint="groups", count=1000, fields="first_name, last_name, last_seen, can_post", group_id=-1*current_buffer.kwargs["owner_id"]))
|
||||
pub.sendMessage("create_buffer", buffer_type="peopleBuffer", buffer_title=_("Invited users"), parent_tab=current_buffer.name+"_people", get_items=True, kwargs=dict(parent=self.window.tb, name=current_buffer.name+"_invites", composefunc="render_person", session=self.session, endpoint="getInvitedUsers", parent_endpoint="groups", count=1000, fields="first_name, last_name, last_seen, can_post, can_write_private_message", group_id=-1*current_buffer.kwargs["owner_id"]))
|
||||
else: # Create this for non administrators.
|
||||
pub.sendMessage("create_buffer", buffer_type="peopleBuffer", buffer_title=_("Members"), parent_tab=current_buffer.tab.name, get_items=True, kwargs=dict(parent=self.window.tb, name=current_buffer.name+"_members", composefunc="render_person", session=self.session, endpoint="getMembers", parent_endpoint="groups", count=1000, order=sorting, fields="uid, first_name, last_name, last_seen, can_post", group_id=-1*current_buffer.kwargs["owner_id"]))
|
||||
pub.sendMessage("create_buffer", buffer_type="peopleBuffer", buffer_title=_("Members"), parent_tab=current_buffer.tab.name, get_items=True, kwargs=dict(parent=self.window.tb, name=current_buffer.name+"_members", composefunc="render_person", session=self.session, endpoint="getMembers", parent_endpoint="groups", count=1000, order=sorting, fields="uid, first_name, last_name, last_seen, can_post, can_write_private_message", group_id=-1*current_buffer.kwargs["owner_id"]))
|
||||
|
||||
def load_community_documents(self, *args, **kwargs):
|
||||
current_buffer = self.get_current_buffer()
|
||||
|
Loading…
Reference in New Issue
Block a user