Fix user event type subscription list view

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-28 01:56:56 -04:00
parent f057d7f81f
commit 85deaf3327
3 changed files with 24 additions and 13 deletions

View File

@@ -163,7 +163,7 @@ class MayanApp {
this.setupNewWindowAnchor();
$.each(this.ajaxMenusOptions, function(index, value) {
value.app = self;
app.doRefreshAJAXMenu(value);
//app.doRefreshAJAXMenu(value);
});
partialNavigation.initialize();
}

View File

@@ -2,6 +2,7 @@ from __future__ import absolute_import, unicode_literals
from django.contrib.contenttypes.models import ContentType
from mayan.apps.common.tests import GenericViewTestCase
from mayan.apps.documents.tests import GenericDocumentViewTestCase
from ..permissions import permission_events_view
@@ -42,3 +43,11 @@ class EventsViewTestCase(GenericDocumentViewTestCase):
self.assertContains(
response=response, text=self.test_object.label, status_code=200
)
class UserEventViewsTestCase(GenericViewTestCase):
def test_user_event_type_subscription_list_view(self):
response = self.get(
viewname='events:event_types_user_subcriptions_list'
)
self.assertEqual(response.status_code, 200)

View File

@@ -99,7 +99,7 @@ class EventTypeSubscriptionListView(FormView):
return self.submodel.objects.filter(name__in=event_type_ids)
def get_post_action_redirect(self):
return reverse('common:current_user_details')
return reverse(viewname='user_management:current_user_details')
class NotificationListView(SingleObjectListView):
@@ -156,17 +156,19 @@ class ObjectEventListView(EventListView):
def get_extra_context(self):
context = super(ObjectEventListView, self).get_extra_context()
context.update({
'hide_object': True,
'no_results_icon': icon_events_list,
'no_results_text': _(
'Events are actions that have been performed to this object '
'or using this object.'
),
'no_results_title': _('There are no events for this object'),
'object': self.object,
'title': _('Events for: %s') % self.object,
})
context.update(
{
'hide_object': True,
'no_results_icon': icon_events_list,
'no_results_text': _(
'Events are actions that have been performed to this object '
'or using this object.'
),
'no_results_title': _('There are no events for this object'),
'object': self.object,
'title': _('Events for: %s') % self.object,
}
)
return context
def get_object(self):