Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (42 sloc) 2.09 KB
<c:if test="true"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:nxu="http://nuxeo.org/nxweb/util"
xmlns:nxd="http://nuxeo.org/nxweb/document"
xmlns:nxl="http://nuxeo.org/nxforms/layout"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:nxp="http://nuxeo.org/nxweb/pdf">
<c:if test="#{nxl:isLikePlainMode(widget.mode)}">#{field.filename}</c:if>
<c:if test="#{widget.mode == 'edit'}">
<c:set var="acceptedExtensions"
value="#{nxu:test(!empty widgetProperty_acceptedExtensions, widgetProperty_acceptedExtensions, '.jpg, .jpeg, .png, .gif, .tif, .tiff, .psd, .raw, .ai, .svg, .ps, .eps, .epsi, .epsf, .xcf, .bmp')}" />
<nxu:inputFile id="#{widget.id}" value="#{field}"
filename="#{field.filename}" required="#{widgetProperty_required}" editFilename="false"
onclick="#{widgetProperty_onclick}" onchange="#{widgetProperty_onchange}">
<nxu:validateFileMimetype extensions="#{acceptedExtensions}" hidden="true" />
</nxu:inputFile>
<h:message styleClass="errorMessage" for="#{widget.id}"
id="#{widget.id}_message" />
</c:if>
<c:if test="#{nxl:isLikeViewMode(widget.mode)}">
<nxu:set var="image_url"
value="#{nxd:complexFileUrl('downloadFile', layoutValue, widget_0.fieldDefinitions[0].propertyName, model.rowIndex, widget.fieldDefinitions[0].propertyName, field.filename)}">
<nxu:graphicImage value="#{image_url}"
title="#{field.filename}" alt="#{field.filename}"
rendered="#{not empty field}"
width="#{widgetProperty_width}" height="#{widgetProperty_height}" />
</nxu:set>
</c:if>
<c:if test="#{widget.mode == 'pdf'}">
<nxp:html>
<nxu:set var="image_url"
value="#{nxd:complexFileUrl('downloadFile', layoutValue, widget_0.fieldDefinitions[0].propertyName, model.rowIndex, widget.fieldDefinitions[0].propertyName, field.filename)}">
<nxu:graphicImage value="#{image_url}"
title="#{field.filename}" alt="#{field.filename}"
rendered="#{not empty field}"
width="#{widgetProperty_width}" height="#{widgetProperty_height}" />
</nxu:set>
</nxp:html>
</c:if>
</c:if>
You can’t perform that action at this time.