|
|
| version 1.186, 2004/10/28 10:57:05 | version 1.188, 2004/11/10 16:32:11 |
|---|---|
| Line 29 from Products.PageTemplates.PageTemplate | Line 29 from Products.PageTemplates.PageTemplate |
| from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate | from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate |
| from Globals import Persistent, package_home | from Globals import Persistent, package_home |
| from Acquisition import Implicit | from Acquisition import Implicit |
| from ECHO_helpers import displayTypes, getText,readFieldFromXML | from ECHO_helpers import * |
| import urllib | import urllib |
| import smtplib | import smtplib |
| import time | import time |
| Line 263 def content_html(self,type): | Line 263 def content_html(self,type): |
| pt.content_type="text/html" | pt.content_type="text/html" |
| return pt() | return pt() |
| def toList(field): | |
| """Einzelfeld in Liste umwandeln""" | |
| if type(field)==StringType: | |
| return [field] | |
| else: | |
| return field | |
| Line 305 class BrowserCheck: | Line 299 class BrowserCheck: |
| """check the browsers request to find out the browser type""" | """check the browsers request to find out the browser type""" |
| def __init__(self, zope): | def __init__(self, zope): |
| """initialisiere""" | |
| self.ua = zope.REQUEST.get_header("HTTP_USER_AGENT") | self.ua = zope.REQUEST.get_header("HTTP_USER_AGENT") |
| self.isN4 = (string.find(self.ua, 'Mozilla/4.') > -1) and (string.find(self.ua, 'MSIE') < 0) | self.isN4 = (string.find(self.ua, 'Mozilla/4.') > -1) and (string.find(self.ua, 'MSIE') < 0) |
| self.isIE = string.find(self.ua, 'MSIE') > -1 | self.isIE = string.find(self.ua, 'MSIE') > -1 |
| Line 317 class BrowserCheck: | Line 312 class BrowserCheck: |
| self.isIEWin = self.isIE and self.isWin | self.isIEWin = self.isIE and self.isWin |
| self.isIEMac = self.isIE and self.isMac | self.isIEMac = self.isIE and self.isMac |
| class Hello(Folder): | |
| """helloo""" | |
| def __init__(self): | |
| self.test=test | |
| meta_type="ECHO_copyright" | |
| def __init__(self,id,title,copyrights): | |
| """init""" | |
| self.title=title | |
| self.id=id | |
| self.copyrights=copyrights[0:] | |
| def getCopyrights(self): | |
| """return coyprights""" | |
| return self.copyrights | |
| manage_options = Folder.manage_options+( | |
| {'label':'Main Config','action':'ECHO_copyright_configForm'}, | |
| ) | |
| def ECHO_copyright_configForm(self): | |
| """change form""" | |
| pt=PageTemplateFile('Products/ECHO_content/zpt/ChangeECHO_copyright').__of__(self) | |
| pt.content_type="text/html" | |
| return pt() | |
| def ECHO_copyright_config(self,title,RESPONSE=None): | |
| """change""" | |
| self.title=title | |
| self.copyrights=[] | |
| self.copyrights=getCopyrightsFromForm(self,self.REQUEST.form)[0:] | |
| if RESPONSE is not None: | |
| RESPONSE.redirect('manage_main') | |
| Line 3624 class ECHO_root(Folder,Persistent,Implic | Line 3657 class ECHO_root(Folder,Persistent,Implic |
| if self.checkRef(ref): | if self.checkRef(ref): |
| if pn: | if pn: |
| link.setAttribute("href",self.aq_parent.absolute_url()+"/vlp_coll?id="+ref+"&p="+pn) | link.setAttribute("href",self.aq_parent.absolute_url()+"/references?id="+ref+"&p="+pn) |
| else: | else: |
| link.setAttribute("href",self.aq_parent.absolute_url()+"/vlp_coll?id="+ref) | link.setAttribute("href",self.aq_parent.absolute_url()+"/references?id="+ref) |
| newxml=dom.toxml('utf-8') | newxml=dom.toxml('utf-8') |
| Line 4267 def manage_addECHO_institution(self, id, | Line 4300 def manage_addECHO_institution(self, id, |
| except: url=REQUEST['URL1'] | except: url=REQUEST['URL1'] |
| REQUEST.RESPONSE.redirect('%s/manage_main' % url) | REQUEST.RESPONSE.redirect('%s/manage_main' % url) |
| return id | return id |