Added download link for binary data resources.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@801584 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacopo Cappellato
2009-08-06 09:49:43 +00:00
parent 9a8012a69d
commit 4dfc58d3b3
3 changed files with 43 additions and 2 deletions
@@ -611,6 +611,9 @@
<value xml:lang="it">Tipo documento</value>
<value xml:lang="zh">文档类型</value>
</property>
<property key="ContentDownload">
<value xml:lang="en">Download</value>
</property>
<property key="ContentEditProductStore">
<value xml:lang="ar">تحرير مخزن المنتوج</value>
<value xml:lang="de">Produktladen bearbeiten</value>
@@ -625,6 +625,7 @@ under the License.
<security auth="true" https="true"/>
<response name="success" type="view" value="listDataResources"/>
</request-map>
<request-map uri="ViewBinaryDataResource"><security auth="true" https="true"/><response name="success" type="view" value="ViewBinaryDataResource"/></request-map>
<request-map uri="EditDataResourceType">
<security auth="true" https="true"/>
@@ -1935,6 +1936,7 @@ under the License.
<view-map name="EditCompDocContentRole" page="component://content/widget/compdoc/CompDocScreens.xml#EditCompDocContentRole" type="screen"/>
<view-map name="ViewInstances" page="component://content/widget/compdoc/CompDocScreens.xml#ViewInstances" type="screen"/>
<view-map name="ViewCompDocContentBinary" page="" type="simplecontent"/>
<view-map name="ViewBinaryDataResource" page="" type="simplecontent"/>
<view-map name="ViewCompDocContent" page="component://content/widget/compdoc/CompDocScreens.xml#ViewCompDocContent" type="screen"/>
<view-map name="ViewSimpleContent" page="" type="simplecontent"/>
@@ -175,6 +175,7 @@ under the License.
<set field="tabButtonItem" value="editDataResource"/>
<set field="dataResourceId" from-field="parameters.dataResourceId"/>
<entity-one entity-name="DataResource" value-field="currentValue"/>
<set field="dataResource" from-field="currentValue"/>
<entity-condition entity-name="DataCategory" list="dataCategoryList"/>
</actions>
<widgets>
@@ -199,8 +200,21 @@ under the License.
<not><if-empty field="currentValue"/></not>
</condition>
<widgets>
<label text="${uiLabelMap.ContentContentsAssociatedToDataResource}" style="h3"/>
<include-form name="ListContentsAssociatedToDataResource" location="component://content/widget/content/DataResourceForms.xml"/>
<include-screen name="DataResourceViewLink"/>
<container style="screenlet">
<container style="screenlet-title-bar">
<container style="h3">
<label text="${uiLabelMap.ContentContentsAssociatedToDataResource}"/>
</container>
</container>
<container style="screenlet-body">
<section>
<widgets>
<include-form name="ListContentsAssociatedToDataResource" location="component://content/widget/content/DataResourceForms.xml"/>
</widgets>
</section>
</container>
</container>
</widgets>
</section>
</decorator-section>
@@ -485,4 +499,26 @@ under the License.
</widgets>
</section>
</screen>
<screen name="DataResourceViewLink">
<section>
<condition>
<or>
<if-compare field="dataResource.mimeTypeId" operator="equals" value="application/msword"/>
<if-compare field="dataResource.mimeTypeId" operator="equals" value="application/pdf"/>
<if-compare field="dataResource.mimeTypeId" operator="equals" value="application/vnd.oasis.opendocument.text"/>
<if-compare field="dataResource.mimeTypeId" operator="equals" value="image/jpeg"/>
<if-compare field="dataResource.mimeTypeId" operator="equals" value="image/gif"/>
<if-compare field="dataResource.mimeTypeId" operator="equals" value="image/tiff"/>
<if-compare field="dataResource.mimeTypeId" operator="equals" value="image/png"/>
</or>
</condition>
<widgets>
<container>
<link target="ViewBinaryDataResource" text="${uiLabelMap.ContentDownload}" style="buttontext">
<parameter param-name="dataResourceId"/>
</link>
</container>
</widgets>
</section>
</screen>
</screens>