From d473245fb2c151d12437ad7ef1534108dfdcbfc3 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Fri, 4 Nov 2016 01:45:40 -0400 Subject: [PATCH] Rename the document_html_widget to document_page_html_widget for clarity of purpose. --- mayan/apps/documents/apps.py | 10 +++++----- mayan/apps/documents/widgets.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mayan/apps/documents/apps.py b/mayan/apps/documents/apps.py index ee975aa16a..33ff3f12ba 100644 --- a/mayan/apps/documents/apps.py +++ b/mayan/apps/documents/apps.py @@ -74,7 +74,7 @@ from .statistics import ( new_document_versions_per_month, total_document_per_month, total_document_page_per_month, total_document_version_per_month ) -from .widgets import document_html_widget +from .widgets import document_page_html_widget class DocumentsApp(MayanAppConfig): @@ -151,7 +151,7 @@ class DocumentsApp(MayanAppConfig): SourceColumn( source=Document, label=_('Thumbnail'), - func=lambda context: document_html_widget( + func=lambda context: document_page_html_widget( document_page=context['object'].latest_version.pages.first(), click_view='rest_api:documentpage-image', click_view_arguments_lazy=lambda: ( @@ -168,7 +168,7 @@ class DocumentsApp(MayanAppConfig): SourceColumn( source=DocumentPage, label=_('Thumbnail'), - func=lambda context: document_html_widget( + func=lambda context: document_page_html_widget( document_page=context['object'], click_view='rest_api:documentpage-image', click_view_arguments=(context['object'].pk,), @@ -181,7 +181,7 @@ class DocumentsApp(MayanAppConfig): SourceColumn( source=DocumentPageResult, label=_('Thumbnail'), - func=lambda context: document_html_widget( + func=lambda context: document_page_html_widget( document_page=context['object'], click_view='rest_api:documentpage-image', click_view_arguments=(context['object'].pk,), @@ -210,7 +210,7 @@ class DocumentsApp(MayanAppConfig): SourceColumn( source=DeletedDocument, label=_('Thumbnail'), - func=lambda context: document_html_widget( + func=lambda context: document_page_html_widget( document_page=context['object'].latest_version.pages.first(), click_view='rest_api:documentpage-image', click_view_arguments_lazy=lambda: ( diff --git a/mayan/apps/documents/widgets.py b/mayan/apps/documents/widgets.py index 21143b67df..f935ccd831 100644 --- a/mayan/apps/documents/widgets.py +++ b/mayan/apps/documents/widgets.py @@ -24,7 +24,7 @@ class DocumentPageImageWidget(forms.widgets.Widget): '
' ) - output.append(document_html_widget( + output.append(document_page_html_widget( value, zoom=zoom, rotation=rotation, image_class='lazy-load', nolazyload=False, size=setting_display_size.value) ) @@ -51,7 +51,7 @@ class DocumentPagesCarouselWidget(forms.widgets.Widget): for document_page in document_pages: output.append('