comparison libervia/pages/lists/view/_browser/__init__.py @ 1387:a84383c659b4

lists: creation, invitation, item deletion: this big patch includes: - reorganisation of pages for consistency, discovery is now the main list page, and list overview is now in `view` while item view is moved to `view_item` - lists from lists of interest are now shown in discovery page - list deletion from discory page - list can now be created, using templates now available from backend - invitation manager can now be used from list overview - list item can now be deleted from `view_item`
author Goffi <goffi@goffi.org>
date Sat, 20 Feb 2021 14:07:22 +0100
parents
children 4ccf42d8aab7
comparison
equal deleted inserted replaced
1386:83be300d17e3 1387:a84383c659b4
1 from browser import window, bind
2 from invitation import InvitationManager
3
4
5 lists_ns = window.lists_ns
6 pubsub_service = window.pubsub_service
7 pubsub_node = window.pubsub_node
8 try:
9 affiliations = window.affiliations.to_dict()
10 except AttributeError:
11 pass
12
13 @bind("#button_manage", "click")
14 def manage_click(evt):
15 evt.stopPropagation()
16 evt.preventDefault()
17 pubsub_data = {
18 "namespace": lists_ns,
19 "service": pubsub_service,
20 "node": pubsub_node
21 }
22 try:
23 name = pubsub_node.split('_', 1)[1]
24 except IndexError:
25 pass
26 else:
27 name = name.strip()
28 if name:
29 pubsub_data['name'] = name
30 manager = InvitationManager("pubsub", pubsub_data)
31 manager.attach(affiliations=affiliations)