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
784b0178
Commit
784b0178
authored
Oct 15, 2001
by
Evan Simpson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add om_icons protocol, and use it in PageTemplates to show error status.
parent
e2c54e47
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
4 deletions
+32
-4
lib/python/OFS/dtml/main.dtml
lib/python/OFS/dtml/main.dtml
+12
-1
lib/python/Products/PageTemplates/ZopePageTemplate.py
lib/python/Products/PageTemplates/ZopePageTemplate.py
+15
-2
lib/python/Products/PageTemplates/__init__.py
lib/python/Products/PageTemplates/__init__.py
+5
-1
lib/python/Products/PageTemplates/www/exclamation.gif
lib/python/Products/PageTemplates/www/exclamation.gif
+0
-0
No files found.
lib/python/OFS/dtml/main.dtml
View file @
784b0178
...
...
@@ -107,7 +107,15 @@ function toggleSelect() {
<td align="left" valign="top" width="16">
<input type="checkbox" name="ids:list" value="&dtml-sequence-key;" />
</td>
<td align="left" valign="top">
<td align="left" valign="top" nowrap="1">
<dtml-if om_icons>
<a href="&dtml.url_quote-sequence-key;/manage_workspace">
<dtml-in om_icons mapping>
<img src="&dtml-BASEPATH1;/&dtml.url_quote-path;" alt="&dtml.missing-alt;"
title="&dtml.missing-title;" border="0" /></dtml-in></a>
<dtml-else>
<dtml-if icon>
<a href="&dtml.url_quote-sequence-key;/manage_workspace">
<img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;"
...
...
@@ -115,6 +123,9 @@ function toggleSelect() {
<dtml-else>
</dtml-if>
</dtml-if>
</td>
<td align="left" valign="top">
<div class="list-item">
...
...
lib/python/Products/PageTemplates/ZopePageTemplate.py
View file @
784b0178
...
...
@@ -87,10 +87,10 @@
Zope object encapsulating a Page Template.
"""
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
2
$'
[
11
:
-
2
]
import
os
,
AccessControl
,
Acquisition
,
sys
from
Globals
import
DTMLFile
,
MessageDialog
,
package_home
from
Globals
import
DTMLFile
,
ImageFile
,
MessageDialog
,
package_home
from
zLOG
import
LOG
,
ERROR
,
INFO
from
OFS.SimpleItem
import
SimpleItem
from
DateTime.DateTime
import
DateTime
...
...
@@ -322,6 +322,16 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
return
self
.
_text
return
self
.
read
()
def
om_icons
(
self
):
"""Return a list of icon URLs to be displayed by an ObjectManager"""
icons
=
({
'path'
:
'misc_/PageTemplates/zpt.gif'
,
'alt'
:
self
.
meta_type
,
'title'
:
self
.
meta_type
},)
if
self
.
_v_errors
:
icons
=
icons
+
({
'path'
:
'misc_/PageTemplates/exclamation.gif'
,
'alt'
:
'Error'
,
'title'
:
'This template has an error'
},)
return
icons
def
__setstate__
(
self
,
state
):
ZopePageTemplate
.
inheritedAttribute
(
'__setstate__'
)(
self
,
state
)
self
.
_cook
()
...
...
@@ -375,6 +385,9 @@ def manage_addPageTemplate(self, id, title=None, text=None,
REQUEST
.
RESPONSE
.
redirect
(
u
+
'/manage_main'
)
return
''
from
Products.PageTemplates
import
misc_
misc_
[
'exclamation.gif'
]
=
ImageFile
(
'www/exclamation.gif'
,
globals
())
def
initialize
(
context
):
context
.
registerClass
(
ZopePageTemplate
,
...
...
lib/python/Products/PageTemplates/__init__.py
View file @
784b0178
...
...
@@ -87,9 +87,13 @@ __doc__='''Package wrapper for Page Templates
This wrapper allows the Page Template modules to be segregated in a
separate package.
$Id: __init__.py,v 1.
1 2001/03/23 17:19:07
evan Exp $'''
$Id: __init__.py,v 1.
2 2001/10/15 19:52:03
evan Exp $'''
__version__
=
'$$'
[
11
:
-
2
]
# Placeholder for Zope Product data
misc_
=
{}
def
initialize
(
context
):
# Import lazily, and defer initialization to the module
import
ZopePageTemplate
...
...
lib/python/Products/PageTemplates/www/exclamation.gif
0 → 100644
View file @
784b0178
150 Bytes
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