# HG changeset patch # User Thierry Florac # Date 1505134146 -7200 # Node ID 2ee56ec464d5c06e999a5dc8d087d5996aec4098 # Parent 08237dfa6357a5999ac2545c724a9cfb996f5f10 Updated dashboards headers diff -r 08237dfa6357 -r 2ee56ec464d5 src/pyams_content/shared/common/zmi/header.py --- a/src/pyams_content/shared/common/zmi/header.py Mon Sep 11 14:48:25 2017 +0200 +++ b/src/pyams_content/shared/common/zmi/header.py Mon Sep 11 14:49:06 2017 +0200 @@ -24,7 +24,8 @@ from pyams_sequence.interfaces import ISequentialIntIds, ISequentialIdInfo from pyams_skin.interfaces import IContextTitlePrefix from pyams_skin.layer import IPyAMSLayer -from pyams_workflow.interfaces import IWorkflowState, IWorkflow, IWorkflowStateLabel, IWorkflowVersions +from pyams_workflow.interfaces import IWorkflowState, IWorkflow, IWorkflowStateLabel, IWorkflowVersions, \ + IWorkflowPublicationInfo # import packages from pyams_skin.site import ContextTitlePrefixAdapter @@ -85,6 +86,14 @@ if state.state_urgency: state_format = state_format.replace('{state}', '{state} '); + elif state.state in workflow.published_states: + pub_info = IWorkflowPublicationInfo(context, None) + if (pub_info is not None) and not pub_info.is_published(): + state_format = state_format.replace('{state}', + '{{state}} '.format( + translate(_("Content publication start date is not passed yet")))) state_class = 'text-danger' # if state.state in workflow.update_states else 'txt-color-text' state_format = state_format.replace('{state}', '{{state}}'.format(state_class))