Add empty result text to the user events views. Add icon to the acls create link.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-08-26 06:57:10 -04:00
parent 69b80aff1d
commit 600fa16d8c
4 changed files with 16 additions and 5 deletions

View File

@@ -3,3 +3,5 @@ from __future__ import absolute_import, unicode_literals
from appearance.classes import Icon
icon_acl_list = Icon(driver_name='fontawesome', symbol='lock')
icon_acl_new = Icon(driver_name='fontawesome', symbol='plus')

View File

@@ -5,7 +5,7 @@ from django.utils.translation import ugettext_lazy as _
from navigation import Link
from .icons import icon_acl_list
from .icons import icon_acl_list, icon_acl_new
from .permissions import permission_acl_view, permission_acl_edit
@@ -41,7 +41,7 @@ link_acl_list_with_icon = Link(
permissions=(permission_acl_view,), text=_('ACLs'), view='acls:acl_list'
)
link_acl_create = Link(
kwargs=get_kwargs_factory('resolved_object'),
icon_class=icon_acl_new, kwargs=get_kwargs_factory('resolved_object'),
permissions=(permission_acl_edit,), text=_('New ACL'),
view='acls:acl_create'
)

View File

@@ -2,11 +2,12 @@ from __future__ import absolute_import, unicode_literals
from appearance.classes import Icon
icon_events_list = Icon(driver_name='fontawesome', symbol='list-ol')
icon_events_for_object = Icon(driver_name='fontawesome', symbol='list-ol')
icon_event_types_subscriptions_list = Icon(
driver_name='fontawesome', symbol='list-ol'
)
icon_events_list = Icon(driver_name='fontawesome', symbol='list-ol')
icon_events_for_object = Icon(driver_name='fontawesome', symbol='list-ol')
icon_events_user_list = Icon(driver_name='fontawesome', symbol='user')
icon_object_event_types_user_subcriptions_list_with_icon = Icon(
driver_name='fontawesome', symbol='rss'
)

View File

@@ -20,7 +20,9 @@ from .classes import EventType, ModelEventType
from .forms import (
EventTypeUserRelationshipFormSet, ObjectEventTypeUserRelationshipFormSet
)
from .icons import icon_events_list, icon_user_notifications_list
from .icons import (
icon_events_list, icon_events_user_list, icon_user_notifications_list
)
from .links import link_event_types_subscriptions_list
from .models import StoredEventType
from .permissions import permission_events_view
@@ -277,6 +279,12 @@ class UserEventListView(SingleObjectListView):
},
),
'hide_object': True,
'no_results_icon': icon_events_user_list,
'no_results_text': _(
'Events are actions that have been performed to this '
'user account or by this user account.'
),
'no_results_title': _('There are no events for this user'),
'object': self.get_user(),
'title': _(
'Events for user: %s'