--- 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} <i class="fa fa-fw fa-exclamation-triangle txt-color-red"></i>');
+ 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}} <i class="fa fa-fw fa-hourglass-half font-xs '
+ 'opacity-75 hint align-base" data-ams-hint-offset="5" '
+ 'title="{0}"></i>'.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}',
'<span class="{0}">{{state}}</span>'.format(state_class))