equal
deleted
inserted
replaced
15 |
15 |
16 # import standard library |
16 # import standard library |
17 |
17 |
18 # import interfaces |
18 # import interfaces |
19 from pyams_portal.interfaces import IPortalContext, IPortalPage, IPortalTemplateConfiguration, \ |
19 from pyams_portal.interfaces import IPortalContext, IPortalPage, IPortalTemplateConfiguration, \ |
20 IPortalPortletsConfiguration, IPortletRenderer, IPortlet |
20 IPortalPortletsConfiguration, IPortletRenderer, IPortlet, PREVIEW_MODE |
21 from pyams_skin.layer import IPyAMSUserLayer |
21 from pyams_skin.layer import IPyAMSUserLayer |
22 from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION |
22 from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION |
23 from pyams_workflow.interfaces import IWorkflowPublicationInfo |
23 from pyams_workflow.interfaces import IWorkflowPublicationInfo |
24 |
24 |
25 # import packages |
25 # import packages |
85 if (wf_info is not None) and not wf_info.is_visible(self.request): |
85 if (wf_info is not None) and not wf_info.is_visible(self.request): |
86 raise NotFound() |
86 raise NotFound() |
87 super(PortalContextIndexPage, self).update() |
87 super(PortalContextIndexPage, self).update() |
88 |
88 |
89 |
89 |
90 PREVIEW_MODE = 'PREVIEW_MODE' |
|
91 |
|
92 |
|
93 @pagelet_config(name='preview.html', context=IPortalContext, layer=IPyAMSUserLayer, |
90 @pagelet_config(name='preview.html', context=IPortalContext, layer=IPyAMSUserLayer, |
94 permission=VIEW_SYSTEM_PERMISSION) |
91 permission=VIEW_SYSTEM_PERMISSION) |
95 class PortalContextPreviewPage(PortalContextIndexPage): |
92 class PortalContextPreviewPage(PortalContextIndexPage): |
96 """Portal context preview page""" |
93 """Portal context preview page""" |
97 |
94 |