1794 |
19 Jan 06 |
nicklas |
1 |
<%-- $Id$ |
1794 |
19 Jan 06 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Johan Enell, Nicklas Nordborg, Martin Svensson |
1794 |
19 Jan 06 |
nicklas |
5 |
|
2304 |
22 May 06 |
jari |
6 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
7 |
Available at http://base.thep.lu.se/ |
1794 |
19 Jan 06 |
nicklas |
8 |
|
1794 |
19 Jan 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
1794 |
19 Jan 06 |
nicklas |
10 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
11 |
as published by the Free Software Foundation; either version 3 |
1794 |
19 Jan 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
1794 |
19 Jan 06 |
nicklas |
13 |
|
1794 |
19 Jan 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
1794 |
19 Jan 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1794 |
19 Jan 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1794 |
19 Jan 06 |
nicklas |
17 |
GNU General Public License for more details. |
1794 |
19 Jan 06 |
nicklas |
18 |
|
1794 |
19 Jan 06 |
nicklas |
19 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
1794 |
19 Jan 06 |
nicklas |
21 |
------------------------------------------------------------------ |
1794 |
19 Jan 06 |
nicklas |
22 |
|
1794 |
19 Jan 06 |
nicklas |
23 |
@author Nicklas |
1794 |
19 Jan 06 |
nicklas |
24 |
@version 2.0 |
1794 |
19 Jan 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
1798 |
20 Jan 06 |
nicklas |
27 |
import="net.sf.basedb.core.Application" |
1794 |
19 Jan 06 |
nicklas |
28 |
import="net.sf.basedb.core.SessionControl" |
1794 |
19 Jan 06 |
nicklas |
29 |
import="net.sf.basedb.core.DbControl" |
3547 |
03 Jul 07 |
martin |
30 |
import="net.sf.basedb.core.Group" |
1794 |
19 Jan 06 |
nicklas |
31 |
import="net.sf.basedb.core.Item" |
1794 |
19 Jan 06 |
nicklas |
32 |
import="net.sf.basedb.core.ItemContext" |
5045 |
12 Aug 09 |
martin |
33 |
import="net.sf.basedb.core.ItemResultList" |
1794 |
19 Jan 06 |
nicklas |
34 |
import="net.sf.basedb.core.Permission" |
1794 |
19 Jan 06 |
nicklas |
35 |
import="net.sf.basedb.core.File" |
1794 |
19 Jan 06 |
nicklas |
36 |
import="net.sf.basedb.core.Location" |
3547 |
03 Jul 07 |
martin |
37 |
import="net.sf.basedb.core.MultiPermissions" |
1794 |
19 Jan 06 |
nicklas |
38 |
import="net.sf.basedb.core.User" |
1794 |
19 Jan 06 |
nicklas |
39 |
import="net.sf.basedb.core.PermissionDeniedException" |
1794 |
19 Jan 06 |
nicklas |
40 |
import="net.sf.basedb.core.PluginDefinition" |
1794 |
19 Jan 06 |
nicklas |
41 |
import="net.sf.basedb.core.plugin.GuiContext" |
1794 |
19 Jan 06 |
nicklas |
42 |
import="net.sf.basedb.core.plugin.Plugin" |
3547 |
03 Jul 07 |
martin |
43 |
import="net.sf.basedb.core.Project" |
1794 |
19 Jan 06 |
nicklas |
44 |
import="net.sf.basedb.clients.web.Base" |
5065 |
19 Aug 09 |
nicklas |
45 |
import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
2386 |
15 Jun 06 |
martin |
46 |
import="net.sf.basedb.clients.web.PermissionUtil" |
1794 |
19 Jan 06 |
nicklas |
47 |
import="net.sf.basedb.clients.web.util.HTML" |
3466 |
08 Jun 07 |
nicklas |
48 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
2753 |
20 Oct 06 |
nicklas |
49 |
import="net.sf.basedb.util.Values" |
3466 |
08 Jun 07 |
nicklas |
50 |
import="net.sf.basedb.util.formatter.Formatter" |
4887 |
06 Apr 09 |
nicklas |
51 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4887 |
06 Apr 09 |
nicklas |
52 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4887 |
06 Apr 09 |
nicklas |
53 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
54 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4887 |
06 Apr 09 |
nicklas |
55 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
7760 |
27 Nov 19 |
nicklas |
56 |
import="net.sf.basedb.clients.web.extensions.fileviewer.FileViewerUtil" |
7760 |
27 Nov 19 |
nicklas |
57 |
import="net.sf.basedb.clients.web.extensions.fileviewer.FileViewerContext" |
4887 |
06 Apr 09 |
nicklas |
58 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
3547 |
03 Jul 07 |
martin |
59 |
import="java.util.Collections" |
1794 |
19 Jan 06 |
nicklas |
60 |
import="java.util.Date" |
1794 |
19 Jan 06 |
nicklas |
61 |
import="java.util.Map" |
1794 |
19 Jan 06 |
nicklas |
62 |
import="java.util.Set" |
1794 |
19 Jan 06 |
nicklas |
63 |
%> |
1794 |
19 Jan 06 |
nicklas |
64 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1794 |
19 Jan 06 |
nicklas |
65 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
1794 |
19 Jan 06 |
nicklas |
66 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
4887 |
06 Apr 09 |
nicklas |
67 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
1794 |
19 Jan 06 |
nicklas |
68 |
<%! |
1794 |
19 Jan 06 |
nicklas |
69 |
private static final Item itemType = Item.FILE; |
1794 |
19 Jan 06 |
nicklas |
70 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
1794 |
19 Jan 06 |
nicklas |
71 |
%> |
1794 |
19 Jan 06 |
nicklas |
72 |
<% |
1794 |
19 Jan 06 |
nicklas |
73 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1794 |
19 Jan 06 |
nicklas |
74 |
final String ID = sc.getId(); |
1794 |
19 Jan 06 |
nicklas |
75 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
1794 |
19 Jan 06 |
nicklas |
76 |
final int itemId = cc.getId(); |
1794 |
19 Jan 06 |
nicklas |
77 |
final float scale = Base.getScale(sc); |
5065 |
19 Aug 09 |
nicklas |
78 |
final String tab = Values.getString(request.getParameter("tab"), "properties"); |
7954 |
12 May 21 |
nicklas |
79 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
1794 |
19 Jan 06 |
nicklas |
80 |
try |
1794 |
19 Jan 06 |
nicklas |
81 |
{ |
1794 |
19 Jan 06 |
nicklas |
82 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
1794 |
19 Jan 06 |
nicklas |
83 |
|
1794 |
19 Jan 06 |
nicklas |
84 |
File file = File.getById(dc, itemId); |
6137 |
19 Sep 12 |
nicklas |
85 |
String title = "File -- " + HTML.encodeTags(file.getName()); |
2041 |
22 Feb 06 |
nicklas |
86 |
String path = file.getPath().toString(); |
2041 |
22 Feb 06 |
nicklas |
87 |
String urlPath = HTML.urlEncode(path); |
4865 |
31 Mar 09 |
nicklas |
88 |
String bytes = Values.formatBytes(file.getSize(), 2); |
1794 |
19 Jan 06 |
nicklas |
89 |
|
5326 |
29 Apr 10 |
nicklas |
90 |
final Location location = file.getLocation(); |
1794 |
19 Jan 06 |
nicklas |
91 |
final boolean writePermission = file.hasPermission(Permission.WRITE); |
1794 |
19 Jan 06 |
nicklas |
92 |
final boolean deletePermission = file.hasPermission(Permission.DELETE); |
1794 |
19 Jan 06 |
nicklas |
93 |
final boolean sharePermission = file.hasPermission(Permission.SET_PERMISSION); |
2918 |
15 Nov 06 |
nicklas |
94 |
final boolean setOwnerPermission = file.hasPermission(Permission.SET_OWNER); |
4003 |
26 Nov 07 |
nicklas |
95 |
final boolean isRemoved = file.isRemoved(); |
4003 |
26 Nov 07 |
nicklas |
96 |
final boolean isUsed = isRemoved && file.isUsed(); |
4003 |
26 Nov 07 |
nicklas |
97 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
2918 |
15 Nov 06 |
nicklas |
98 |
final boolean isOwner = file.isOwner(); |
4867 |
31 Mar 09 |
nicklas |
99 |
final String mimeType = file.getMimeType(); |
4867 |
31 Mar 09 |
nicklas |
100 |
final boolean editable = writePermission && !file.isWriteProtected() && |
4867 |
31 Mar 09 |
nicklas |
101 |
mimeType != null && mimeType.startsWith("text/") && |
4867 |
31 Mar 09 |
nicklas |
102 |
file.getSize() < 102400 && file.getLocation() == Location.PRIMARY; |
4867 |
31 Mar 09 |
nicklas |
103 |
|
3466 |
08 Jun 07 |
nicklas |
104 |
Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); |
4887 |
06 Apr 09 |
nicklas |
105 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, file); |
7604 |
25 Feb 19 |
nicklas |
106 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
7760 |
27 Nov 19 |
nicklas |
107 |
FileViewerContext fileContext = FileViewerContext.file(); |
7760 |
27 Nov 19 |
nicklas |
108 |
fileContext.setCurrentFile(file); |
7855 |
19 Oct 20 |
nicklas |
109 |
FileViewerUtil fileViewer = FileViewerUtil.getOrCreate(jspContext, fileContext); |
1794 |
19 Jan 06 |
nicklas |
110 |
%> |
6308 |
20 Aug 13 |
nicklas |
111 |
<base:page type="iframe" title="<%=title%>" id="view-page"> |
6308 |
20 Aug 13 |
nicklas |
112 |
<base:head scripts="table.js,tabcontrol-2.js,dragdrop.js,~files.js" styles="table.css,toolbar.css,headertabcontrol.css"> |
4887 |
06 Apr 09 |
nicklas |
113 |
<ext:scripts context="<%=jspContext%>" /> |
4887 |
06 Apr 09 |
nicklas |
114 |
<ext:stylesheets context="<%=jspContext%>" /> |
1794 |
19 Jan 06 |
nicklas |
115 |
</base:head> |
1794 |
19 Jan 06 |
nicklas |
116 |
<base:body> |
6194 |
01 Nov 12 |
nicklas |
117 |
<div class="absolutefull auto-init" data-auto-init="drag-support"> |
6308 |
20 Aug 13 |
nicklas |
118 |
|
6308 |
20 Aug 13 |
nicklas |
119 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
5938 |
27 Jan 12 |
nicklas |
120 |
|
5938 |
27 Jan 12 |
nicklas |
121 |
<t:tabcontrol |
5938 |
27 Jan 12 |
nicklas |
122 |
subclass="content mastertabcontrol" |
5938 |
27 Jan 12 |
nicklas |
123 |
style="top: 0px;" |
6244 |
25 Feb 13 |
nicklas |
124 |
id="main" active="<%=tab%>"> |
5065 |
19 Aug 09 |
nicklas |
125 |
<t:tab id="properties" title="Properties"> |
5938 |
27 Jan 12 |
nicklas |
126 |
<div> |
5938 |
27 Jan 12 |
nicklas |
127 |
<table class="fullform bottomborder"> |
5938 |
27 Jan 12 |
nicklas |
128 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
129 |
<th class="itemstatus"> |
4003 |
26 Nov 07 |
nicklas |
130 |
<base:icon |
5946 |
03 Feb 12 |
nicklas |
131 |
image="shared.png" |
5938 |
27 Jan 12 |
nicklas |
132 |
visible="<%=file.isShared()%>" |
5938 |
27 Jan 12 |
nicklas |
133 |
tooltip="This item is shared to other users, groups and/or projects" |
5938 |
27 Jan 12 |
nicklas |
134 |
/> |
5938 |
27 Jan 12 |
nicklas |
135 |
<base:icon |
6308 |
20 Aug 13 |
nicklas |
136 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
137 |
image="deleted.png" |
5938 |
27 Jan 12 |
nicklas |
138 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5938 |
27 Jan 12 |
nicklas |
139 |
enabled="<%=deletePermanentlyPermission %>" |
5938 |
27 Jan 12 |
nicklas |
140 |
visible="<%=isRemoved%>" |
5938 |
27 Jan 12 |
nicklas |
141 |
/> |
6308 |
20 Aug 13 |
nicklas |
142 |
<base:icon |
6308 |
20 Aug 13 |
nicklas |
143 |
id="btnUsingItems" |
6308 |
20 Aug 13 |
nicklas |
144 |
image="used.png" |
5938 |
27 Jan 12 |
nicklas |
145 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5938 |
27 Jan 12 |
nicklas |
146 |
visible="<%=isRemoved && isUsed%>" /> |
5938 |
27 Jan 12 |
nicklas |
147 |
</th> |
5938 |
27 Jan 12 |
nicklas |
148 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
149 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5938 |
27 Jan 12 |
nicklas |
150 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
151 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
152 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
153 |
image="edit.png" |
5938 |
27 Jan 12 |
nicklas |
154 |
title="Edit…" |
5938 |
27 Jan 12 |
nicklas |
155 |
tooltip="<%=writePermission ? "Edit this file" : "You do not have permission to edit this file"%>" |
5938 |
27 Jan 12 |
nicklas |
156 |
/> |
5938 |
27 Jan 12 |
nicklas |
157 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
158 |
id="btnEditFileData" |
5938 |
27 Jan 12 |
nicklas |
159 |
visible="<%=editable%>" |
5938 |
27 Jan 12 |
nicklas |
160 |
image="file_edit.png" |
5938 |
27 Jan 12 |
nicklas |
161 |
title="Edit file…" |
5938 |
27 Jan 12 |
nicklas |
162 |
tooltip="Edit the contents of this file" |
5938 |
27 Jan 12 |
nicklas |
163 |
/> |
5938 |
27 Jan 12 |
nicklas |
164 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
165 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
166 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
167 |
image="delete.png" |
5938 |
27 Jan 12 |
nicklas |
168 |
title="Delete" |
5938 |
27 Jan 12 |
nicklas |
169 |
visible="<%=!file.isRemoved()%>" |
5938 |
27 Jan 12 |
nicklas |
170 |
tooltip="<%=deletePermission ? "Delete this file" : "You do not have permission to delete this file"%>" |
5938 |
27 Jan 12 |
nicklas |
171 |
/> |
5938 |
27 Jan 12 |
nicklas |
172 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
173 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
174 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
175 |
image="restore.png" |
5938 |
27 Jan 12 |
nicklas |
176 |
title="Restore" |
5938 |
27 Jan 12 |
nicklas |
177 |
visible="<%=file.isRemoved()%>" |
5938 |
27 Jan 12 |
nicklas |
178 |
tooltip="<%=writePermission ? "Restore this file" : "You do not have permission to restore this file"%>" |
5938 |
27 Jan 12 |
nicklas |
179 |
/> |
5938 |
27 Jan 12 |
nicklas |
180 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
181 |
id="btnShare" |
5942 |
01 Feb 12 |
nicklas |
182 |
disabled="<%=!sharePermission%>" |
5945 |
02 Feb 12 |
nicklas |
183 |
image="share.png" |
5938 |
27 Jan 12 |
nicklas |
184 |
title="Share…" |
5938 |
27 Jan 12 |
nicklas |
185 |
tooltip="<%=sharePermission ? "Share this file to other user, groups and projects" : "You do not have permission to share this file"%>" |
5938 |
27 Jan 12 |
nicklas |
186 |
/> |
5938 |
27 Jan 12 |
nicklas |
187 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
188 |
id="btnSetOwner" |
5942 |
01 Feb 12 |
nicklas |
189 |
disabled="<%=!setOwnerPermission%>" |
5938 |
27 Jan 12 |
nicklas |
190 |
image="take_ownership.png" |
5938 |
27 Jan 12 |
nicklas |
191 |
title="Set owner…" |
5938 |
27 Jan 12 |
nicklas |
192 |
tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
5938 |
27 Jan 12 |
nicklas |
193 |
/> |
5938 |
27 Jan 12 |
nicklas |
194 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
195 |
id="btnCompress" |
5938 |
27 Jan 12 |
nicklas |
196 |
disabled="<%=!writePermission%>" |
5938 |
27 Jan 12 |
nicklas |
197 |
image="compress.png" |
5938 |
27 Jan 12 |
nicklas |
198 |
title="Compress…" |
5938 |
27 Jan 12 |
nicklas |
199 |
visible="<%=!file.isCompressed() && location == Location.PRIMARY%>" |
5938 |
27 Jan 12 |
nicklas |
200 |
tooltip="Store this file in a compressed format on the disk" |
5938 |
27 Jan 12 |
nicklas |
201 |
/> |
5938 |
27 Jan 12 |
nicklas |
202 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
203 |
id="btnDecompress" |
5938 |
27 Jan 12 |
nicklas |
204 |
disabled="<%=!writePermission%>" |
5938 |
27 Jan 12 |
nicklas |
205 |
image="decompress.png" |
5938 |
27 Jan 12 |
nicklas |
206 |
title="Decompress…" |
5938 |
27 Jan 12 |
nicklas |
207 |
visible="<%=file.isCompressed() && location == Location.PRIMARY%>" |
5938 |
27 Jan 12 |
nicklas |
208 |
tooltip="Decompress this file and store it in it's normal format on the disk" |
5938 |
27 Jan 12 |
nicklas |
209 |
/> |
5938 |
27 Jan 12 |
nicklas |
210 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
211 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
212 |
image="import.png" |
6308 |
20 Aug 13 |
nicklas |
213 |
data-plugin-type="IMPORT" |
5938 |
27 Jan 12 |
nicklas |
214 |
title="Import…" |
5938 |
27 Jan 12 |
nicklas |
215 |
tooltip="Import data" |
5938 |
27 Jan 12 |
nicklas |
216 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5938 |
27 Jan 12 |
nicklas |
217 |
/> |
5938 |
27 Jan 12 |
nicklas |
218 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
219 |
id="btnExport" |
6308 |
20 Aug 13 |
nicklas |
220 |
image="export.png" |
6308 |
20 Aug 13 |
nicklas |
221 |
data-plugin-type="EXPORT" |
5938 |
27 Jan 12 |
nicklas |
222 |
title="Export…" |
5938 |
27 Jan 12 |
nicklas |
223 |
tooltip="Export data" |
5938 |
27 Jan 12 |
nicklas |
224 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5938 |
27 Jan 12 |
nicklas |
225 |
/> |
5938 |
27 Jan 12 |
nicklas |
226 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
227 |
id="btnRunPlugin" |
6308 |
20 Aug 13 |
nicklas |
228 |
image="runplugin.png" |
6308 |
20 Aug 13 |
nicklas |
229 |
data-plugin-type="OTHER" |
5938 |
27 Jan 12 |
nicklas |
230 |
title="Run plugin…" |
5938 |
27 Jan 12 |
nicklas |
231 |
tooltip="Run a plugin" |
5938 |
27 Jan 12 |
nicklas |
232 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5938 |
27 Jan 12 |
nicklas |
233 |
/> |
5938 |
27 Jan 12 |
nicklas |
234 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
235 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5938 |
27 Jan 12 |
nicklas |
236 |
<tbl:button |
5938 |
27 Jan 12 |
nicklas |
237 |
image="help.png" |
6308 |
20 Aug 13 |
nicklas |
238 |
subclass="auto-init" |
6308 |
20 Aug 13 |
nicklas |
239 |
data-auto-init="help" |
6308 |
20 Aug 13 |
nicklas |
240 |
data-help-id="file.view.properties" |
5938 |
27 Jan 12 |
nicklas |
241 |
title="Help…" |
5938 |
27 Jan 12 |
nicklas |
242 |
tooltip="Get help about this page" |
5938 |
27 Jan 12 |
nicklas |
243 |
/> |
5938 |
27 Jan 12 |
nicklas |
244 |
</tbl:toolbar> |
5938 |
27 Jan 12 |
nicklas |
245 |
</td> |
5938 |
27 Jan 12 |
nicklas |
246 |
</tr> |
1794 |
19 Jan 06 |
nicklas |
247 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
248 |
<th>File</th> |
2041 |
22 Feb 06 |
nicklas |
249 |
<td><%=HTML.encodeTags(path)%></td> |
1794 |
19 Jan 06 |
nicklas |
250 |
</tr> |
1794 |
19 Jan 06 |
nicklas |
251 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
252 |
<th>Type</th> |
5630 |
13 May 11 |
nicklas |
253 |
<td><base:propertyvalue item="<%=file%>" property="itemSubtype" /></td> |
1794 |
19 Jan 06 |
nicklas |
254 |
</tr> |
1794 |
19 Jan 06 |
nicklas |
255 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
256 |
<th>Write protected</th> |
5938 |
27 Jan 12 |
nicklas |
257 |
<td><%=file.isWriteProtected() ? "yes" : "no"%></td> |
1794 |
19 Jan 06 |
nicklas |
258 |
</tr> |
5938 |
27 Jan 12 |
nicklas |
259 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
260 |
<th>Location</th> |
7760 |
27 Nov 19 |
nicklas |
261 |
<td><%=location%> |
1794 |
19 Jan 06 |
nicklas |
262 |
<% |
7760 |
27 Nov 19 |
nicklas |
263 |
fileViewer.render(); |
7760 |
27 Nov 19 |
nicklas |
264 |
if (location == Location.PRIMARY && file.hasPermission(Permission.WRITE) && !file.isWriteProtected()) |
1798 |
20 Jan 06 |
nicklas |
265 |
{ |
7760 |
27 Nov 19 |
nicklas |
266 |
%> [<span class="link" |
7760 |
27 Nov 19 |
nicklas |
267 |
id="moveOffline" |
7760 |
27 Nov 19 |
nicklas |
268 |
data-file-id="<%=itemId %>" |
7760 |
27 Nov 19 |
nicklas |
269 |
data-location="OFFLINE" |
7760 |
27 Nov 19 |
nicklas |
270 |
>move offline</span> |
7760 |
27 Nov 19 |
nicklas |
271 |
| <span class="link auto-init" |
6308 |
20 Aug 13 |
nicklas |
272 |
data-auto-init="upload-file" |
7760 |
27 Nov 19 |
nicklas |
273 |
data-file-id="<%=itemId%>">replace</span>] |
1798 |
20 Jan 06 |
nicklas |
274 |
<% |
1798 |
20 Jan 06 |
nicklas |
275 |
} |
1798 |
20 Jan 06 |
nicklas |
276 |
%> |
1794 |
19 Jan 06 |
nicklas |
277 |
</td> |
1794 |
19 Jan 06 |
nicklas |
278 |
</tr> |
5326 |
29 Apr 10 |
nicklas |
279 |
<% |
5326 |
29 Apr 10 |
nicklas |
280 |
if (location == Location.EXTERNAL) |
5326 |
29 Apr 10 |
nicklas |
281 |
{ |
5326 |
29 Apr 10 |
nicklas |
282 |
%> |
5326 |
29 Apr 10 |
nicklas |
283 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
284 |
<th class="subprompt">- URL</th> |
5331 |
30 Apr 10 |
nicklas |
285 |
<td><%=HTML.niceFormat(file.getUrl(), HTML.LINK_URL)%></td> |
5326 |
29 Apr 10 |
nicklas |
286 |
</tr> |
5361 |
14 Jun 10 |
nicklas |
287 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
288 |
<th class="subprompt">- file server</th> |
5361 |
14 Jun 10 |
nicklas |
289 |
<td><base:propertyvalue item="<%=file%>" property="fileServer" /></td> |
5361 |
14 Jun 10 |
nicklas |
290 |
</tr> |
5326 |
29 Apr 10 |
nicklas |
291 |
<% |
5326 |
29 Apr 10 |
nicklas |
292 |
} |
5326 |
29 Apr 10 |
nicklas |
293 |
%> |
1794 |
19 Jan 06 |
nicklas |
294 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
295 |
<th>MIME type</th> |
5938 |
27 Jan 12 |
nicklas |
296 |
<td><%=HTML.encodeTags(file.getMimeType())%></td> |
5938 |
27 Jan 12 |
nicklas |
297 |
</tr> |
5938 |
27 Jan 12 |
nicklas |
298 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
299 |
<th class="subprompt">- character set</th> |
5938 |
27 Jan 12 |
nicklas |
300 |
<td><%=HTML.encodeTags(file.getCharacterSet() == null ? "n/a" : file.getCharacterSet())%></td> |
5938 |
27 Jan 12 |
nicklas |
301 |
</tr> |
5938 |
27 Jan 12 |
nicklas |
302 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
303 |
<th>Size</th> |
4865 |
31 Mar 09 |
nicklas |
304 |
<td title="<%=file.getSize()%> bytes"><%=bytes%></td> |
1794 |
19 Jan 06 |
nicklas |
305 |
</tr> |
3719 |
12 Sep 07 |
nicklas |
306 |
<% |
3719 |
12 Sep 07 |
nicklas |
307 |
if (file.isCompressed()) |
3719 |
12 Sep 07 |
nicklas |
308 |
{ |
3719 |
12 Sep 07 |
nicklas |
309 |
%> |
3719 |
12 Sep 07 |
nicklas |
310 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
311 |
<th class="subprompt">- compressed size</th> |
6268 |
11 Apr 13 |
nicklas |
312 |
<td title="<%=file.getCompressedSize()%> bytes"><%=Values.formatBytes(file.getCompressedSize(), 2)%></td> |
3719 |
12 Sep 07 |
nicklas |
313 |
</tr> |
3719 |
12 Sep 07 |
nicklas |
314 |
<% |
3719 |
12 Sep 07 |
nicklas |
315 |
} |
3719 |
12 Sep 07 |
nicklas |
316 |
%> |
1794 |
19 Jan 06 |
nicklas |
317 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
318 |
<th>Last update</th> |
3466 |
08 Jun 07 |
nicklas |
319 |
<td><%=dateTimeFormatter.format(file.getLastUpdate())%></td> |
3466 |
08 Jun 07 |
nicklas |
320 |
</tr> |
3466 |
08 Jun 07 |
nicklas |
321 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
322 |
<th>MD5</th> |
5938 |
27 Jan 12 |
nicklas |
323 |
<td><%=HTML.encodeTags(file.getMd5())%></td> |
5938 |
27 Jan 12 |
nicklas |
324 |
</tr> |
5938 |
27 Jan 12 |
nicklas |
325 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
326 |
<th>Owner</th> |
2432 |
27 Jun 06 |
nicklas |
327 |
<td><base:propertyvalue item="<%=file%>" property="owner" /></td> |
1794 |
19 Jan 06 |
nicklas |
328 |
</tr> |
1794 |
19 Jan 06 |
nicklas |
329 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
330 |
<th>Permissions</th> |
5938 |
27 Jan 12 |
nicklas |
331 |
<td><%=PermissionUtil.getFullPermissionNames(file)%></td> |
3719 |
12 Sep 07 |
nicklas |
332 |
</tr> |
3719 |
12 Sep 07 |
nicklas |
333 |
<tr> |
5938 |
27 Jan 12 |
nicklas |
334 |
<th>Description</th> |
1794 |
19 Jan 06 |
nicklas |
335 |
<td><%=HTML.niceFormat(file.getDescription())%></td> |
1794 |
19 Jan 06 |
nicklas |
336 |
</tr> |
1794 |
19 Jan 06 |
nicklas |
337 |
</table> |
5938 |
27 Jan 12 |
nicklas |
338 |
</div> |
5502 |
18 Nov 10 |
nicklas |
339 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5502 |
18 Nov 10 |
nicklas |
340 |
<jsp:param name="ID" value="<%=ID%>" /> |
5502 |
18 Nov 10 |
nicklas |
341 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5502 |
18 Nov 10 |
nicklas |
342 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5502 |
18 Nov 10 |
nicklas |
343 |
<jsp:param name="title" value="Other items related to this file" /> |
5502 |
18 Nov 10 |
nicklas |
344 |
</jsp:include> |
5938 |
27 Jan 12 |
nicklas |
345 |
<jsp:include page="../../common/share/list_share.jsp"> |
5938 |
27 Jan 12 |
nicklas |
346 |
<jsp:param name="ID" value="<%=ID%>" /> |
5938 |
27 Jan 12 |
nicklas |
347 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5938 |
27 Jan 12 |
nicklas |
348 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5938 |
27 Jan 12 |
nicklas |
349 |
<jsp:param name="title" value="Shared to" /> |
5938 |
27 Jan 12 |
nicklas |
350 |
</jsp:include> |
5938 |
27 Jan 12 |
nicklas |
351 |
</t:tab> |
7857 |
20 Oct 20 |
nicklas |
352 |
<t:tab id="annotations" title="Annotations" |
7857 |
20 Oct 20 |
nicklas |
353 |
tooltip="View annotation values" clazz="white"> |
7857 |
20 Oct 20 |
nicklas |
354 |
<jsp:include page="../../common/annotations/list_frameset.jsp"> |
7857 |
20 Oct 20 |
nicklas |
355 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
7857 |
20 Oct 20 |
nicklas |
356 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
7857 |
20 Oct 20 |
nicklas |
357 |
<jsp:param name="ID" value="<%=ID%>" /> |
7857 |
20 Oct 20 |
nicklas |
358 |
</jsp:include> |
7857 |
20 Oct 20 |
nicklas |
359 |
</t:tab> |
7857 |
20 Oct 20 |
nicklas |
360 |
|
7166 |
07 Jun 16 |
nicklas |
361 |
<t:tab id="history" title="History" |
7166 |
07 Jun 16 |
nicklas |
362 |
tooltip="Displays a log with the history of this item" |
6308 |
20 Aug 13 |
nicklas |
363 |
visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
6244 |
25 Feb 13 |
nicklas |
364 |
<jsp:include page="../../common/history/frameset.jsp"> |
6244 |
25 Feb 13 |
nicklas |
365 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6244 |
25 Feb 13 |
nicklas |
366 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6244 |
25 Feb 13 |
nicklas |
367 |
<jsp:param name="ID" value="<%=ID%>" /> |
6244 |
25 Feb 13 |
nicklas |
368 |
</jsp:include> |
5065 |
19 Aug 09 |
nicklas |
369 |
</t:tab> |
5065 |
19 Aug 09 |
nicklas |
370 |
</t:tabcontrol> |
5938 |
27 Jan 12 |
nicklas |
371 |
</div> |
1794 |
19 Jan 06 |
nicklas |
372 |
</base:body> |
1794 |
19 Jan 06 |
nicklas |
373 |
</base:page> |
1794 |
19 Jan 06 |
nicklas |
374 |
<% |
1794 |
19 Jan 06 |
nicklas |
375 |
} |
1794 |
19 Jan 06 |
nicklas |
376 |
finally |
1794 |
19 Jan 06 |
nicklas |
377 |
{ |
1794 |
19 Jan 06 |
nicklas |
378 |
if (dc != null) dc.close(); |
1794 |
19 Jan 06 |
nicklas |
379 |
} |
1794 |
19 Jan 06 |
nicklas |
380 |
|
1794 |
19 Jan 06 |
nicklas |
381 |
%> |