From 87b0be65d489b84f7d3803401e13024651c9ad40 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Tue, 23 Apr 2019 19:25:53 -0400 Subject: [PATCH] Rename the document version upload link Signed-off-by: Roberto Rosario --- mayan/apps/checkouts/tests/test_views.py | 4 ++-- mayan/apps/sources/links.py | 3 ++- mayan/apps/sources/tests/test_views.py | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mayan/apps/checkouts/tests/test_views.py b/mayan/apps/checkouts/tests/test_views.py index f41ad311c9..500d897eec 100644 --- a/mayan/apps/checkouts/tests/test_views.py +++ b/mayan/apps/checkouts/tests/test_views.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals from mayan.apps.common.literals import TIME_DELTA_UNIT_DAYS from mayan.apps.documents.permissions import permission_document_view from mayan.apps.documents.tests import GenericDocumentViewTestCase -from mayan.apps.sources.links import link_upload_version +from mayan.apps.sources.links import link_document_version_upload from ..literals import STATE_CHECKED_OUT, STATE_LABELS from ..models import DocumentCheckout @@ -208,7 +208,7 @@ class DocumentCheckoutViewTestCase(DocumentCheckoutTestMixin, GenericDocumentVie # Needed by the url view resolver response.context.current_app = None - resolved_link = link_upload_version.resolve(context=response.context) + resolved_link = link_document_version_upload.resolve(context=response.context) self.assertEqual(resolved_link, None) diff --git a/mayan/apps/sources/links.py b/mayan/apps/sources/links.py index 2a28e5df5a..4452a721a2 100644 --- a/mayan/apps/sources/links.py +++ b/mayan/apps/sources/links.py @@ -105,8 +105,9 @@ link_staging_file_delete = Link( permissions=(permission_document_new_version, permission_document_create), tags='dangerous', text=_('Delete'), view='sources:staging_file_delete', ) -link_upload_version = Link( +link_document_version_upload = Link( args='resolved_object.pk', condition=document_new_version_not_blocked, + icon_class_path='mayan.apps.sources.icons.icon_document_version_upload', permissions=(permission_document_new_version,), text=_('Upload new version'), view='sources:upload_version', ) diff --git a/mayan/apps/sources/tests/test_views.py b/mayan/apps/sources/tests/test_views.py index b3600c28ab..c9f141fe5c 100644 --- a/mayan/apps/sources/tests/test_views.py +++ b/mayan/apps/sources/tests/test_views.py @@ -14,7 +14,7 @@ from mayan.apps.documents.tests import ( ) from mayan.apps.storage.utils import fs_cleanup, mkdtemp -from ..links import link_upload_version +from ..links import link_document_version_upload from ..literals import SOURCE_CHOICE_WEB_FORM, SOURCE_UNCOMPRESS_CHOICE_Y from ..models import StagingFolderSource, WebFormSource from ..permissions import ( @@ -219,7 +219,7 @@ class NewDocumentVersionViewTestCase(GenericDocumentViewTestCase): # Needed by the url view resolver response.context.current_app = None - resolved_link = link_upload_version.resolve(context=response.context) + resolved_link = link_document_version_upload.resolve(context=response.context) self.assertEqual(resolved_link, None)