From dc7794e025c1d97d608190c61935eaeb87d8bc84 Mon Sep 17 00:00:00 2001 From: Fabien Morin <fabien@nexedi.com> Date: Mon, 17 Mar 2008 18:49:43 +0000 Subject: [PATCH] 2008-03-17 fabien * Translate and reindent UseCaseModule_viewUseCaseReportAsSxw. make it working on Use Case Object and Module instead of just module. * add use_case_report action on Use Case Portal Type. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19974 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../Use%20Case/use_case_report.xml | 83 ++++++ .../UseCaseModule_viewUseCaseReportAsSxw.xml | 269 ++++++++++-------- bt5/erp5_consulting/bt/change_log | 5 + bt5/erp5_consulting/bt/revision | 2 +- .../bt/template_action_path_list | 1 + 5 files changed, 233 insertions(+), 127 deletions(-) create mode 100644 bt5/erp5_consulting/ActionTemplateItem/portal_types/Use%20Case/use_case_report.xml diff --git a/bt5/erp5_consulting/ActionTemplateItem/portal_types/Use%20Case/use_case_report.xml b/bt5/erp5_consulting/ActionTemplateItem/portal_types/Use%20Case/use_case_report.xml new file mode 100644 index 0000000000..809d5e6821 --- /dev/null +++ b/bt5/erp5_consulting/ActionTemplateItem/portal_types/Use%20Case/use_case_report.xml @@ -0,0 +1,83 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_report</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>use_case_report</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>1.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Use Case Report</string> </value> + </item> + <item> + <key> <string>visible</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Expression" module="Products.CMFCore.Expression"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${object_url}/UseCaseModule_viewUseCaseReportDialog</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.xml b/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.xml index 4be52cfc63..da2d5594cb 100644 --- a/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.xml +++ b/bt5/erp5_consulting/SkinTemplateItem/portal_skins/erp5_consulting/UseCaseModule_viewUseCaseReportAsSxw.xml @@ -58,7 +58,25 @@ <value> <string encoding="cdata"><![CDATA[ <?xml version="1.0" encoding="UTF-8"?>\n -<office:document-content xmlns:draw=\'http://openoffice.org/2000/drawing\' xmlns:office=\'http://openoffice.org/2000/office\' xmlns:text=\'http://openoffice.org/2000/text\' xmlns:number=\'http://openoffice.org/2000/datastyle\' xmlns:chart=\'http://openoffice.org/2000/chart\' xmlns:table=\'http://openoffice.org/2000/table\' xmlns:dr3d=\'http://openoffice.org/2000/dr3d\' xmlns:fo=\'http://www.w3.org/1999/XSL/Format\' xmlns:style=\'http://openoffice.org/2000/style\' xmlns:form=\'http://openoffice.org/2000/form\' xmlns:script=\'http://openoffice.org/2000/script\' xmlns:svg=\'http://www.w3.org/2000/svg\' xmlns:xlink=\'http://www.w3.org/1999/xlink\' xmlns:math=\'http://www.w3.org/1998/Math/MathML\' office:class=\'text\' office:version=\'1.0\' xmlns:tal=\'http://xml.zope.org/namespaces/tal\'>\n +<office:document-content \n + xmlns:draw=\'http://openoffice.org/2000/drawing\' \n + xmlns:office=\'http://openoffice.org/2000/office\' \n + xmlns:text=\'http://openoffice.org/2000/text\' \n + xmlns:number=\'http://openoffice.org/2000/datastyle\' \n + xmlns:chart=\'http://openoffice.org/2000/chart\' \n + xmlns:table=\'http://openoffice.org/2000/table\' \n + xmlns:dr3d=\'http://openoffice.org/2000/dr3d\' \n + xmlns:fo=\'http://www.w3.org/1999/XSL/Format\' \n + xmlns:style=\'http://openoffice.org/2000/style\' \n + xmlns:form=\'http://openoffice.org/2000/form\' \n + xmlns:script=\'http://openoffice.org/2000/script\' \n + xmlns:svg=\'http://www.w3.org/2000/svg\' \n + xmlns:xlink=\'http://www.w3.org/1999/xlink\' \n + xmlns:math=\'http://www.w3.org/1998/Math/MathML\' \n + office:class=\'text\' \n + office:version=\'1.0\' \n + xmlns:tal=\'http://xml.zope.org/namespaces/tal\'\n + xmlns:i18n=\'http://xml.zope.org/namespaces/i18n\'>\n <office:script/>\n <office:font-decls>\n <style:font-decl style:name="Tahoma1" fo:font-family="Tahoma"/>\n @@ -126,135 +144,134 @@ <text:sequence-decl text:display-outline-level=\'0\' text:name=\'Drawing\'/>\n </text:sequence-decls>\n \n - <text:p text:style-name=\'Text body\'>Nexedi SARL</text:p>\n + <text:p text:style-name=\'Text body\'>Nexedi SA</text:p>\n \n - <div tal:omit-tag=\'\' tal:repeat=\'usecase python:here.objectValues(portal_type="Use Case",sort_on=(("int_index",),))\'>\n - <tal:block tal:condition="python: usecase.getValidationState() == \'draft\'">\n - <text:h text:style-name=\'Heading 2\' text:level=\'2\'>Use Case : <span tal:replace=\'usecase/getTitle\'>Title</span></text:h>\n - \n - <text:p text:style-name=\'Text body\' tal:content=\'usecase/getDescription\'>Use Case Description</text:p>\n - \n - <tal:block \n - tal:condition="python:usecase.contentValues(filter={\'portal_type\':\'Image\'})">\n - <text:h text:style-name=\'Heading 3\' text:level=\'3\'>Related Requirement Processes</text:h>\n - \n - <tal:block tal:repeat="image python:usecase.contentValues(filter={\'portal_type\':\'Image\'})"> \n - <text:p text:style-name="Text body" tal:content="image/getDescription"\n - tal:condition="image/getDescription">Description</text:p>\n - <text:p text:style-name="Image body" fo:text-align="center">\n - <draw:image draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char"\n - draw:z-index="0" xlink:href="#Pictures/0001.png" \n - svg:width="12cm"\n - svg:height="7.516cm" \n - xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"\n - tal:attributes="xlink:href python:request.oo_builder.addImage(image.index_html(None,None));\n - svg:height python:\'%scm\' % (12 * float(image.height()) / max(float(image.width()),0))" />\n - </text:p>\n - </tal:block>\n - \n - </tal:block>\n - \n - \n - <text:h text:style-name=\'Heading 3\' text:level=\'3\'>Actors</text:h>\n - <text:p text:style-name="Text body">Actors involved in this Use Case are listed bellow:</text:p>\n - <table:table table:style-name=\'Tableau1\' table:name=\'Tableau1\'>\n - <table:table-column table:style-name="Tableau1.A"/>\n - <table:table-column table:style-name="Tableau1.B"/>\n - <table:table-column table:style-name="Tableau1.E"/>\n - <table:table-header-rows>\n - <table:table-row>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n - <text:p text:style-name=\'P1\'>Title</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n - <text:p text:style-name=\'P1\'>Description</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D1\'>\n - <text:p text:style-name=\'P1\'>Role</text:p>\n - </table:table-cell>\n - </table:table-row>\n - </table:table-header-rows>\n - \n - <table:table-row tal:repeat=\'actor python:usecase.contentValues(filter={"portal_type":"Use Case Actor"})\'>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n - <text:p text:style-name=\'P2\' tal:content=\'actor/getTitle\'>Title</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n - <text:p text:style-name=\'P2\' tal:content=\'actor/getDescription\'>Description</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D2\'>\n - <text:p text:style-name=\'P2\'\n - tal:repeat="role python: actor.getUseCaseActorRoleTitleList()"\n - tal:content=\'role\'>Role</text:p>\n - </table:table-cell>\n - </table:table-row>\n - </table:table>\n - \n - <text:h text:style-name=\'Heading 3\' text:level=\'3\'>Scenarii</text:h>\n - <div tal:omit-tag=\'\' tal:repeat=\'scenario python:usecase.searchFolder(portal_type="Use Case Scenario", sort_on=(("int_index", "ASC"), ("id", "ASC")))\'>\n - \n - <text:h text:style-name=\'Heading 4\' text:level=\'4\'>Scenario <span tal:replace=\'repeat/scenario/number\'>1</span> : <span tal:replace=\'python: scenario.getObject().getTitle()\'>Scenario Title</span></text:h>\n - \n - <text:p text:style-name=\'Text body\' tal:content=\'python: scenario.getObject().getDescription()\'>Scenario Description</text:p>\n - \n - <table:table table:style-name=\'Tableau1\' table:name=\'Tableau1\'>\n - \n - <table:table-column table:style-name="Tableau1.A"/>\n - <table:table-column table:style-name="Tableau1.B"/>\n - <table:table-column table:style-name="Tableau1.C"/>\n - <table:table-column table:style-name="Tableau1.D"/>\n - <table:table-column table:style-name="Tableau1.E"/>\n - \n - <table:table-header-rows>\n - <table:table-row>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n - <text:p text:style-name=\'P1\'>No</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n - <text:p text:style-name=\'P1\'>Title</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n - <text:p text:style-name=\'P1\'>Description</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n - <text:p text:style-name=\'P1\'>Actor</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D1\'>\n - <text:p text:style-name=\'P1\'>Requirements</text:p>\n - </table:table-cell>\n - </table:table-row>\n - </table:table-header-rows>\n - <table:table-row tal:repeat="step python: scenario.getObject().searchFolder(portal_type=\'Use Case Scenario Step\', sort_on=((\'int_index\', \'ASC\'), (\'id\', \'ASC\')))">\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n - <text:p text:style-name=\'P2\' tal:content=\'repeat/step/number\'>Index</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n - <text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getTitle()\'>Index</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n - <text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getDescription()\'>Description</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n - <text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getSourceSectionTitle()\'>Actor</text:p>\n - </table:table-cell>\n - <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D2\'>\n - <tal:block tal:condition="python: step.getObject().getRequirementList()">\n - <text:p text:style-name=\'P2\'\n - tal:repeat="ref python: step.getObject().getRequirementTitleList()"\n - tal:content=\'ref\'>Actor</text:p> \n - </tal:block>\n - <tal:block tal:condition="python:not step.getObject().getRequirementList()">\n - <text:p text:style-name=\'P2\'>N.A.</text:p> \n + <div tal:omit-tag=\'\' tal:repeat=\'usecase python:here.objectValues(portal_type="Use Case",sort_on=(("int_index",),)) or (context,)\'>\n + <tal:block tal:condition="python: usecase.getValidationState() == \'draft\'">\n + <text:h text:style-name=\'Heading 2\' text:level=\'2\' i18n:domain="ui" i18n:translate="">Use Case : <span tal:replace=\'usecase/getTitle\'>Title</span></text:h>\n + \n + <text:p text:style-name=\'Text body\' tal:content=\'usecase/getDescription\'>Use Case Description</text:p>\n + \n + <tal:block tal:condition="python:usecase.contentValues(filter={\'portal_type\':\'Image\'})">\n + <text:h text:style-name=\'Heading 3\' text:level=\'3\' i18n:domain="ui" i18n:translate="">Related Requirement Processes</text:h>\n + \n + <tal:block tal:repeat="image python:usecase.contentValues(filter={\'portal_type\':\'Image\'})"> \n + <text:p text:style-name="Text body" tal:content="image/getDescription"\n + tal:condition="image/getDescription">Description</text:p>\n + <text:p text:style-name="Image body" fo:text-align="center">\n + <draw:image draw:style-name="fr1" draw:name="Image1" text:anchor-type="as-char"\n + draw:z-index="0" xlink:href="#Pictures/0001.png" \n + svg:width="12cm"\n + svg:height="7.516cm" \n + xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"\n + tal:attributes="xlink:href python:request.oo_builder.addImage(image.index_html(None,None));\n + svg:height python:\'%scm\' % (12 * float(image.height()) / max(float(image.width()),0))" />\n + </text:p>\n </tal:block>\n - </table:table-cell>\n - </table:table-row>\n - </table:table>\n - </div>\n + \n + </tal:block>\n + \n + \n + <text:h text:style-name=\'Heading 3\' text:level=\'3\'>Actors</text:h>\n + <text:p text:style-name="Text body" i18n:domain="ui" i18n:translate="">Actors involved in this Use Case are listed bellow:</text:p>\n + <table:table table:style-name=\'Tableau1\' table:name=\'Tableau1\'>\n + <table:table-column table:style-name="Tableau1.A"/>\n + <table:table-column table:style-name="Tableau1.B"/>\n + <table:table-column table:style-name="Tableau1.E"/>\n + <table:table-header-rows>\n + <table:table-row>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n + <text:p text:style-name=\'P1\' i18n:domain="ui" i18n:translate="">Title</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n + <text:p text:style-name=\'P1\' i18n:domain="ui" i18n:translate="">Description</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D1\'>\n + <text:p text:style-name=\'P1\' i18n:domain="ui" i18n:translate="">Role</text:p>\n + </table:table-cell>\n + </table:table-row>\n + </table:table-header-rows>\n + \n + <table:table-row tal:repeat=\'actor python:usecase.contentValues(filter={"portal_type":"Use Case Actor"})\'>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n + <text:p text:style-name=\'P2\' tal:content=\'actor/getTitle\'>Title</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n + <text:p text:style-name=\'P2\' tal:content=\'actor/getDescription\'>Description</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D2\'>\n + <text:p text:style-name=\'P2\'\n + tal:repeat="role python: actor.getUseCaseActorRoleTitleList()"\n + tal:content=\'role\'>Role</text:p>\n + </table:table-cell>\n + </table:table-row>\n + </table:table>\n + \n + <text:h text:style-name=\'Heading 3\' text:level=\'3\' i18n:domain="ui" i18n:translate="">Scenarii</text:h>\n + <div tal:omit-tag=\'\' tal:repeat=\'scenario python:usecase.searchFolder(portal_type="Use Case Scenario", sort_on=(("int_index", "ASC"), ("id", "ASC")))\'>\n + \n + <text:h text:style-name=\'Heading 4\' text:level=\'4\' i18n:domain="ui" i18n:translate="">Scenario <span tal:replace=\'repeat/scenario/number\'>1</span> : <span tal:replace=\'python: scenario.getObject().getTitle()\'>Scenario Title</span></text:h>\n + \n + <text:p text:style-name=\'Text body\' tal:content=\'python: scenario.getObject().getDescription()\'>Scenario Description</text:p>\n + \n + <table:table table:style-name=\'Tableau1\' table:name=\'Tableau1\'>\n + \n + <table:table-column table:style-name="Tableau1.A"/>\n + <table:table-column table:style-name="Tableau1.B"/>\n + <table:table-column table:style-name="Tableau1.C"/>\n + <table:table-column table:style-name="Tableau1.D"/>\n + <table:table-column table:style-name="Tableau1.E"/>\n + \n + <table:table-header-rows>\n + <table:table-row>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n + <text:p text:style-name=\'P1\' i18n:domain="ui" i18n:translate="">No</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n + <text:p text:style-name=\'P1\' i18n:domain="ui" i18n:translate="">Title</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n + <text:p text:style-name=\'P1\' i18n:domain="ui" i18n:translate="">Description</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A1\'>\n + <text:p text:style-name=\'P1\' i18n:domain="ui" i18n:translate="">Actor</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D1\'>\n + <text:p text:style-name=\'P1\' i18n:domain="ui" i18n:translate="">Requirements</text:p>\n + </table:table-cell>\n + </table:table-row>\n + </table:table-header-rows>\n + <table:table-row tal:repeat="step python: scenario.getObject().searchFolder(portal_type=\'Use Case Scenario Step\', sort_on=((\'int_index\', \'ASC\'), (\'id\', \'ASC\')))">\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n + <text:p text:style-name=\'P2\' tal:content=\'repeat/step/number\'>Index</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n + <text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getTitle()\'>Index</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n + <text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getDescription()\'>Description</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.A2\'>\n + <text:p text:style-name=\'P2\' tal:content=\'python: step.getObject().getSourceSectionTitle()\'>Actor</text:p>\n + </table:table-cell>\n + <table:table-cell table:value-type=\'string\' table:style-name=\'Tableau1.D2\'>\n + <tal:block tal:condition="python: step.getObject().getRequirementList()">\n + <text:p text:style-name=\'P2\'\n + tal:repeat="ref python: step.getObject().getRequirementTitleList()"\n + tal:content=\'ref\'>Actor</text:p> \n + </tal:block>\n + <tal:block tal:condition="python:not step.getObject().getRequirementList()">\n + <text:p text:style-name=\'P2\'>N.A.</text:p> \n + </tal:block>\n + </table:table-cell>\n + </table:table-row>\n + </table:table>\n + </div>\n \n - \n + \n \n - \n - </tal:block>\n + \n + </tal:block>\n </div>\n </office:body>\n </office:document-content>\n diff --git a/bt5/erp5_consulting/bt/change_log b/bt5/erp5_consulting/bt/change_log index 269b7624c4..55fdc15f4b 100644 --- a/bt5/erp5_consulting/bt/change_log +++ b/bt5/erp5_consulting/bt/change_log @@ -1,3 +1,8 @@ +2008-03-17 fabien +* Translate and reindent UseCaseModule_viewUseCaseReportAsSxw. +make it working on Use Case Object and Module instead of just module. +* add use_case_report action on Use Case Portal Type. + 2007-09-25 yo * Set module group on portal types. diff --git a/bt5/erp5_consulting/bt/revision b/bt5/erp5_consulting/bt/revision index cabf43b5dd..dc7b54ad01 100644 --- a/bt5/erp5_consulting/bt/revision +++ b/bt5/erp5_consulting/bt/revision @@ -1 +1 @@ -24 \ No newline at end of file +33 \ No newline at end of file diff --git a/bt5/erp5_consulting/bt/template_action_path_list b/bt5/erp5_consulting/bt/template_action_path_list index 7e584d2a9f..e642fc6a47 100644 --- a/bt5/erp5_consulting/bt/template_action_path_list +++ b/bt5/erp5_consulting/bt/template_action_path_list @@ -33,4 +33,5 @@ Use Case Scenario | view Use Case | actor_fast_input Use Case | actors Use Case | scenarii_fast_input +Use Case | use_case_report Use Case | view \ No newline at end of file -- 2.30.9