version 1.28, 2004/06/22 13:35:50
|
version 1.29, 2004/06/22 17:09:13
|
Line 722 class zogiLib(Folder):
|
Line 722 class zogiLib(Folder):
|
# assemble query string |
# assemble query string |
ret = "" |
ret = "" |
for param in dlParams.keys(): |
for param in dlParams.keys(): |
if dlParams[param] == None: continue |
if dlParams[param] is None: continue |
val = str(dlParams[param]) |
val = str(dlParams[param]) |
if val != "": |
if val != "": |
ret += param + "=" + val + "&" |
ret += param + "=" + val + "&" |
Line 1016 def manage_addZogiLib(self,id,title,digi
|
Line 1016 def manage_addZogiLib(self,id,title,digi
|
self.Destination()._setObject(id,newObj) |
self.Destination()._setObject(id,newObj) |
if RESPONSE is not None: |
if RESPONSE is not None: |
RESPONSE.redirect('manage_main') |
RESPONSE.redirect('manage_main') |
|
|
|
|
|
class zogiLibPageTemplate(ZopePageTemplate): |
|
"""pageTemplate Objekt""" |
|
meta_type="zogiLib_pageTemplate" |
|
|
|
|
|
## def __init__(self, id, text=None, contentType=None): |
|
## self.id = str(id) |
|
## self.ZBindings_edit(self._default_bindings) |
|
## if text is None: |
|
## text = open(self._default_cont).read() |
|
## self.pt_edit(text, contentType) |
|
|
|
def manage_addZogiLibPageTemplateForm(self): |
|
"""Form for adding""" |
|
pt=PageTemplateFile(os.path.join(package_home(globals()), 'zpt/addZogiLibPageTemplateForm')).__of__(self) |
|
return pt() |
|
|
|
def manage_addZogiLibPageTemplate(self, id='zogiLibMainTemplate', title=None, layout=None, text=None, |
|
REQUEST=None, submit=None): |
|
"Add a Page Template with optional file content." |
|
|
|
id = str(id) |
|
self._setObject(id, zogiLibPageTemplate(id)) |
|
ob = getattr(self, id) |
|
if not layout: layout = "book" |
|
ob.pt_edit(open(os.path.join(package_home(globals()),'zpt/zogiLibMain_%s.zpt'%layout)).read(),None) |
|
if title: |
|
ob.pt_setTitle(title) |
|
try: |
|
u = self.DestinationURL() |
|
except AttributeError: |
|
u = REQUEST['URL1'] |
|
|
|
u = "%s/%s" % (u, urllib.quote(id)) |
|
REQUEST.RESPONSE.redirect(u+'/manage_main') |
|
return '' |