Add support for showing the current user's events
Add support kwargs to the SourceColumn class. Improve the event widgets, views and tests. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -41,9 +41,9 @@ def get_unread_notification_count(context):
|
||||
).filter(read=False).count()
|
||||
|
||||
|
||||
link_events_list = Link(
|
||||
icon_class=icon_events_list, permissions=(permission_events_view,),
|
||||
text=_('Events'), view='events:events_list'
|
||||
link_current_user_events = Link(
|
||||
icon_class=icon_events_list, text=_('My events'),
|
||||
view='events:current_user_events'
|
||||
)
|
||||
link_events_details = Link(
|
||||
text=_('Events'), view='events:events_list'
|
||||
@@ -54,6 +54,10 @@ link_events_for_object = Link(
|
||||
permissions=(permission_events_view,), text=_('Events'),
|
||||
view='events:events_for_object',
|
||||
)
|
||||
link_events_list = Link(
|
||||
icon_class=icon_events_list, permissions=(permission_events_view,),
|
||||
text=_('Events'), view='events:events_list'
|
||||
)
|
||||
link_event_types_subscriptions_list = Link(
|
||||
icon_class=icon_event_types_subscriptions_list,
|
||||
text=_('Event subscriptions'),
|
||||
@@ -72,10 +76,6 @@ link_object_event_types_user_subcriptions_list = Link(
|
||||
permissions=(permission_events_view,), text=_('Subscriptions'),
|
||||
view='events:object_event_types_user_subcriptions_list',
|
||||
)
|
||||
link_user_events = Link(
|
||||
args='resolved_object.pk', text=_('User events'),
|
||||
view='events:user_events'
|
||||
)
|
||||
link_user_notifications_list = Link(
|
||||
badge_text=get_unread_notification_count,
|
||||
icon_class=icon_user_notifications_list, text='',
|
||||
|
||||
Reference in New Issue
Block a user