Add no results help text for the document type quick label list view. Assign icon to the document type quick label objects.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -60,6 +60,12 @@ icon_document_pages = Icon(driver_name='fontawesome', symbol='copy')
|
||||
icon_document_preview = Icon(driver_name='fontawesome', symbol='eye')
|
||||
icon_document_properties = Icon(driver_name='fontawesome', symbol='info')
|
||||
icon_document_type_setup = Icon(driver_name='fontawesome', symbol='file')
|
||||
icon_document_type_filename = Icon(
|
||||
driver_name='fontawesome', symbol='keyboard'
|
||||
)
|
||||
icon_document_type_filename_create = Icon(
|
||||
driver_name='fontawesome', symbol='plus'
|
||||
)
|
||||
icon_document_version_list = Icon(
|
||||
driver_name='fontawesome', symbol='code-branch'
|
||||
)
|
||||
|
||||
@@ -17,9 +17,9 @@ from .icons import (
|
||||
icon_document_page_rotate_right, icon_document_page_zoom_in,
|
||||
icon_document_page_zoom_out, icon_document_pages, icon_document_preview,
|
||||
icon_document_properties, icon_document_type_setup,
|
||||
icon_document_version_list, icon_document_version_return_document,
|
||||
icon_document_version_return_list, icon_duplicated_document_list,
|
||||
icon_duplicated_document_scan
|
||||
icon_document_type_filename_create, icon_document_version_list,
|
||||
icon_document_version_return_document, icon_document_version_return_list,
|
||||
icon_duplicated_document_list, icon_duplicated_document_scan
|
||||
)
|
||||
from .permissions import (
|
||||
permission_document_delete, permission_document_download,
|
||||
@@ -325,7 +325,8 @@ link_document_type_edit = Link(
|
||||
text=_('Edit'), view='documents:document_type_edit',
|
||||
)
|
||||
link_document_type_filename_create = Link(
|
||||
args='document_type.id', permissions=(permission_document_type_edit,),
|
||||
args='document_type.id', icon_class=icon_document_type_filename_create,
|
||||
permissions=(permission_document_type_edit,),
|
||||
text=_('Add quick label to document type'),
|
||||
view='documents:document_type_filename_create',
|
||||
)
|
||||
|
||||
@@ -3,6 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
||||
import logging
|
||||
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.template import RequestContext
|
||||
from django.urls import reverse, reverse_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
@@ -13,6 +14,10 @@ from common.generics import (
|
||||
)
|
||||
|
||||
from ..forms import DocumentTypeFilenameForm_create
|
||||
from ..icons import (
|
||||
icon_document_type_filename, icon_document_type_filename_create
|
||||
)
|
||||
from ..links import link_document_type_filename_create
|
||||
from ..models import DocumentType, DocumentTypeFilename
|
||||
from ..permissions import (
|
||||
permission_document_type_create, permission_document_type_delete,
|
||||
@@ -201,6 +206,19 @@ class DocumentTypeFilenameListView(SingleObjectListView):
|
||||
'document_type': self.get_document_type(),
|
||||
'hide_link': True,
|
||||
'navigation_object_list': ('document_type',),
|
||||
'no_results_icon': icon_document_type_filename,
|
||||
'no_results_main_link': link_document_type_filename_create.resolve(
|
||||
context=RequestContext(request=self.request)
|
||||
),
|
||||
'no_results_text': _(
|
||||
'Quick labels are predetermined filenames that allow '
|
||||
'the quick renaming of documents as they are uploaded '
|
||||
'by selecting them from a list. Quick labels can also '
|
||||
'be used after the documents have been uploaded.'
|
||||
),
|
||||
'no_results_title': _(
|
||||
'There are no quick labels for this document type'
|
||||
),
|
||||
'title': _(
|
||||
'Quick labels for document type: %s'
|
||||
) % self.get_document_type(),
|
||||
|
||||
Reference in New Issue
Block a user