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
d044cf26
Commit
d044cf26
authored
Nov 04, 2003
by
Lennart Regebro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added pretty label support for properties.
parent
a4e1e8a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
doc/CHANGES.txt
doc/CHANGES.txt
+5
-0
lib/python/OFS/PropertyManager.py
lib/python/OFS/PropertyManager.py
+4
-1
No files found.
doc/CHANGES.txt
View file @
d044cf26
...
...
@@ -28,6 +28,11 @@ Zope Changes
"import" new schema components to allow 3rd-party components
(such as storages, databases, or logging handlers) to be used.
- The standard ProperyManager now includes the same label
functionality as the CMF SimpleItemWithProperties object.
By adding a 'label' entry to the property definition you
can now display a prettier label for the property.
Bugs fixed
- Made the control panel properly reflect the cache-size setting
...
...
lib/python/OFS/PropertyManager.py
View file @
d044cf26
...
...
@@ -12,7 +12,7 @@
##############################################################################
"""Property management"""
__version__
=
'$Revision: 1.5
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.5
4
$'
[
11
:
-
2
]
import
ExtensionClass
,
Globals
import
ZDOM
...
...
@@ -229,6 +229,9 @@ class PropertyManager(ExtensionClass.Base, ZDOM.ElementWithAttributes):
def
propertyLabel
(
self
,
id
):
"""Return a label for the given property id
"""
for
p
in
self
.
_properties
:
if
p
[
'id'
]
==
id
:
return
p
.
get
(
'label'
,
id
)
return
id
def
propdict
(
self
):
...
...
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