Author: xlawrence
Date: Thu Jan 10 16:59:02 2008
New Revision: 53
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D53&repname=3D=
corporate_portal_templates_v3
Log:
Remove all scriptlets from the files box display
put headers to the table displaying the files
Modified:
trunk/src/jsp/common/box/filesBoxDisplay.jsp
Modified: trunk/src/jsp/common/box/filesBoxDisplay.jsp
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/src/jsp/common/=
box/filesBoxDisplay.jsp&rev=3D53&repname=3Dcorporate_portal_templates_v3
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/src/jsp/common/box/filesBoxDisplay.jsp (original)
+++ trunk/src/jsp/common/box/filesBoxDisplay.jsp Thu Jan 10 16:59:02 2008
@@ -17,62 +17,54 @@
--%>
<%@ include file=3D"../declarations.jspf" %>
<%@ include file=3D"../common_vars.jspf" %>
-<bean:parameter id=3D"displayDetails" name=3D"displayDetails" value=3D"fal=
se"/>
<content:containerList name=3D"files${boxID}" id=3D"files" parentContainer=
Name=3D"boxContainer">
<table class=3D"files" border=3D"0" cellspacing=3D"0" cellpadding=3D"0=
" width=3D"100%">
+ <tr>
+ <th>FileName</th>
+ <th>Description</th>
+ <th>Size</th>
+ <th>Last Modification</th>
+ <th> </th>
+ </tr>
<content:container id=3D"fileContainer">
- <%
- ContainerBean fileContainerBean =3D (ContainerBean) pageCo=
ntext.findAttribute("fileContainer");
- JahiaContainer currentContainer =3D fileContainerBean.getJ=
ahiaContainer();
- JahiaFileField file =3D (JahiaFileField) currentContainer.=
getFieldObject("file");
- String fileName =3D "null";
- String formatedSize =3D "";
- String formatedLastModifDate =3D "";
- String uploadUsername =3D "";
- String downloadUrl =3D "#";
- String picto =3D "file";
- boolean displayLine =3D false;
-
- if (file !=3D null) {
- displayLine =3D true;
- formatedSize =3D file.getFormatedSize();
- formatedLastModifDate =3D file.getFormatedLastModifDat=
e();
- downloadUrl =3D file.getDownloadUrl();
- fileName =3D file.getFileFieldTitle();
- if (fileName.equals("")) {
- fileName =3D file.getRealName();
- }
- picto =3D getPicto(file.getRealName());
- if ("#".equals(downloadUrl)) {
- displayLine =3D false;
- }
- }
- if (jData.gui().isEditMode() || displayLine) {
- %>
- <tr>
- <td><a class=3D"<%=3Dpicto%>" href=3D"<%=3DdownloadUrl%>" =
title=3D"<%=3DfileName%>"><%=3DfileName%>
- </a></td>
- <td><content:textField valueId=3D"fileDesc" name=3D'fileDe=
sc'
- diffActive=3D"true" defaultValue=3D=
""/></td>
- <logic:equal name=3D"displayDetails" value=3D"true">
- <td class=3D"nowrap"><%=3DformatedSize%>
+ <content:fileField name=3D"file" valueId=3D"myFileField"/>
+ <content:booleanField name=3D"fileDisplayDetails" valueId=3D"d=
isplayDetails" display=3D"false"/>
+ <logic:present name=3D"myFileField">
+ <tr>
+ <td>
+ <logic:equal name=3D"myFileField" property=3D"down=
loadable" value=3D"true">
+ <a class=3D"<jahia-components:getPicto fileNam=
e=3D"${myFileField.fileFieldTitle}"/>"
+ href=3D"<bean:write name=3D"myFileField" pr=
operty=3D"downloadUrl"/>"
+ title=3D"<bean:write name=3D"myFileField" p=
roperty=3D"fileFieldTitle"/>">
+ <bean:write name=3D"myFileField" property=
=3D"fileFieldTitle"/>
+ </a>
+ </logic:equal>
</td>
- <td class=3D"nowrap"><%=3DformatedLastModifDate%>
+ <td>
+ <content:textField valueId=3D"fileDesc" name=3D"fi=
leDesc" display=3D"false"/>
+ <logic:present name=3D"fileDesc">
+ <c:out value=3D"${fileDesc}" escapeXml=3D"fals=
e"/>
+ </logic:present>
</td>
- </logic:equal>
-
- <td>
- <jahiaHtml:actionMenu name=3D"fileContainer" namePostF=
ix=3D".filesContainer"
- resourceBundle=3D"jahiatemplates=
.default_v3_lang"
- useFieldSet=3D"false">
- </jahiaHtml:actionMenu>
- </td>
- </tr>
- <%
- }
- %>
+ <c:choose>
+ <c:when test=3D"${displayDetails =3D=3D 'true'}">
+ <td class=3D"nowrap"><bean:write name=3D"myFil=
eField" property=3D"formatedSize"/></td>
+ <td class=3D"nowrap"><bean:write name=3D"myFil=
eField" property=3D"formatedLastModifDate"/></td>
+ </c:when>
+ <c:otherwise>
+ <td> </td>
+ <td> </td>
+ </c:otherwise>
+ </c:choose>
+ <td>
+ <jahiaHtml:actionMenu name=3D"fileContainer" nameP=
ostFix=3D".filesContainer"
+ resourceBundle=3D"jahiatempl=
ates.default_v3_lang"
+ useFieldSet=3D"false">
+ </jahiaHtml:actionMenu>
+ </td>
+ </tr>
+ </logic:present>
</content:container>
-
</table>
<jahiaHtml:actionMenu name=3D"files" namePostFix=3D".filesContainers"
resourceBundle=3D"jahiatemplates.default_v3_lang"
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list