Ticket #8699 (closed PLIP: fixed)
Make byline use the publication date if it exists
|Reported by:||limi||Owned by:||piv|
Description (last modified by piv) (diff)
Proposer: Vitaliy Podoba
Seconder: Laurence Rowe
Adding publication date to byline viewlet would be a nice small feature useful to site visitors as well as content managers.
This feature will be optional and switched off by default. So there won't be any changes on the site until site manager will turn 'publication date' on in page byline.
Proposal & Implementation
Byline viewlet will be extended to display publication date. And we'll have 3 cases:
- object not published: display only modification date (e.g. "published <date>")
- object just published: display only publication date, because it'll also equal modification date (e.g. "last modified <date>")
- object published and then modified: display both dates (e.g. "published <date>, last modified <date>")
Publication date will be taken from Effective Date field if it has been set. Otherwise we'll fallback to last 'publish' workflow transition date taken directly from workflow history.
To enable publication date in byline, there will be 'Display publication date in byline' checkbox in Security settings Control Panel.
- updated plone.app.layout package where publication date will be inserted into byline viewlet + added more tests to viewlet
- updated Products.CMFPlone package with a new property inside site_properties sheet: displayPublicationDateInByline (boolean, default: False), added tests
- updated plone.app.controlpanel package to add displayPublicationDateInByline setting on Security Settings form; added tests
- updated plone.app.locales with "Security Settings" panel new field strings
- updated plone.app.upgrade to include displayPublicationDateInByline property addition to site properties property sheet
- any documentation needs to be updated for this PLIP?
To get publication date from workflow history low level API will be used to avoid 'Review content' permission check and thus display publication date even to anonymous users. I don't think it's a risk because we provide this feature as optional, thus site manager is responsible for switching on publication date globally on the site.
Code will be bound to 'published' state and 'publish' workflow transition. So it usually won't work for custom workflows. Developers and integrators willing to have publication date working for their custom workflows will also have to customize byline viewlet.
Vitaliy Podoba (piv)
Most code is ready and available as addon: http://pypi.python.org/pypi/collective.improvedbyline
Things left to do:
- make publication date feature optional (update portal_properties tool and Security Settings form)
- add new Security Settings form translation strings to plone.app.locales package
- update documentation (if needed?)
- Status changed from new to confirmed
- Type changed from Feature Request to Bug
- Milestone changed from Future to 4.x
- Status changed from confirmed to new
- Description modified (diff)
- Cc piv removed
- Component changed from Infrastructure to General
- Summary changed from Make byline use be the publication date if it exists to Make byline use the publication date if it exists
- Priority changed from minor to major
- Owner set to piv
- Version set to 4.1
- Milestone changed from 4.x to 4.3
- Keywords newbie removed
- Type changed from Bug to PLIP