Commit d1548b59 authored by Mayoro Diagne's avatar Mayoro Diagne

Use specific name according to portal_type, Document Procedure Definition for...

Use specific name according to portal_type, Document Procedure Definition for portal_type and View for Application

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36957 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4edf6f96
......@@ -428,10 +428,11 @@ class PDFTypeInformation(ERP5TypeInformation):
scribus_parser = ScribusParser(import_scribus_file)
import_scribus_file.close()
return scribus_parser.getERP5PropertyDict()
generateParsedScribus = CachingMethod(generateParsedScribus,
('PDFTypeInformation_generateParsedScribus',
md5.new(scribus_form.getData()).digest()),
cache_factory='dms_cache_factory')
cache_factory='erp5_content_long')
return generateParsedScribus()
def getERP5Form(self):
......@@ -594,7 +595,7 @@ class PDFTypeInformation(ERP5TypeInformation):
generateERP5FormCSS = CachingMethod(generateERP5FormCSS,
('PDFTypeInformation_generateERP5FormCSS',
md5.new(self.getDefaultScribusFormValue().getData()).digest()),
cache_factory='dms_cache_factory')
cache_factory='erp5_content_long')
self.REQUEST.RESPONSE.setHeader('Content-Type', 'text/css')
return generateERP5FormCSS()
......@@ -702,9 +703,13 @@ class PDFTypeInformation(ERP5TypeInformation):
portal_type_name = self.getId().replace(' ','')
pdf_form_name ='%s_view%sAsPdf' % (portal_type_name, portal_type_name)
action_list = ERP5TypeInformation.getCacheableActionList(self)
if self.getPortalType() == "EGov Type":
name = 'View'
else:
name = 'Document Procedure Definition'
return list(action_list) + [
CacheableAction(id='view',
name='Form',
CacheableAction(id='form',
name=name,
description='',
category='object_view',
priority=0.5,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment