[Zope-CVS] CVS: Products/CompositePage - designuis.py:1.3
Shane Hathaway
shane at zope.com
Fri Feb 27 11:19:19 EST 2004
Update of /cvs-repository/Products/CompositePage
In directory cvs.zope.org:/tmp/cvs-serv16975
Modified Files:
designuis.py
Log Message:
Added icons to the top bar of each slot.
=== Products/CompositePage/designuis.py 1.2 => 1.3 ===
--- Products/CompositePage/designuis.py:1.2 Thu Feb 26 16:38:11 2004
+++ Products/CompositePage/designuis.py Fri Feb 27 11:18:49 2004
@@ -292,15 +292,39 @@
"manual_styles.css", "text/css", _manual)
header_templates = (PageTemplateFile("header.pt", _manual),)
manual_js = RawFile("manual.js", "text/javascript", _manual)
+ add_icon = RawFile("add.gif", "image/gif", _manual)
+ remove_icon = RawFile("remove.gif", "image/gif", _manual)
+ cut_icon = RawFile("cut.gif", "image/gif", _manual)
+ copy_icon = RawFile("copy.gif", "image/gif", _manual)
+ paste_icon = RawFile("paste.gif", "image/gif", _manual)
- security.declarePublic("render")
- def render(self, composite):
- """Renders a composite, adding scripts and styles.
+ security.declarePublic("renderBody")
+ def renderBody(self, composite):
+ """Renders the slotting interface for a composite.
- Returns an HTML fragment (not a full page).
+ Returns an HTML fragment without the required scripts and
+ styles.
"""
slot_data = composite.getSlotData()
pt = self.body.__of__(composite)
- return pt(slot_data=slot_data)
+ return pt(ui=self, slot_data=slot_data)
+
+ security.declarePublic("render")
+ def render(self, composite):
+ """Renders a ZMI slotting interface for a composite.
+
+ Returns a full HTML page with scripts and styles.
+ """
+ fragments = self.getFragments(composite)
+ body = self.renderBody(composite)
+ res = []
+ res.append(composite.manage_page_header())
+ res.append(composite.manage_tabs())
+ res.append(fragments["header"])
+ res.append(fragments["top"])
+ res.append(body)
+ res.append(fragments["bottom"])
+ res.append(composite.manage_page_footer())
+ return '\n'.join(res)
Globals.InitializeClass(ManualUI)
More information about the Zope-CVS
mailing list