Updated content publication date portlet
authorThierry Florac <tflorac@ulthar.net>
Thu, 02 Jul 2020 16:12:32 +0200
changeset 510 808d6ab823ce
parent 509 c91b61fadf67
child 511 b42955b58f35
Updated content publication date portlet
src/pyams_default_theme/shared/common/portlet/workflow.py
--- a/src/pyams_default_theme/shared/common/portlet/workflow.py	Mon Jun 29 22:52:42 2020 +0200
+++ b/src/pyams_default_theme/shared/common/portlet/workflow.py	Thu Jul 02 16:12:32 2020 +0200
@@ -30,6 +30,8 @@
 class SharedContentPublicationDataProvider(ViewContentProvider):
     """Shared content publication date viewlet"""
 
+    date_format = 'long'
+
     @property
     def publication_date(self):
         info = IWorkflowPublicationInfo(self.context, None)
@@ -40,4 +42,4 @@
         except UnknownLocaleError:
             negotiator = get_utility(INegotiator)
             locale = Locale(negotiator.server_language)
-        return format_date(info.visible_publication_date, format='long', locale=locale)
+        return format_date(info.visible_publication_date, format=self.date_format, locale=locale)