Add no results help texts for the converter, source, motd and mailer app. Add help text to the document type list view. Tweak the CSS of the no result secondary links.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-09-01 03:10:45 -04:00
parent c312a2a304
commit 427aad8277
15 changed files with 152 additions and 44 deletions
+1
View File
@@ -59,6 +59,7 @@ icon_document_page_zoom_out = Icon(
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_create = Icon(driver_name='fontawesome', symbol='plus')
icon_document_type_setup = Icon(driver_name='fontawesome', symbol='file')
icon_document_type_filename = Icon(
driver_name='fontawesome', symbol='keyboard'
+6 -4
View File
@@ -16,10 +16,11 @@ from .icons import (
icon_document_page_return, icon_document_page_rotate_left,
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_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
icon_document_properties, icon_document_type_create,
icon_document_type_filename_create, 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
)
from .permissions import (
permission_document_delete, permission_document_download,
@@ -313,6 +314,7 @@ link_document_version_revert = Link(
# Document type related links
link_document_type_create = Link(
icon_class=icon_document_type_create,
permissions=(permission_document_type_create,),
text=_('Create document type'), view='documents:document_type_create'
)
@@ -15,9 +15,12 @@ from common.generics import (
from ..forms import DocumentTypeFilenameForm_create
from ..icons import (
icon_document_type_filename, icon_document_type_filename_create
icon_document_type_filename, icon_document_type_filename_create,
icon_document_type_setup
)
from ..links import (
link_document_type_create, link_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,
@@ -54,6 +57,18 @@ class DocumentTypeListView(SingleObjectListView):
def get_extra_context(self):
return {
'hide_link': True,
'no_results_icon': icon_document_type_setup,
'no_results_main_link': link_document_type_create.resolve(
context=RequestContext(request=self.request)
),
'no_results_text': _(
'Document types are the most basic units of configuration. '
'Everything in the system will depend on them. '
'Define a document type for each type of physical '
'document you intend to upload. Example document types: '
'invoice, receipt, manual, prescription, balance sheet.'
),
'no_results_title': _('No document types available'),
'title': _('Document types'),
}
+10 -3
View File
@@ -33,9 +33,9 @@ from ..forms import (
DocumentTypeSelectForm,
)
from ..icons import (
icon_document_list_deleted, icon_document_list_favorites,
icon_document_list_recent_access, icon_document_list_recent_added,
icon_duplicated_document_list
icon_document_list, icon_document_list_deleted,
icon_document_list_favorites, icon_document_list_recent_access,
icon_document_list_recent_added, icon_duplicated_document_list
)
from ..literals import PAGE_RANGE_RANGE, DEFAULT_ZIP_FILENAME
from ..models import (
@@ -73,6 +73,13 @@ class DocumentListView(SingleObjectListView):
return {
'hide_links': True,
'list_as_items': True,
'no_results_icon': icon_document_list,
'no_results_text': _(
'This could mean that no documents have been uploaded or '
'that your user account has not been granted the view '
'permission for any document or document type.'
),
'no_results_title': _('No documents available'),
'title': _('All documents'),
}