Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
2d178ab0
Commit
2d178ab0
authored
Jul 11, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to change the title.
parent
f934c4b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
lib/python/ZClasses/Basic.py
lib/python/ZClasses/Basic.py
+8
-1
lib/python/ZClasses/ZClass.py
lib/python/ZClasses/ZClass.py
+2
-0
lib/python/ZClasses/itemProp.dtml
lib/python/ZClasses/itemProp.dtml
+7
-0
No files found.
lib/python/ZClasses/Basic.py
View file @
2d178ab0
...
...
@@ -87,15 +87,18 @@
import
Globals
,
OFS
.
PropertySheets
,
OFS
.
Image
,
ExtensionClass
from
string
import
split
,
join
,
strip
import
Acquisition
class
ZClassBasicSheet
(
OFS
.
PropertySheets
.
PropertySheet
,
OFS
.
PropertySheets
.
View
):
"""Provide management view for item classes
"""
_getZClass
=
Acquisition
.
Acquired
manage
=
Globals
.
HTMLFile
(
'itemProp'
,
globals
())
def
manage_edit
(
self
,
meta_type
=
''
,
icon
=
''
,
file
=
''
,
class_id
=
None
,
REQUEST
=
None
):
class_id
=
None
,
title
=
None
,
REQUEST
=
None
):
"""Set basic item properties.
"""
if
meta_type
:
self
.
setClassAttr
(
'meta_type'
,
meta_type
)
...
...
@@ -115,6 +118,9 @@ class ZClassBasicSheet(OFS.PropertySheets.PropertySheet,
self
.
setClassAttr
(
'icon'
,
icon
)
if
title
is
not
None
:
self
.
_getZClass
().
title
=
title
if
class_id
is
not
None
and
class_id
!=
self
.
class_id
():
self
.
changeClassId
(
class_id
)
...
...
@@ -133,6 +139,7 @@ class ZClassBasicSheet(OFS.PropertySheets.PropertySheet,
def
class_id
(
self
):
return
(
self
.
getClassAttr
(
'__module__'
,
''
)
or
''
)[
1
:]
def
zClassTitle
(
self
):
return
self
.
_getZClass
().
title
class
ZClassViewsSheet
(
OFS
.
PropertySheets
.
PropertySheet
,
OFS
.
PropertySheets
.
View
):
...
...
lib/python/ZClasses/ZClass.py
View file @
2d178ab0
...
...
@@ -514,6 +514,8 @@ class ZClass(OFS.SimpleItem.SimpleItem):
elif
hasattr
(
c
,
'__name__'
):
r
.
append
(
c
.
__name__
)
return
r
def
_getZClass
(
self
):
return
self
class
ZClassSheets
(
OFS
.
PropertySheets
.
PropertySheets
):
"Manage a collection of property sheets that provide ZClass management"
...
...
lib/python/ZClasses/itemProp.dtml
View file @
2d178ab0
...
...
@@ -17,6 +17,13 @@ will need to be adjusted if the class is moved.</p>
<TD ALIGN="LEFT" VALIGN="TOP"><!--#var "_.string.join(ZClassBaseClassNames(), ', ')"-->
</TD>
</TR>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">title</TH>
<TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="TEXT" NAME="title" SIZE="40"
value="<!--#var zClassTitle-->">
</TD>
</TR>
<TR>
<TH ALIGN="LEFT" VALIGN="TOP">meta type</TH>
<TD ALIGN="LEFT" VALIGN="TOP">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment