# HG changeset patch # User Thierry Florac # Date 1531385585 -7200 # Node ID 3ff493ee3ea520440e5fc5e3138a0a431018b42f # Parent 8327203905fd6e72960e36bbc0c6ef70b036fbfe Added visible publication date attribute diff -r 8327203905fd -r 3ff493ee3ea5 src/pyams_workflow/content.py --- a/src/pyams_workflow/content.py Mon Jul 09 14:06:28 2018 +0200 +++ b/src/pyams_workflow/content.py Thu Jul 12 10:53:05 2018 +0200 @@ -143,6 +143,14 @@ del IZopeDublinCore(self.__parent__)._mapping['Date.Expires'] self._publication_expiration_date = value + @property + def visible_publication_date(self): + displayed_date = self.displayed_publication_date + if displayed_date == DISPLAY_FIRST_VERSION: + return self.first_publication_date + else: + return self.publication_date + def reset(self, complete=True): self._publication_date = None self._first_publication_date = None