From f67443f0d5135a0fcd852544010ed7ba2536d492 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 13 Feb 2017 21:15:27 -0400 Subject: [PATCH] Add dhasboard widgets removed by the merge with master. --- mayan/apps/documents/apps.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/mayan/apps/documents/apps.py b/mayan/apps/documents/apps.py index 25e6e96884..936d87d7e0 100644 --- a/mayan/apps/documents/apps.py +++ b/mayan/apps/documents/apps.py @@ -105,6 +105,42 @@ class DocumentsApp(MayanAppConfig): serializer_class='documents.serializers.DocumentSerializer' ) + DashboardWidget( + func=new_document_pages_this_month, icon='fa fa-calendar', + label=_('New pages this month'), + link=reverse_lazy( + 'statistics:statistic_detail', + args=('new-document-pages-per-month',) + ) + ) + + DashboardWidget( + func=new_documents_this_month, icon='fa fa-calendar', + label=_('New documents this month'), + link=reverse_lazy( + 'statistics:statistic_detail', + args=('new-documents-per-month',) + ) + ) + + DashboardWidget( + icon='fa fa-file', queryset=Document.objects.all(), + label=_('Total documents'), + link=reverse_lazy('documents:document_list') + ) + + DashboardWidget( + icon='fa fa-book', queryset=DocumentType.objects.all(), + label=_('Document types'), + link=reverse_lazy('documents:document_type_list') + ) + + DashboardWidget( + icon='fa fa-trash', queryset=DeletedDocument.objects.all(), + label=_('Documents in trash'), + link=reverse_lazy('documents:document_list_deleted') + ) + MissingItem( label=_('Create a document type'), description=_(