/
picture_additional_formats_widget_template.xhtml
69 lines (64 loc) · 2.57 KB
/
picture_additional_formats_widget_template.xhtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<div xmlns:nxu="http://nuxeo.org/nxweb/util"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jstl/core"
class="content_block">
<c:if test="#{fieldOrValue.hasFacet('Picture')}">
<c:if test="#{!empty widget.label and widget.handlingLabels}">
<ui:include src="/widgets/incl/widget_label_template.xhtml">
<ui:param name="labelStyleClass" value="summaryTitle" />
</ui:include>
</c:if>
<table width="100%" cellspacing="0">
<tbody>
<c:forEach var="view" items="#{fieldOrValue.picture.views}"
varStatus="status">
<tr>
<td class="labelColumn">
<nxu:set var="labelKey" value="label.picture.view.#{view.title}">
<nxu:set var="labelValue" value="#{messages[labelKey]}">
<nxu:set var="finalLabel" value="#{nxu:test(labelKey == labelValue, view.title, labelValue)}">
<h:outputText value="#{finalLabel}"
title="#{view.description}"
styleClass="tipsyShow" />
</nxu:set>
</nxu:set>
</nxu:set>
</td>
<td class="fieldColumn">
<span>#{view.info.width}</span>
<span class="dimensionSeparator"></span>
<span>#{view.info.height}</span>
</td>
<td class="fieldColumn">
<c:if test="#{!empty view.content}">
<span class="detail">#{nxu:printFormatedFileSize(view.content.length, 'JEDEC', true)}</span>
</c:if>
</td>
<td class="fieldColumn">
<c:if test="#{! empty view.info}">
<span class="label">#{view.info.format}</span>
</c:if>
<c:if test="#{empty view.info}">
<c:if test="#{!empty view.content}">
<c:set var="extension" value="#{nxu:fileExtension(view.content.name)}" />
<c:if test="#{not empty extension}">
<h:outputText value="#{extension}"
styleClass="label" />
</c:if>
</c:if>
</c:if>
</td>
<td class="actionsColumn">
<nxu:set var="blobPropertyName" value="#{view.title}:content">
<h:outputLink value="#{nxd:fileUrl('downloadPicture', fieldOrValue, blobPropertyName, fieldOrValue.dublincore.modified)}">
<h:graphicImage url="/icons/contextual_menu/download.png" />
</h:outputLink>
</nxu:set>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</c:if>
</div>