Changeset 7762
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/common/overview/info.jsp
r7605 r7762 67 67 import="net.sf.basedb.util.overview.Failure" 68 68 import="net.sf.basedb.util.overview.Fix" 69 import="net.sf.basedb.util.overview.filter.NodeTypeFilter" 69 70 import="net.sf.basedb.util.overview.extensions.ValidationRuleAction" 70 71 import="net.sf.basedb.util.extensions.ExtensionsInvoker" 72 import="net.sf.basedb.clients.web.extensions.fileviewer.FileViewerContext" 73 import="net.sf.basedb.clients.web.extensions.fileviewer.FileViewerUtil" 71 74 import="java.util.ArrayList" 72 75 import="java.util.Date" … … 140 143 Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); 141 144 145 FileViewerContext fileContext = null; 146 FileViewerUtil fileViewer = null; 147 if (item instanceof FileSetMember) 148 { 149 Node parentNode = node.getFirstParent(new NodeTypeFilter(Node.Type.ITEM)); 150 if (parentNode != null) 151 { 152 fileContext = FileViewerContext.dataFile(parentNode.getItem()); 153 } 154 } 155 else if (item instanceof AnyToAny) 156 { 157 if (((AnyToAny)item).getToType() == Item.FILE) 158 { 159 Node parentNode = node.getFirstParent(new NodeTypeFilter(Node.Type.ITEM)); 160 if (parentNode != null) 161 { 162 fileContext = FileViewerContext.anyToAny(parentNode.getItem()); 163 } 164 } 165 } 166 if (fileContext != null) 167 { 168 fileViewer = new FileViewerUtil(jspContext, fileContext); 169 } 142 170 %> 143 171 <base:page title="" type="iframe"> … … 203 231 if (dft != null || file != null) 204 232 { 233 if (file != null) fileContext.setCurrentDataFile(file, dft, member); 205 234 %> 206 235 <tr> 207 236 <th><%=dft == null ? "Data file" : HTML.encodeTags(dft.getName())%></th> 208 237 <td> 209 <%=Base.getLinkedFile(ID, file, deniedFile, true, true, "../../")%> 238 <%=Base.getLinkedName(ID, file, deniedFile, true)%> 239 <%if (file != null) fileViewer.render(); %> 210 240 </td> 211 241 </tr> … … 234 264 linkTo = Base.getLink(ID, HTML.encodeTags(name), 235 265 to.getType(), to.getId(), to.hasPermission(Permission.WRITE)); 266 if (fileViewer != null) 267 { 268 fileContext.setCurrentAnyToAny((File)to, any); 269 linkTo += " " + fileViewer.renderAsString(); 270 } 236 271 } 237 272 catch (PermissionDeniedException ex)
Note: See TracChangeset
for help on using the changeset viewer.