equal
deleted
inserted
replaced
27 from pyams_default_theme.features.sitemap.interfaces import ISitemapExtension |
27 from pyams_default_theme.features.sitemap.interfaces import ISitemapExtension |
28 from pyams_i18n.interfaces import II18nManager |
28 from pyams_i18n.interfaces import II18nManager |
29 from pyams_skin.layer import IPyAMSUserLayer |
29 from pyams_skin.layer import IPyAMSUserLayer |
30 from pyams_utils.list import unique_iter |
30 from pyams_utils.list import unique_iter |
31 from pyams_utils.registry import get_all_utilities_registered_for, get_utility |
31 from pyams_utils.registry import get_all_utilities_registered_for, get_utility |
|
32 from pyams_utils.timezone import tztime |
32 from pyams_workflow.interfaces import IWorkflow, IWorkflowPublicationInfo |
33 from pyams_workflow.interfaces import IWorkflow, IWorkflowPublicationInfo |
33 |
34 |
34 |
35 |
35 @view_config(name='robots.txt', context=ISiteRoot, request_type=IPyAMSUserLayer, |
36 @view_config(name='robots.txt', context=ISiteRoot, request_type=IPyAMSUserLayer, |
36 renderer='templates/robots.pt') |
37 renderer='templates/robots.pt') |
64 self.request.response.content_type = 'text/xml' |
65 self.request.response.content_type = 'text/xml' |
65 return {} |
66 return {} |
66 |
67 |
67 @property |
68 @property |
68 def sources(self): |
69 def sources(self): |
69 timestamp = datetime.utcnow().isoformat() |
70 timestamp = tztime(datetime.utcnow()).isoformat() |
70 for tool in get_all_utilities_registered_for(IBaseSharedTool): |
71 for tool in get_all_utilities_registered_for(IBaseSharedTool): |
71 if not tool.shared_content_menu: |
72 if not tool.shared_content_menu: |
72 continue |
73 continue |
73 publication_info = IWorkflowPublicationInfo(tool, None) |
74 publication_info = IWorkflowPublicationInfo(tool, None) |
74 if (publication_info is None) or publication_info.is_visible(self.request): |
75 if (publication_info is None) or publication_info.is_visible(self.request): |