diff --git a/mayan/apps/documents/views/document_page_views.py b/mayan/apps/documents/views/document_page_views.py index 69b17871f6..e3dac8c3b8 100644 --- a/mayan/apps/documents/views/document_page_views.py +++ b/mayan/apps/documents/views/document_page_views.py @@ -17,6 +17,8 @@ from mayan.apps.common.utils import resolve from mayan.apps.converter.literals import DEFAULT_ROTATION, DEFAULT_ZOOM_LEVEL from ..forms import DocumentPageForm +from ..icons import icon_document_pages +from ..links import link_document_update_page_count from ..models import Document, DocumentPage from ..permissions import permission_document_view from ..settings import ( @@ -44,6 +46,17 @@ class DocumentPageListView(ExternalObjectMixin, SingleObjectListView): return { 'hide_object': True, 'list_as_items': True, + 'no_results_icon': icon_document_pages, + 'no_results_main_link': link_document_update_page_count.resolve( + request=self.request, resolved_object=self.external_object + ), + 'no_results_text': _( + 'This could mean that the document is of a format that is ' + 'not supported, that it is corrupted or that the upload ' + 'process was interrupted. Use the document page recalculation ' + 'action to attempt to introspect the page count again.' + ), + 'no_results_title': _('No document pages available'), 'object': self.external_object, 'title': _('Pages for document: %s') % self.external_object, }