-
Notifications
You must be signed in to change notification settings - Fork 0
/
ZMSItem.py
99 lines (87 loc) · 4.2 KB
/
ZMSItem.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
################################################################################
# ZMSItem.py
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
################################################################################
# Imports.
from DateTime.DateTime import DateTime
from App.special_dtml import HTMLFile
from Persistence import Persistent
from Acquisition import Implicit
import OFS.SimpleItem, OFS.ObjectManager
import string
################################################################################
################################################################################
###
### Abstract Class ZMSItem
###
################################################################################
################################################################################
class ZMSItem(
OFS.ObjectManager.ObjectManager,
OFS.SimpleItem.Item,
Persistent, # Persistent.
Implicit, # Acquisition.
):
# Documentation string.
__doc__ = """ZMS product module."""
# Version string.
__version__ = '0.1'
# Management Permissions.
# -----------------------
__authorPermissions__ = (
'manage_page_request', 'manage_page_header', 'manage_page_footer', 'manage_tabs', 'manage_tabs_sub', 'manage_bodyTop', 'manage_main_iframe'
)
__viewPermissions__ = (
'manage_menu',
)
__ac_permissions__=(
('ZMS Author', __authorPermissions__),
('View', __viewPermissions__),
)
# Templates.
# ----------
f_bodyContent = HTMLFile('dtml/object/f_bodycontent', globals()) # Template: Body-Content / Element
manage = HTMLFile('dtml/object/manage', globals())
manage_workspace = HTMLFile('dtml/object/manage', globals()) # ZMI Manage
manage_main = HTMLFile('dtml/ZMSObject/manage_main', globals())
manage_tabs = HTMLFile('dtml/object/manage_tabs', globals()) # ZMI Tabulators
manage_tabs_sub = HTMLFile('dtml/object/manage_tabs_sub', globals()) # ZMI Tabulators (Sub)
manage_bodyTop = HTMLFile('dtml/object/manage_bodytop', globals()) # ZMI bodyTop
manage_page_request = HTMLFile('dtml/object/manage_page_request', globals()) # ZMI Page Request
manage_page_header = HTMLFile('dtml/object/manage_page_header', globals()) # ZMI Page Header
manage_page_footer = HTMLFile('dtml/object/manage_page_footer', globals()) # ZMI Page Footer
manage_main_iframe = HTMLFile('dtml/ZMSObject/manage_main_iframe', globals()) # ZMI Iframe
# --------------------------------------------------------------------------
# ZMSItem.display_icon:
#
# @param REQUEST
# --------------------------------------------------------------------------
def display_icon(self, REQUEST, meta_type=None, key='icon', zpt=None):
if meta_type is None:
return self.icon
else:
return self.aq_parent.display_icon( REQUEST, meta_type, key, zpt)
# --------------------------------------------------------------------------
# ZMSItem.getTitlealt
# --------------------------------------------------------------------------
def getTitlealt( self, REQUEST):
return self.getZMILangStr( self.meta_type)
# --------------------------------------------------------------------------
# ZMSItem.breadcrumbs_obj_path:
# --------------------------------------------------------------------------
def breadcrumbs_obj_path(self, portalMaster=True):
return self.aq_parent.breadcrumbs_obj_path(portalMaster)
################################################################################