Mercurial > hg > MPIWGWeb
diff MPIWGStaff.py @ 2:ddf6c1a27a4b
new version with main_template and css in product.
author | casties |
---|---|
date | Thu, 07 Feb 2013 19:50:39 +0100 |
parents | bca61e893fcc |
children | ee3eb9a6665a |
line wrap: on
line diff
--- a/MPIWGStaff.py Wed Jan 30 11:47:21 2013 +0100 +++ b/MPIWGStaff.py Thu Feb 07 19:50:39 2013 +0100 @@ -4,7 +4,6 @@ # TODO: wird username gebraucht? from OFS.Folder import Folder -from Products.ZSQLExtend.ZSQLExtend import ZSQLExtendFolder from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplate import PageTemplate from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate @@ -12,9 +11,11 @@ from Products.versionedFile.extVersionedFile import extVersionedFileFolder from AccessControl import getSecurityManager +from Products.ZSQLExtend.ZSQLExtend import ZSQLExtendFolder +from Products.ZDBInterface.ZDBInterfaceFolder import ZDBInterfaceFolder + import os import logging -import bibliography import email from Globals import package_home from Products.PythonScripts.standard import sql_quote @@ -22,12 +23,13 @@ from AccessControl import ClassSecurityInfo import time import logging -import email import re from OFS.Cache import Cacheable import urllib2 import transaction + import SrvTxtUtils +import bibliography from MPIWGHelper import * #ersetzt logging @@ -633,7 +635,7 @@ def getProfile(self): """get the profile""" - self.REQUEST.RESPONSE.setHeader('Last-Modified',email.Utils.formatdate().split("-")[0]+'GMT') + self.REQUEST.RESPONSE.setHeader('Last-Modified',email.Utils.formatdate().split("-")[0]+'GMT') founds=self.ZSQLInlineSearchU(_table='personal_www',key=self.getKeyUTF8()) html="""<html><body>%s</body></html>""" @@ -997,8 +999,32 @@ self._setObject(id,newObj) - if RESPONSE is not None: self.redirect(RESPONSE,'manage_main') +class MPIWGStaffFolder(ZDBInterfaceFolder): + """Folder of staff objects""" + + meta_type="MPIWGStaffFolder" + security=ClassSecurityInfo() + + def index_html(self,REQUEST,RESPONSE): + """show homepage""" + logging.debug("MPIWGStaffFolder: index_html!") + return REQUEST + +def manage_addMPIWGStaffFolderForm(self): + """form for adding the project""" + pt=PageTemplateFile('zpt/addMPIWGStaffFolderForm', globals()).__of__(self) + return pt() + +def manage_addMPIWGStaffFolder(self,id,title,RESPONSE=None): + """add it""" + newObj=MPIWGStaffFolder(id,title) + + self._setObject(id,newObj) + + if RESPONSE is not None: + RESPONSE.redirect('manage_main') +