Add no result template to the document page list
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user