18 # import interfaces |
18 # import interfaces |
19 from hypatia.interfaces import ICatalog |
19 from hypatia.interfaces import ICatalog |
20 from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, PUBLISH_CONTENT_PERMISSION |
20 from pyams_content.interfaces import MANAGE_SITE_ROOT_PERMISSION, PUBLISH_CONTENT_PERMISSION |
21 from pyams_content.profile.interfaces import IAdminProfile |
21 from pyams_content.profile.interfaces import IAdminProfile |
22 from pyams_content.shared.common.interfaces import ISharedTool, IWfSharedContent, IManagerRestrictions |
22 from pyams_content.shared.common.interfaces import ISharedTool, IWfSharedContent, IManagerRestrictions |
23 from pyams_content.shared.common.interfaces.zmi import ISharedToolDashboardTable |
23 from pyams_content.shared.common.interfaces.zmi import IDashboardTable, ISharedToolDashboardTable |
24 from pyams_content.zmi.interfaces import IDashboardMenu, IMyDashboardMenu, IAllContentsMenu |
24 from pyams_content.zmi.interfaces import IDashboardMenu, IMyDashboardMenu, IAllContentsMenu |
25 from pyams_i18n.interfaces import II18n |
25 from pyams_i18n.interfaces import II18n |
26 from pyams_security.interfaces import ISecurityManager |
26 from pyams_security.interfaces import ISecurityManager |
27 from pyams_sequence.interfaces import ISequentialIdInfo, ISequentialIdTarget, ISequentialIntIds |
27 from pyams_sequence.interfaces import ISequentialIdInfo, ISequentialIdTarget, ISequentialIntIds |
28 from pyams_skin.interfaces import IInnerPage, IPageHeader |
28 from pyams_skin.interfaces import IInnerPage, IPageHeader |
102 """Shared tool dashboard name column""" |
102 """Shared tool dashboard name column""" |
103 |
103 |
104 _header = _("Title") |
104 _header = _("Title") |
105 |
105 |
106 |
106 |
107 @adapter_config(context=(IWfSharedContent, IPyAMSLayer, ISharedToolDashboardTable), provides=ITableElementName) |
107 @adapter_config(context=(ISharedTool, IPyAMSLayer, IDashboardTable), provides=ITableElementName) |
|
108 class SharedToolDashboardNameAdapter(ContextRequestViewAdapter): |
|
109 """Shared tool dashboard name adapter""" |
|
110 |
|
111 @property |
|
112 def name(self): |
|
113 return II18n(self.context).query_attribute('title', request=self.request) |
|
114 |
|
115 |
|
116 @adapter_config(context=(IWfSharedContent, IPyAMSLayer, IDashboardTable), provides=ITableElementName) |
108 class SharedToolDashboardContentNameAdapter(ContextRequestViewAdapter): |
117 class SharedToolDashboardContentNameAdapter(ContextRequestViewAdapter): |
109 """Shared tool dashboard content name adapter""" |
118 """Shared tool dashboard content name adapter""" |
110 |
119 |
111 @property |
120 @property |
112 def name(self): |
121 def name(self): |