Commit 3775d6df authored by Jean-Paul Smets's avatar Jean-Paul Smets

Updated actions and skins to support preview and download.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13687 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae3759a8
......@@ -102,7 +102,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: object.hasBaseData() and not object.hasSnapshot()</string> </value>
<value> <string>python: object.hasBaseData() and not object.hasSnapshotData()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_downloadDialog</string> </value>
<value> <string>string:${object_url}/Document_viewDownloadDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_getOOoFileDialog</string> </value>
<value> <string>string:${object_url}/OOoDocument_viewOOoFileDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_getSnapshotDialog</string> </value>
<value> <string>string:${object_url}/OOoDocument_viewSnapshotDialog</string> </value>
</item>
</dictionary>
</pickle>
......@@ -102,7 +102,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:object.hasBaseData()</string> </value>
<value> <string>python:object.hasSnapshotData()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_viewTargetFileDialog</string> </value>
<value> <string>string:${object_url}/OOoDocument_viewConvertDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>5.0</float> </value>
<value> <float>50.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -81,7 +81,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_FileUploadDialog</string> </value>
<value> <string>string:${object_url}/File_viewUploadDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/WebPage_viewAsWeb</string> </value>
<value> <string>string:${object_url}/Drawing_viewAsWeb</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_downloadDialog</string> </value>
<value> <string>string:${object_url}/Document_viewDownloadDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>5.0</float> </value>
<value> <float>50.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_convert</string> </value>
<value> <string>string:${object_url}/OOoDocument_convertToBase</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -102,7 +102,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: object.hasBaseData() and not object.hasSnapshot()</string> </value>
<value> <string>python: object.hasBaseData() and not object.hasSnapshotData()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_downloadDialog</string> </value>
<value> <string>string:${object_url}/Document_viewDownloadDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_getOOoFileDialog</string> </value>
<value> <string>string:${object_url}/OOoDocument_viewOOoFileDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_getSnapshotDialog</string> </value>
<value> <string>string:${object_url}/OOoDocument_viewSnapshotDialog</string> </value>
</item>
</dictionary>
</pickle>
......@@ -102,7 +102,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:object.hasBaseData()</string> </value>
<value> <string>python:object.hasSnapshotData()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_viewTargetFileDialog</string> </value>
<value> <string>string:${object_url}/OOoDocument_viewConvertDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>5.0</float> </value>
<value> <float>50.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -81,7 +81,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/File_UploadDialog</string> </value>
<value> <string>string:${object_url}/File_viewUploadDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/WebPage_viewAsWeb</string> </value>
<value> <string>string:${object_url}/Drawing_viewAsWeb</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_downloadDialog</string> </value>
<value> <string>string:${object_url}/Document_viewDownloadDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_getOOoFileDialog</string> </value>
<value> <string>string:${object_url}/OOoDocument_viewOOoFileDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_getSnapshotDialog</string> </value>
<value> <string>string:${object_url}/OOoDocument_viewSnapshotDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/OOoDocument_viewTargetFileDialog</string> </value>
<value> <string>string:${object_url}/OOoDocument_viewConvertDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>5.0</float> </value>
<value> <float>50.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -81,7 +81,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/File_UploadDialog</string> </value>
<value> <string>string:${object_url}/File_viewUploadDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -81,7 +81,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DMS_htmlRepresentation</string> </value>
<value> <string>string:${object_url}/Document_viewHTMLPreview</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -102,7 +102,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:object.hasBaseData()</string> </value>
<value> <string>python:object.hasSnapshotData()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>5.0</float> </value>
<value> <float>50.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -69,14 +69,13 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""\n
Public interface to getOOoFile API method - sets headers and returns\n
output (an ODF file).\n
Public interface to getBaseData API method - invokes index_html\n
to return the file in the base-data format.\n
"""\n
\n
request = context.REQUEST\n
request.RESPONSE.setHeader(\'Content-type\', context.getContentType())\n
request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % context.title_or_id())\n
return context.getOOFile()\n
response = request.RESPONSE\n
response.setHeader(\'Content-disposition\', \'attachment;; filename="%s"\' % context.getStandardFileName())\n
return context.index_html(request, response, format=\'base-data\')\n
</string> </value>
</item>
<item>
......@@ -122,6 +121,7 @@ return context.getOOFile()\n
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>response</string>
</tuple>
</value>
</item>
......
......@@ -73,12 +73,10 @@ Public interface to getSnapshot API method - sets headers and returns\n
output (a pdf file which is generated only once and never changes, even if\n
file data change).\n
"""\n
\n
request = context.REQUEST\n
request.RESPONSE.setHeader(\'Content-type\', \'application/pdf\')\n
request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s.pdf"\' % context.title_or_id())\n
\n
return context.getSnapshot()\n
request.RESPONSE.setHeader(\'Content-type\', context.getSnapshotContentType())\n
request.RESPONSE.setHeader(\'Content-disposition\', \'attachment;; filename="%s.pdf"\' % context.getStandardFileName())\n
return context.getSnapshotData()\n
</string> </value>
</item>
<item>
......
......@@ -268,15 +268,18 @@
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:\'%s-%s-%s\' % (here.getReference(), here.Language(), here.getVersion())</string> </value>
<value> <string>here/getStandardFileName</string> </value>
</item>
</dictionary>
</pickle>
......
608
\ No newline at end of file
610
\ No newline at end of file
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