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" |
1794 |
19 Jan 06 |
nicklas |
30 |
import="net.sf.basedb.core.SystemItems" |
1794 |
19 Jan 06 |
nicklas |
31 |
import="net.sf.basedb.core.Item" |
3719 |
12 Sep 07 |
nicklas |
32 |
import="net.sf.basedb.core.Type" |
1794 |
19 Jan 06 |
nicklas |
33 |
import="net.sf.basedb.core.Location" |
1794 |
19 Jan 06 |
nicklas |
34 |
import="net.sf.basedb.core.File" |
1794 |
19 Jan 06 |
nicklas |
35 |
import="net.sf.basedb.core.Directory" |
5630 |
13 May 11 |
nicklas |
36 |
import="net.sf.basedb.core.ItemSubtype" |
7857 |
20 Oct 20 |
nicklas |
37 |
import="net.sf.basedb.core.AnnotationType" |
1794 |
19 Jan 06 |
nicklas |
38 |
import="net.sf.basedb.core.ItemQuery" |
1794 |
19 Jan 06 |
nicklas |
39 |
import="net.sf.basedb.core.ItemResultIterator" |
1794 |
19 Jan 06 |
nicklas |
40 |
import="net.sf.basedb.core.ItemResultList" |
1794 |
19 Jan 06 |
nicklas |
41 |
import="net.sf.basedb.core.ItemContext" |
5179 |
04 Nov 09 |
nicklas |
42 |
import="net.sf.basedb.core.ItemContext.SortDirection" |
1794 |
19 Jan 06 |
nicklas |
43 |
import="net.sf.basedb.core.Include" |
3552 |
06 Jul 07 |
martin |
44 |
import="net.sf.basedb.core.Nameable" |
1794 |
19 Jan 06 |
nicklas |
45 |
import="net.sf.basedb.core.PropertyFilter" |
1794 |
19 Jan 06 |
nicklas |
46 |
import="net.sf.basedb.core.Permission" |
1794 |
19 Jan 06 |
nicklas |
47 |
import="net.sf.basedb.core.PluginDefinition" |
4669 |
26 Nov 08 |
nicklas |
48 |
import="net.sf.basedb.core.Quantity" |
4669 |
26 Nov 08 |
nicklas |
49 |
import="net.sf.basedb.core.Unit" |
6703 |
02 Feb 15 |
nicklas |
50 |
import="net.sf.basedb.core.query.Restriction" |
1794 |
19 Jan 06 |
nicklas |
51 |
import="net.sf.basedb.core.query.Restrictions" |
1794 |
19 Jan 06 |
nicklas |
52 |
import="net.sf.basedb.core.query.Expressions" |
1794 |
19 Jan 06 |
nicklas |
53 |
import="net.sf.basedb.core.query.Hql" |
1794 |
19 Jan 06 |
nicklas |
54 |
import="net.sf.basedb.core.query.Orders" |
1794 |
19 Jan 06 |
nicklas |
55 |
import="net.sf.basedb.core.plugin.GuiContext" |
1794 |
19 Jan 06 |
nicklas |
56 |
import="net.sf.basedb.core.plugin.Plugin" |
7857 |
20 Oct 20 |
nicklas |
57 |
import="net.sf.basedb.core.snapshot.AnnotationLoaderUtil" |
7857 |
20 Oct 20 |
nicklas |
58 |
import="net.sf.basedb.core.snapshot.AnnotationTypeFilter" |
7857 |
20 Oct 20 |
nicklas |
59 |
import="net.sf.basedb.core.snapshot.AnnotationSnapshot" |
7857 |
20 Oct 20 |
nicklas |
60 |
import="net.sf.basedb.core.snapshot.AnnotationSetSnapshot" |
7857 |
20 Oct 20 |
nicklas |
61 |
import="net.sf.basedb.core.snapshot.SnapshotManager" |
1794 |
19 Jan 06 |
nicklas |
62 |
import="net.sf.basedb.util.Enumeration" |
3552 |
06 Jul 07 |
martin |
63 |
import="net.sf.basedb.util.ShareableUtil" |
4669 |
26 Nov 08 |
nicklas |
64 |
import="net.sf.basedb.util.units.UnitUtil" |
1794 |
19 Jan 06 |
nicklas |
65 |
import="net.sf.basedb.clients.web.Base" |
1794 |
19 Jan 06 |
nicklas |
66 |
import="net.sf.basedb.clients.web.ModeInfo" |
2403 |
21 Jun 06 |
martin |
67 |
import="net.sf.basedb.clients.web.PermissionUtil" |
1794 |
19 Jan 06 |
nicklas |
68 |
import="net.sf.basedb.clients.web.util.HTML" |
3466 |
08 Jun 07 |
nicklas |
69 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4232 |
17 Apr 08 |
nicklas |
70 |
import="net.sf.basedb.clients.web.formatter.FormatterSettings" |
2753 |
20 Oct 06 |
nicklas |
71 |
import="net.sf.basedb.util.Values" |
3466 |
08 Jun 07 |
nicklas |
72 |
import="net.sf.basedb.util.formatter.Formatter" |
4887 |
06 Apr 09 |
nicklas |
73 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4887 |
06 Apr 09 |
nicklas |
74 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4887 |
06 Apr 09 |
nicklas |
75 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
76 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4887 |
06 Apr 09 |
nicklas |
77 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
7604 |
25 Feb 19 |
nicklas |
78 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnAction" |
6040 |
30 Mar 12 |
nicklas |
79 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnUtil" |
7760 |
27 Nov 19 |
nicklas |
80 |
import="net.sf.basedb.clients.web.extensions.fileviewer.FileViewerUtil" |
7760 |
27 Nov 19 |
nicklas |
81 |
import="net.sf.basedb.clients.web.extensions.fileviewer.FileViewerContext" |
7857 |
20 Oct 20 |
nicklas |
82 |
import="net.sf.basedb.clients.web.util.ProjectSpecificInfoFilter" |
4887 |
06 Apr 09 |
nicklas |
83 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
3552 |
06 Jul 07 |
martin |
84 |
import="java.util.Iterator" |
1794 |
19 Jan 06 |
nicklas |
85 |
import="java.util.Map" |
6703 |
02 Feb 15 |
nicklas |
86 |
import="java.util.List" |
6703 |
02 Feb 15 |
nicklas |
87 |
import="java.util.ArrayList" |
3466 |
08 Jun 07 |
nicklas |
88 |
import="java.util.Date" |
1794 |
19 Jan 06 |
nicklas |
89 |
%> |
1794 |
19 Jan 06 |
nicklas |
90 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1794 |
19 Jan 06 |
nicklas |
91 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
1794 |
19 Jan 06 |
nicklas |
92 |
<%@ taglib prefix="m" uri="/WEB-INF/menu.tld" %> |
4887 |
06 Apr 09 |
nicklas |
93 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
1794 |
19 Jan 06 |
nicklas |
94 |
<%! |
1794 |
19 Jan 06 |
nicklas |
95 |
private static final Item itemType = Item.FILE; |
1794 |
19 Jan 06 |
nicklas |
96 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST); |
1794 |
19 Jan 06 |
nicklas |
97 |
%> |
1794 |
19 Jan 06 |
nicklas |
98 |
<% |
1794 |
19 Jan 06 |
nicklas |
99 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType); |
1794 |
19 Jan 06 |
nicklas |
100 |
final String ID = sc.getId(); |
5179 |
04 Nov 09 |
nicklas |
101 |
final String subcontext = Values.getString(request.getParameter("subcontext"), ""); |
5179 |
04 Nov 09 |
nicklas |
102 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, subcontext, null, null); |
1794 |
19 Jan 06 |
nicklas |
103 |
|
1794 |
19 Jan 06 |
nicklas |
104 |
final int directoryId = Values.getInt(request.getParameter("directory_id"), SystemItems.getId(Directory.ROOT)); |
1794 |
19 Jan 06 |
nicklas |
105 |
final ModeInfo mode = ModeInfo.get(request.getParameter("mode")); |
1794 |
19 Jan 06 |
nicklas |
106 |
final String callback = request.getParameter("callback"); |
1794 |
19 Jan 06 |
nicklas |
107 |
final String title = null; //mode.generateTitle("file", "files"); |
5179 |
04 Nov 09 |
nicklas |
108 |
final boolean isSearch = "search".equals(subcontext); |
5179 |
04 Nov 09 |
nicklas |
109 |
final boolean hasFilter = cc.getNumPropertyFilters() > 0; |
7954 |
12 May 21 |
nicklas |
110 |
final DbControl dc = sc.newDbControl(":List "+itemType); |
1794 |
19 Jan 06 |
nicklas |
111 |
ItemResultIterator<File> files = null; |
1794 |
19 Jan 06 |
nicklas |
112 |
ItemResultIterator<Directory> directories = null; |
7857 |
20 Oct 20 |
nicklas |
113 |
List<AnnotationLoaderUtil> annotationLoaders = new ArrayList<AnnotationLoaderUtil>(); |
1794 |
19 Jan 06 |
nicklas |
114 |
try |
1794 |
19 Jan 06 |
nicklas |
115 |
{ |
5179 |
04 Nov 09 |
nicklas |
116 |
final Directory current = isSearch ? null : Directory.getById(dc, directoryId); |
6308 |
20 Aug 13 |
nicklas |
117 |
final String currentPath = current == null ? null : HTML.encodeTags(current.getPath().toString()); |
5179 |
04 Nov 09 |
nicklas |
118 |
final boolean createFilePermission = isSearch ? false : sc.hasPermission(Permission.CREATE, itemType) && current.hasPermission(Permission.USE); |
5179 |
04 Nov 09 |
nicklas |
119 |
final boolean createDirectoryPermission = isSearch ? false : sc.hasPermission(Permission.CREATE, Item.DIRECTORY) && current.hasPermission(Permission.USE); |
1794 |
19 Jan 06 |
nicklas |
120 |
|
4669 |
26 Nov 08 |
nicklas |
121 |
Unit bytes = UnitUtil.getUnit(dc, Quantity.STORAGE_SIZE, "B"); |
1794 |
19 Jan 06 |
nicklas |
122 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
1794 |
19 Jan 06 |
nicklas |
123 |
|
7857 |
20 Oct 20 |
nicklas |
124 |
ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType); |
7857 |
20 Oct 20 |
nicklas |
125 |
SnapshotManager manager = new SnapshotManager(); |
7857 |
20 Oct 20 |
nicklas |
126 |
ProjectSpecificInfoFilter psInfo = new ProjectSpecificInfoFilter(); |
7857 |
20 Oct 20 |
nicklas |
127 |
for (AnnotationType at : annotationTypeQuery.list(dc)) |
7857 |
20 Oct 20 |
nicklas |
128 |
{ |
7857 |
20 Oct 20 |
nicklas |
129 |
annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at)); |
7857 |
20 Oct 20 |
nicklas |
130 |
} |
7857 |
20 Oct 20 |
nicklas |
131 |
|
1794 |
19 Jan 06 |
nicklas |
132 |
// Get all file types |
5643 |
26 May 11 |
nicklas |
133 |
final ItemQuery<ItemSubtype> subtypesQuery = Base.getSubtypesQuery(itemType); |
1794 |
19 Jan 06 |
nicklas |
134 |
|
5179 |
04 Nov 09 |
nicklas |
135 |
// Create directory query |
1794 |
19 Jan 06 |
nicklas |
136 |
final ItemQuery<Directory> directoryQuery = Directory.getQuery(); |
7310 |
20 Mar 17 |
nicklas |
137 |
directoryQuery.setIncludes(cc.getInclude()); |
5179 |
04 Nov 09 |
nicklas |
138 |
if (!isSearch) |
5179 |
04 Nov 09 |
nicklas |
139 |
{ |
5179 |
04 Nov 09 |
nicklas |
140 |
// Limit to current directory; no paging |
5179 |
04 Nov 09 |
nicklas |
141 |
directoryQuery.restrict(Restrictions.eq(Hql.property("parent"), Hql.entity(current))); |
5179 |
04 Nov 09 |
nicklas |
142 |
directoryQuery.setFirstResult(0); |
5179 |
04 Nov 09 |
nicklas |
143 |
directoryQuery.setMaxResults(-1); |
5179 |
04 Nov 09 |
nicklas |
144 |
directoryQuery.setReturnTotalCount(false); |
5179 |
04 Nov 09 |
nicklas |
145 |
} |
5179 |
04 Nov 09 |
nicklas |
146 |
else |
5179 |
04 Nov 09 |
nicklas |
147 |
{ |
5179 |
04 Nov 09 |
nicklas |
148 |
// Never match the root directory; setup paging |
5179 |
04 Nov 09 |
nicklas |
149 |
directoryQuery.restrict(Restrictions.neq(Hql.property("parent"), null)); |
5179 |
04 Nov 09 |
nicklas |
150 |
directoryQuery.setFirstResult(cc.getPage() * cc.getRowsPerPage()); |
5179 |
04 Nov 09 |
nicklas |
151 |
directoryQuery.setMaxResults(cc.getRowsPerPage()); |
5179 |
04 Nov 09 |
nicklas |
152 |
directoryQuery.setReturnTotalCount(false); |
5179 |
04 Nov 09 |
nicklas |
153 |
} |
5179 |
04 Nov 09 |
nicklas |
154 |
boolean hasDirFilter = false; |
6703 |
02 Feb 15 |
nicklas |
155 |
List<Restriction> allDirRestrictions = new ArrayList<Restriction>(); |
6703 |
02 Feb 15 |
nicklas |
156 |
for (int filterRow = 0; filterRow < cc.getFilterRows(); filterRow++) |
5179 |
04 Nov 09 |
nicklas |
157 |
{ |
6703 |
02 Feb 15 |
nicklas |
158 |
List<Restriction> rowFilter = new ArrayList<Restriction>(); |
6703 |
02 Feb 15 |
nicklas |
159 |
// Add 'name', 'description' and other common filters to directory query |
6703 |
02 Feb 15 |
nicklas |
160 |
PropertyFilter filter = cc.getPropertyFilter("name", filterRow); |
6703 |
02 Feb 15 |
nicklas |
161 |
if (filter != null) |
6703 |
02 Feb 15 |
nicklas |
162 |
{ |
6703 |
02 Feb 15 |
nicklas |
163 |
rowFilter.add(filter.getRestriction(dc, directoryQuery)); |
6703 |
02 Feb 15 |
nicklas |
164 |
} |
6703 |
02 Feb 15 |
nicklas |
165 |
filter = cc.getPropertyFilter("description", filterRow); |
6703 |
02 Feb 15 |
nicklas |
166 |
if (filter != null) |
6703 |
02 Feb 15 |
nicklas |
167 |
{ |
6703 |
02 Feb 15 |
nicklas |
168 |
rowFilter.add(filter.getRestriction(dc, directoryQuery)); |
6703 |
02 Feb 15 |
nicklas |
169 |
} |
6703 |
02 Feb 15 |
nicklas |
170 |
filter = cc.getPropertyFilter("compressed", filterRow); |
6703 |
02 Feb 15 |
nicklas |
171 |
if (filter != null) |
6703 |
02 Feb 15 |
nicklas |
172 |
{ |
6703 |
02 Feb 15 |
nicklas |
173 |
rowFilter.add(Restrictions.eq(Hql.property("autoCompress"), Expressions.parameter("ac"+filterRow))); |
6703 |
02 Feb 15 |
nicklas |
174 |
directoryQuery.setParameter("ac"+filterRow, filter.getValueAsObject(), Type.BOOLEAN); |
6703 |
02 Feb 15 |
nicklas |
175 |
} |
6703 |
02 Feb 15 |
nicklas |
176 |
filter = cc.getPropertyFilter("!sharedTo.name", filterRow); |
6703 |
02 Feb 15 |
nicklas |
177 |
if (filter != null) |
6703 |
02 Feb 15 |
nicklas |
178 |
{ |
6703 |
02 Feb 15 |
nicklas |
179 |
rowFilter.add(filter.getRestriction(dc, directoryQuery)); |
6703 |
02 Feb 15 |
nicklas |
180 |
} |
6703 |
02 Feb 15 |
nicklas |
181 |
filter = cc.getPropertyFilter("directory.name", filterRow); |
6703 |
02 Feb 15 |
nicklas |
182 |
if (filter != null) |
6703 |
02 Feb 15 |
nicklas |
183 |
{ |
6703 |
02 Feb 15 |
nicklas |
184 |
filter = new PropertyFilter("parent.name", filter.getOperator(), filter.getValue(), filter.getValueType()); |
6703 |
02 Feb 15 |
nicklas |
185 |
rowFilter.add(filter.getRestriction(dc, directoryQuery)); |
6703 |
02 Feb 15 |
nicklas |
186 |
} |
6703 |
02 Feb 15 |
nicklas |
187 |
filter = cc.getPropertyFilter("owner.name", filterRow); |
6703 |
02 Feb 15 |
nicklas |
188 |
if (filter != null) |
6703 |
02 Feb 15 |
nicklas |
189 |
{ |
6703 |
02 Feb 15 |
nicklas |
190 |
rowFilter.add(filter.getRestriction(dc, directoryQuery)); |
6703 |
02 Feb 15 |
nicklas |
191 |
} |
6703 |
02 Feb 15 |
nicklas |
192 |
if (rowFilter.size() > 0) |
6703 |
02 Feb 15 |
nicklas |
193 |
{ |
6703 |
02 Feb 15 |
nicklas |
194 |
allDirRestrictions.add(Restrictions.nullSafeAnd(rowFilter)); |
6703 |
02 Feb 15 |
nicklas |
195 |
} |
5179 |
04 Nov 09 |
nicklas |
196 |
} |
6703 |
02 Feb 15 |
nicklas |
197 |
if (allDirRestrictions.size() > 0) |
5179 |
04 Nov 09 |
nicklas |
198 |
{ |
6703 |
02 Feb 15 |
nicklas |
199 |
directoryQuery.restrict(Restrictions.nullSafeOr(allDirRestrictions)); |
5179 |
04 Nov 09 |
nicklas |
200 |
hasDirFilter = true; |
5179 |
04 Nov 09 |
nicklas |
201 |
} |
2403 |
21 Jun 06 |
martin |
202 |
if (cc.getItemPermission() != null) directoryQuery.setItemPermission(cc.getItemPermission()); |
2403 |
21 Jun 06 |
martin |
203 |
|
1794 |
19 Jan 06 |
nicklas |
204 |
// Add sort order to directory query |
5179 |
04 Nov 09 |
nicklas |
205 |
String sortProperties = cc.getSortProperty(); |
5179 |
04 Nov 09 |
nicklas |
206 |
boolean sorted = false; |
5179 |
04 Nov 09 |
nicklas |
207 |
if (sortProperties != null) |
1794 |
19 Jan 06 |
nicklas |
208 |
{ |
5179 |
04 Nov 09 |
nicklas |
209 |
String[] tmp = sortProperties.split(","); |
5179 |
04 Nov 09 |
nicklas |
210 |
SortDirection sortDirection = cc.getSortDirection(); |
5179 |
04 Nov 09 |
nicklas |
211 |
for (String sort : tmp) |
5179 |
04 Nov 09 |
nicklas |
212 |
{ |
5179 |
04 Nov 09 |
nicklas |
213 |
if ("name".equals(sort) || "description".equals(sort) || "owner.name".equals(sort)) |
5179 |
04 Nov 09 |
nicklas |
214 |
{ |
5179 |
04 Nov 09 |
nicklas |
215 |
directoryQuery.order(sortDirection.sortBy(Hql.property(sort))); |
5179 |
04 Nov 09 |
nicklas |
216 |
sorted = true; |
5179 |
04 Nov 09 |
nicklas |
217 |
} |
5179 |
04 Nov 09 |
nicklas |
218 |
else if ("directory.name".equals(sort)) |
5179 |
04 Nov 09 |
nicklas |
219 |
{ |
5179 |
04 Nov 09 |
nicklas |
220 |
directoryQuery.order(sortDirection.sortBy(Hql.property("parent.name"))); |
5179 |
04 Nov 09 |
nicklas |
221 |
sorted = true; |
5179 |
04 Nov 09 |
nicklas |
222 |
} |
5179 |
04 Nov 09 |
nicklas |
223 |
} |
1794 |
19 Jan 06 |
nicklas |
224 |
} |
5179 |
04 Nov 09 |
nicklas |
225 |
if (!sorted) |
1794 |
19 Jan 06 |
nicklas |
226 |
{ |
1794 |
19 Jan 06 |
nicklas |
227 |
directoryQuery.order(Orders.asc(Hql.property("name"))); |
1794 |
19 Jan 06 |
nicklas |
228 |
} |
1794 |
19 Jan 06 |
nicklas |
229 |
|
5179 |
04 Nov 09 |
nicklas |
230 |
int numDirectories = isSearch && hasDirFilter ? (int)directoryQuery.count(dc) : 0; |
5179 |
04 Nov 09 |
nicklas |
231 |
int maxFiles = cc.getRowsPerPage(); |
5179 |
04 Nov 09 |
nicklas |
232 |
|
5179 |
04 Nov 09 |
nicklas |
233 |
// Get all files in current directory |
7914 |
23 Feb 21 |
nicklas |
234 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, current); |
7914 |
23 Feb 21 |
nicklas |
235 |
final ItemQuery<File> fileQuery = Base.getConfiguredQuery(dc, cc, jspContext, true, File.getQuery(), mode); |
5179 |
04 Nov 09 |
nicklas |
236 |
if (!isSearch) |
5179 |
04 Nov 09 |
nicklas |
237 |
{ |
5179 |
04 Nov 09 |
nicklas |
238 |
fileQuery.restrict(Restrictions.eq(Hql.property("directory"), Hql.entity(current))); |
5179 |
04 Nov 09 |
nicklas |
239 |
fileQuery.setFirstResult(0); |
5179 |
04 Nov 09 |
nicklas |
240 |
fileQuery.setMaxResults(-1); |
5179 |
04 Nov 09 |
nicklas |
241 |
fileQuery.setReturnTotalCount(false); |
5179 |
04 Nov 09 |
nicklas |
242 |
} |
5179 |
04 Nov 09 |
nicklas |
243 |
else |
5179 |
04 Nov 09 |
nicklas |
244 |
{ |
5179 |
04 Nov 09 |
nicklas |
245 |
int firstFile = cc.getPage() * cc.getRowsPerPage() - numDirectories; |
5179 |
04 Nov 09 |
nicklas |
246 |
if (firstFile < 0) |
5179 |
04 Nov 09 |
nicklas |
247 |
{ |
5179 |
04 Nov 09 |
nicklas |
248 |
maxFiles += firstFile; |
5179 |
04 Nov 09 |
nicklas |
249 |
firstFile = 0; |
5179 |
04 Nov 09 |
nicklas |
250 |
if (maxFiles < 0) maxFiles = 0; |
5179 |
04 Nov 09 |
nicklas |
251 |
} |
5179 |
04 Nov 09 |
nicklas |
252 |
fileQuery.setFirstResult(firstFile); |
5179 |
04 Nov 09 |
nicklas |
253 |
fileQuery.setMaxResults(maxFiles); |
5179 |
04 Nov 09 |
nicklas |
254 |
fileQuery.setReturnTotalCount(false); |
5179 |
04 Nov 09 |
nicklas |
255 |
} |
5179 |
04 Nov 09 |
nicklas |
256 |
|
5179 |
04 Nov 09 |
nicklas |
257 |
int numFiles = isSearch && hasFilter ? (int)fileQuery.count(dc) : 0; |
2029 |
20 Feb 06 |
nicklas |
258 |
try |
2029 |
20 Feb 06 |
nicklas |
259 |
{ |
5179 |
04 Nov 09 |
nicklas |
260 |
files = !isSearch || hasFilter && maxFiles > 0 ? fileQuery.iterate(dc) : null; |
5179 |
04 Nov 09 |
nicklas |
261 |
directories = !isSearch || hasDirFilter ? directoryQuery.iterate(dc) : null; |
2029 |
20 Feb 06 |
nicklas |
262 |
} |
2029 |
20 Feb 06 |
nicklas |
263 |
catch (Throwable t) |
2029 |
20 Feb 06 |
nicklas |
264 |
{ |
2029 |
20 Feb 06 |
nicklas |
265 |
cc.setMessage(t.getMessage()); |
5179 |
04 Nov 09 |
nicklas |
266 |
t.printStackTrace(); |
2029 |
20 Feb 06 |
nicklas |
267 |
} |
2029 |
20 Feb 06 |
nicklas |
268 |
|
1794 |
19 Jan 06 |
nicklas |
269 |
int numListed = 0; |
3466 |
08 Jun 07 |
nicklas |
270 |
Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); |
7604 |
25 Feb 19 |
nicklas |
271 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
7604 |
25 Feb 19 |
nicklas |
272 |
ExtensionsInvoker<ListColumnAction<File,?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext); |
7760 |
27 Nov 19 |
nicklas |
273 |
FileViewerContext fileContext = FileViewerContext.file(); |
7855 |
19 Oct 20 |
nicklas |
274 |
FileViewerUtil fileViewer = FileViewerUtil.getOrCreate(jspContext, fileContext); |
7760 |
27 Nov 19 |
nicklas |
275 |
fileViewer.setPrefixAndSuffix("", ""); |
1794 |
19 Jan 06 |
nicklas |
276 |
%> |
6308 |
20 Aug 13 |
nicklas |
277 |
<base:page title="<%=title==null ? "Files" : title%>" type="iframe" id="list-page"> |
6308 |
20 Aug 13 |
nicklas |
278 |
<base:head scripts="table.js,menu.js,dragdrop.js,~files.js" styles="table.css,toolbar.css,menu.css"> |
4887 |
06 Apr 09 |
nicklas |
279 |
<ext:scripts context="<%=jspContext%>" /> |
4887 |
06 Apr 09 |
nicklas |
280 |
<ext:stylesheets context="<%=jspContext%>" /> |
7983 |
22 Jun 21 |
nicklas |
281 |
<style> |
7983 |
22 Jun 21 |
nicklas |
282 |
.drop-upload > th, .drop-upload > td |
7983 |
22 Jun 21 |
nicklas |
283 |
{ |
7983 |
22 Jun 21 |
nicklas |
284 |
border-top: 1px solid black !important; |
7983 |
22 Jun 21 |
nicklas |
285 |
border-bottom: 1px solid black !important; |
7983 |
22 Jun 21 |
nicklas |
286 |
background-color: white !important; |
7983 |
22 Jun 21 |
nicklas |
287 |
} |
7983 |
22 Jun 21 |
nicklas |
288 |
#uploadTooltip |
7983 |
22 Jun 21 |
nicklas |
289 |
{ |
7983 |
22 Jun 21 |
nicklas |
290 |
position: absolute; |
7983 |
22 Jun 21 |
nicklas |
291 |
background-color: white; |
7983 |
22 Jun 21 |
nicklas |
292 |
padding: 0.25em; |
7983 |
22 Jun 21 |
nicklas |
293 |
z-index: 999; |
7983 |
22 Jun 21 |
nicklas |
294 |
max-width: 30em; |
7983 |
22 Jun 21 |
nicklas |
295 |
border-radius: 5px; |
7983 |
22 Jun 21 |
nicklas |
296 |
box-shadow: 0 0 6px; |
7983 |
22 Jun 21 |
nicklas |
297 |
} |
7983 |
22 Jun 21 |
nicklas |
298 |
</style> |
1794 |
19 Jan 06 |
nicklas |
299 |
</base:head> |
1794 |
19 Jan 06 |
nicklas |
300 |
|
6308 |
20 Aug 13 |
nicklas |
301 |
<base:body> |
1794 |
19 Jan 06 |
nicklas |
302 |
<m:menu |
6308 |
20 Aug 13 |
nicklas |
303 |
id="moveFiles" |
1794 |
19 Jan 06 |
nicklas |
304 |
style="display: none;"> |
1794 |
19 Jan 06 |
nicklas |
305 |
<m:menuitem |
6308 |
20 Aug 13 |
nicklas |
306 |
id="mnuMoveToDirectory" |
1798 |
20 Jan 06 |
nicklas |
307 |
title="To another directory…" |
1794 |
19 Jan 06 |
nicklas |
308 |
tooltip="Move the selected files and directories to another directory" |
1794 |
19 Jan 06 |
nicklas |
309 |
/> |
1794 |
19 Jan 06 |
nicklas |
310 |
<m:menuseparator /> |
1794 |
19 Jan 06 |
nicklas |
311 |
<m:menuitem |
6308 |
20 Aug 13 |
nicklas |
312 |
id="mnuMoveOffline" |
6308 |
20 Aug 13 |
nicklas |
313 |
data-location="OFFLINE" |
1798 |
20 Jan 06 |
nicklas |
314 |
title="Offline…" |
1794 |
19 Jan 06 |
nicklas |
315 |
tooltip="Remove the selected files from the server (immedately)" |
1794 |
19 Jan 06 |
nicklas |
316 |
/> |
1794 |
19 Jan 06 |
nicklas |
317 |
|
1794 |
19 Jan 06 |
nicklas |
318 |
</m:menu> |
7983 |
22 Jun 21 |
nicklas |
319 |
<div id="main" class="absolutefull topborder auto-init" data-auto-init="drag-support" data-upload-permission="<%=createFilePermission?1:0%>"> |
6308 |
20 Aug 13 |
nicklas |
320 |
<div id="page-data" class="datacontainer" |
6308 |
20 Aug 13 |
nicklas |
321 |
data-is-search="<%=isSearch ? 1 : 0 %>" |
6308 |
20 Aug 13 |
nicklas |
322 |
data-files-found="<%=numFiles %>" |
6308 |
20 Aug 13 |
nicklas |
323 |
data-directories-found="<%=numDirectories %>" |
7983 |
22 Jun 21 |
nicklas |
324 |
data-current-directory-id="<%=current == null ? 0 : current.getId() %>" |
6308 |
20 Aug 13 |
nicklas |
325 |
data-current-path="<%=currentPath == null ? "" : currentPath %>" |
6308 |
20 Aug 13 |
nicklas |
326 |
></div> |
6308 |
20 Aug 13 |
nicklas |
327 |
|
7983 |
22 Jun 21 |
nicklas |
328 |
<div id="uploadTooltip" class="messagecontainer" style="display: none;"></div> |
7983 |
22 Jun 21 |
nicklas |
329 |
|
1794 |
19 Jan 06 |
nicklas |
330 |
<tbl:table |
5952 |
10 Feb 12 |
nicklas |
331 |
id="files" |
1794 |
19 Jan 06 |
nicklas |
332 |
columns="<%=cc.getSetting("columns")%>" |
1794 |
19 Jan 06 |
nicklas |
333 |
sortby="<%=cc.getSortProperty()%>" |
1794 |
19 Jan 06 |
nicklas |
334 |
direction="<%=cc.getSortDirection()%>" |
1794 |
19 Jan 06 |
nicklas |
335 |
action="index.jsp" |
1794 |
19 Jan 06 |
nicklas |
336 |
sc="<%=sc%>" |
1794 |
19 Jan 06 |
nicklas |
337 |
item="<%=itemType%>" |
5179 |
04 Nov 09 |
nicklas |
338 |
subcontext="<%=subcontext%>" |
6703 |
02 Feb 15 |
nicklas |
339 |
filterrows="<%=cc.getFilterRows()%>" |
6610 |
20 Nov 14 |
nicklas |
340 |
subclass="fulltable" |
7982 |
14 Jun 21 |
nicklas |
341 |
stickyheaders="<%=cc.getSetting("columns.sticky", "name")%>" |
1794 |
19 Jan 06 |
nicklas |
342 |
> |
1794 |
19 Jan 06 |
nicklas |
343 |
<tbl:hidden |
1794 |
19 Jan 06 |
nicklas |
344 |
name="mode" |
1794 |
19 Jan 06 |
nicklas |
345 |
value="<%=mode.getName()%>" |
1794 |
19 Jan 06 |
nicklas |
346 |
/> |
1794 |
19 Jan 06 |
nicklas |
347 |
<tbl:hidden |
5179 |
04 Nov 09 |
nicklas |
348 |
name="subcontext" |
5179 |
04 Nov 09 |
nicklas |
349 |
value="<%=subcontext%>" |
5179 |
04 Nov 09 |
nicklas |
350 |
skip="<%=subcontext == null%>" |
5179 |
04 Nov 09 |
nicklas |
351 |
/> |
5179 |
04 Nov 09 |
nicklas |
352 |
<tbl:hidden |
1794 |
19 Jan 06 |
nicklas |
353 |
name="directory_id" |
1794 |
19 Jan 06 |
nicklas |
354 |
value="<%=Integer.toString(directoryId)%>" |
1794 |
19 Jan 06 |
nicklas |
355 |
/> |
1794 |
19 Jan 06 |
nicklas |
356 |
<tbl:hidden |
1794 |
19 Jan 06 |
nicklas |
357 |
name="callback" |
1794 |
19 Jan 06 |
nicklas |
358 |
value="<%=callback%>" |
1794 |
19 Jan 06 |
nicklas |
359 |
skip="<%=callback == null%>" |
1794 |
19 Jan 06 |
nicklas |
360 |
/> |
1794 |
19 Jan 06 |
nicklas |
361 |
<tbl:columndef |
1794 |
19 Jan 06 |
nicklas |
362 |
id="name" |
4387 |
11 Aug 08 |
nicklas |
363 |
clazz="uniquecol" |
1794 |
19 Jan 06 |
nicklas |
364 |
property="name" |
1794 |
19 Jan 06 |
nicklas |
365 |
datatype="string" |
1794 |
19 Jan 06 |
nicklas |
366 |
title="Name" |
1794 |
19 Jan 06 |
nicklas |
367 |
sortable="true" |
1794 |
19 Jan 06 |
nicklas |
368 |
filterable="true" |
1794 |
19 Jan 06 |
nicklas |
369 |
exportable="true" |
1794 |
19 Jan 06 |
nicklas |
370 |
show="always" |
1794 |
19 Jan 06 |
nicklas |
371 |
/> |
5179 |
04 Nov 09 |
nicklas |
372 |
<tbl:columndef |
5179 |
04 Nov 09 |
nicklas |
373 |
id="path" |
5179 |
04 Nov 09 |
nicklas |
374 |
title="Path" |
5179 |
04 Nov 09 |
nicklas |
375 |
property="directory.name" |
6587 |
03 Nov 14 |
nicklas |
376 |
exportproperty="path" |
5179 |
04 Nov 09 |
nicklas |
377 |
tooltip="Only the immediate parent directory can be searched or sorted" |
5179 |
04 Nov 09 |
nicklas |
378 |
datatype="string" |
5179 |
04 Nov 09 |
nicklas |
379 |
sortable="true" |
5179 |
04 Nov 09 |
nicklas |
380 |
filterable="true" |
5179 |
04 Nov 09 |
nicklas |
381 |
exportable="true" |
5179 |
04 Nov 09 |
nicklas |
382 |
show="<%=isSearch ? "always" : "never" %>" |
5179 |
04 Nov 09 |
nicklas |
383 |
/> |
1794 |
19 Jan 06 |
nicklas |
384 |
<tbl:columndef |
5326 |
29 Apr 10 |
nicklas |
385 |
id="url" |
5326 |
29 Apr 10 |
nicklas |
386 |
property="url" |
5326 |
29 Apr 10 |
nicklas |
387 |
datatype="string" |
5326 |
29 Apr 10 |
nicklas |
388 |
title="URL" |
5326 |
29 Apr 10 |
nicklas |
389 |
sortable="true" |
5326 |
29 Apr 10 |
nicklas |
390 |
filterable="true" |
5326 |
29 Apr 10 |
nicklas |
391 |
exportable="true" |
5326 |
29 Apr 10 |
nicklas |
392 |
/> |
5326 |
29 Apr 10 |
nicklas |
393 |
<tbl:columndef |
5361 |
14 Jun 10 |
nicklas |
394 |
id="fileServer" |
5361 |
14 Jun 10 |
nicklas |
395 |
property="fileServer.name" |
5361 |
14 Jun 10 |
nicklas |
396 |
datatype="string" |
5361 |
14 Jun 10 |
nicklas |
397 |
title="File server" |
5361 |
14 Jun 10 |
nicklas |
398 |
sortable="true" |
5361 |
14 Jun 10 |
nicklas |
399 |
filterable="true" |
5361 |
14 Jun 10 |
nicklas |
400 |
exportable="true" |
5361 |
14 Jun 10 |
nicklas |
401 |
/> |
5361 |
14 Jun 10 |
nicklas |
402 |
<tbl:columndef |
4332 |
12 Jun 08 |
martin |
403 |
id="id" |
4387 |
11 Aug 08 |
nicklas |
404 |
clazz="uniquecol" |
4332 |
12 Jun 08 |
martin |
405 |
property="id" |
4332 |
12 Jun 08 |
martin |
406 |
datatype="int" |
4332 |
12 Jun 08 |
martin |
407 |
title="ID" |
4332 |
12 Jun 08 |
martin |
408 |
sortable="true" |
4332 |
12 Jun 08 |
martin |
409 |
filterable="true" |
4332 |
12 Jun 08 |
martin |
410 |
exportable="true" |
4332 |
12 Jun 08 |
martin |
411 |
/> |
4332 |
12 Jun 08 |
martin |
412 |
<tbl:columndef |
1794 |
19 Jan 06 |
nicklas |
413 |
id="size" |
1794 |
19 Jan 06 |
nicklas |
414 |
property="size" |
1794 |
19 Jan 06 |
nicklas |
415 |
datatype="long" |
1794 |
19 Jan 06 |
nicklas |
416 |
title="Size" |
1794 |
19 Jan 06 |
nicklas |
417 |
sortable="true" |
1794 |
19 Jan 06 |
nicklas |
418 |
filterable="true" |
1794 |
19 Jan 06 |
nicklas |
419 |
exportable="true" |
4669 |
26 Nov 08 |
nicklas |
420 |
unit="<%=bytes%>" |
1794 |
19 Jan 06 |
nicklas |
421 |
/> |
3463 |
07 Jun 07 |
nicklas |
422 |
<tbl:columndef |
3719 |
12 Sep 07 |
nicklas |
423 |
id="compressedSize" |
3719 |
12 Sep 07 |
nicklas |
424 |
property="compressedSize" |
3719 |
12 Sep 07 |
nicklas |
425 |
datatype="long" |
3719 |
12 Sep 07 |
nicklas |
426 |
title="Compressed size" |
3719 |
12 Sep 07 |
nicklas |
427 |
sortable="true" |
3719 |
12 Sep 07 |
nicklas |
428 |
filterable="true" |
3719 |
12 Sep 07 |
nicklas |
429 |
exportable="true" |
4669 |
26 Nov 08 |
nicklas |
430 |
unit="<%=bytes%>" |
3719 |
12 Sep 07 |
nicklas |
431 |
/> |
3719 |
12 Sep 07 |
nicklas |
432 |
<tbl:columndef |
3719 |
12 Sep 07 |
nicklas |
433 |
id="compressed" |
3719 |
12 Sep 07 |
nicklas |
434 |
property="compressed" |
3719 |
12 Sep 07 |
nicklas |
435 |
datatype="boolean" |
3719 |
12 Sep 07 |
nicklas |
436 |
title="Is compressed" |
3719 |
12 Sep 07 |
nicklas |
437 |
sortable="true" |
3719 |
12 Sep 07 |
nicklas |
438 |
filterable="true" |
3719 |
12 Sep 07 |
nicklas |
439 |
exportable="true" |
3719 |
12 Sep 07 |
nicklas |
440 |
/> |
3719 |
12 Sep 07 |
nicklas |
441 |
<tbl:columndef |
3463 |
07 Jun 07 |
nicklas |
442 |
id="writeProtected" |
3463 |
07 Jun 07 |
nicklas |
443 |
property="writeProtected" |
3463 |
07 Jun 07 |
nicklas |
444 |
datatype="boolean" |
3463 |
07 Jun 07 |
nicklas |
445 |
title="Write protected" |
3463 |
07 Jun 07 |
nicklas |
446 |
sortable="true" |
3463 |
07 Jun 07 |
nicklas |
447 |
filterable="true" |
3463 |
07 Jun 07 |
nicklas |
448 |
exportable="true" |
3463 |
07 Jun 07 |
nicklas |
449 |
/> |
1794 |
19 Jan 06 |
nicklas |
450 |
<tbl:columndef |
5630 |
13 May 11 |
nicklas |
451 |
id="itemSubtype" |
5630 |
13 May 11 |
nicklas |
452 |
property="itemSubtype" |
5630 |
13 May 11 |
nicklas |
453 |
sortproperty="itemSubtype.name" |
5666 |
23 Jun 11 |
nicklas |
454 |
exportproperty="itemSubtype.name:string" |
1794 |
19 Jan 06 |
nicklas |
455 |
datatype="int" |
5643 |
26 May 11 |
nicklas |
456 |
enumeration="<%=Enumeration.fromItems(subtypesQuery.list(dc), "-none-")%>" |
1794 |
19 Jan 06 |
nicklas |
457 |
title="Type" |
1794 |
19 Jan 06 |
nicklas |
458 |
sortable="true" |
1794 |
19 Jan 06 |
nicklas |
459 |
filterable="true" |
1794 |
19 Jan 06 |
nicklas |
460 |
exportable="true" |
1794 |
19 Jan 06 |
nicklas |
461 |
/> |
1794 |
19 Jan 06 |
nicklas |
462 |
<tbl:columndef |
1794 |
19 Jan 06 |
nicklas |
463 |
id="mimeType" |
1794 |
19 Jan 06 |
nicklas |
464 |
property="mimeType" |
1794 |
19 Jan 06 |
nicklas |
465 |
datatype="string" |
1794 |
19 Jan 06 |
nicklas |
466 |
title="Mime type" |
1794 |
19 Jan 06 |
nicklas |
467 |
sortable="true" |
1794 |
19 Jan 06 |
nicklas |
468 |
filterable="true" |
1794 |
19 Jan 06 |
nicklas |
469 |
exportable="true" |
1794 |
19 Jan 06 |
nicklas |
470 |
/> |
4520 |
15 Sep 08 |
nicklas |
471 |
<tbl:columndef |
4520 |
15 Sep 08 |
nicklas |
472 |
id="characterSet" |
4520 |
15 Sep 08 |
nicklas |
473 |
property="characterSet" |
4520 |
15 Sep 08 |
nicklas |
474 |
datatype="string" |
4520 |
15 Sep 08 |
nicklas |
475 |
title="Character set" |
4520 |
15 Sep 08 |
nicklas |
476 |
sortable="true" |
4520 |
15 Sep 08 |
nicklas |
477 |
filterable="true" |
4520 |
15 Sep 08 |
nicklas |
478 |
exportable="true" |
4520 |
15 Sep 08 |
nicklas |
479 |
/> |
1794 |
19 Jan 06 |
nicklas |
480 |
<% |
1794 |
19 Jan 06 |
nicklas |
481 |
Enumeration<String, String> locations = new Enumeration<String, String>(); |
1794 |
19 Jan 06 |
nicklas |
482 |
for (Location l : Location.values()) |
1794 |
19 Jan 06 |
nicklas |
483 |
{ |
1794 |
19 Jan 06 |
nicklas |
484 |
locations.add(Integer.toString(l.getValue()), l.toString()); |
1794 |
19 Jan 06 |
nicklas |
485 |
} |
1794 |
19 Jan 06 |
nicklas |
486 |
%> |
1794 |
19 Jan 06 |
nicklas |
487 |
<tbl:columndef |
1794 |
19 Jan 06 |
nicklas |
488 |
id="location" |
1794 |
19 Jan 06 |
nicklas |
489 |
property="location" |
1794 |
19 Jan 06 |
nicklas |
490 |
datatype="int" |
1794 |
19 Jan 06 |
nicklas |
491 |
enumeration="<%=locations%>" |
1794 |
19 Jan 06 |
nicklas |
492 |
title="Location" |
1794 |
19 Jan 06 |
nicklas |
493 |
sortable="true" |
1794 |
19 Jan 06 |
nicklas |
494 |
filterable="true" |
1794 |
19 Jan 06 |
nicklas |
495 |
exportable="true" |
1794 |
19 Jan 06 |
nicklas |
496 |
/> |
1794 |
19 Jan 06 |
nicklas |
497 |
<tbl:columndef |
1794 |
19 Jan 06 |
nicklas |
498 |
id="md5" |
1794 |
19 Jan 06 |
nicklas |
499 |
property="md5" |
1794 |
19 Jan 06 |
nicklas |
500 |
datatype="string" |
1794 |
19 Jan 06 |
nicklas |
501 |
title="MD5" |
1794 |
19 Jan 06 |
nicklas |
502 |
sortable="true" |
1794 |
19 Jan 06 |
nicklas |
503 |
filterable="true" |
1794 |
19 Jan 06 |
nicklas |
504 |
exportable="true" |
1794 |
19 Jan 06 |
nicklas |
505 |
/> |
1794 |
19 Jan 06 |
nicklas |
506 |
<tbl:columndef |
1794 |
19 Jan 06 |
nicklas |
507 |
id="owner" |
1794 |
19 Jan 06 |
nicklas |
508 |
property="owner.name" |
1794 |
19 Jan 06 |
nicklas |
509 |
datatype="string" |
1794 |
19 Jan 06 |
nicklas |
510 |
title="Owner" |
1794 |
19 Jan 06 |
nicklas |
511 |
sortable="true" |
1794 |
19 Jan 06 |
nicklas |
512 |
filterable="true" |
1794 |
19 Jan 06 |
nicklas |
513 |
exportable="true" |
1794 |
19 Jan 06 |
nicklas |
514 |
/> |
1794 |
19 Jan 06 |
nicklas |
515 |
<tbl:columndef |
1794 |
19 Jan 06 |
nicklas |
516 |
id="description" |
1794 |
19 Jan 06 |
nicklas |
517 |
property="description" |
1794 |
19 Jan 06 |
nicklas |
518 |
datatype="string" |
1794 |
19 Jan 06 |
nicklas |
519 |
title="Description" |
1794 |
19 Jan 06 |
nicklas |
520 |
sortable="true" |
1794 |
19 Jan 06 |
nicklas |
521 |
filterable="true" |
1794 |
19 Jan 06 |
nicklas |
522 |
exportable="true" |
1794 |
19 Jan 06 |
nicklas |
523 |
/> |
1794 |
19 Jan 06 |
nicklas |
524 |
<tbl:columndef |
3466 |
08 Jun 07 |
nicklas |
525 |
id="lastUpdate" |
3466 |
08 Jun 07 |
nicklas |
526 |
property="lastUpdate" |
5424 |
23 Sep 10 |
nicklas |
527 |
datatype="timestamp" |
3466 |
08 Jun 07 |
nicklas |
528 |
title="Last update" |
3466 |
08 Jun 07 |
nicklas |
529 |
sortable="true" |
3466 |
08 Jun 07 |
nicklas |
530 |
filterable="true" |
3466 |
08 Jun 07 |
nicklas |
531 |
exportable="true" |
3466 |
08 Jun 07 |
nicklas |
532 |
formatter="<%=dateTimeFormatter%>" |
3466 |
08 Jun 07 |
nicklas |
533 |
/> |
3466 |
08 Jun 07 |
nicklas |
534 |
<tbl:columndef |
1794 |
19 Jan 06 |
nicklas |
535 |
id="actions" |
1794 |
19 Jan 06 |
nicklas |
536 |
title="Actions" |
1794 |
19 Jan 06 |
nicklas |
537 |
sortable="false" |
1794 |
19 Jan 06 |
nicklas |
538 |
filterable="false" |
1794 |
19 Jan 06 |
nicklas |
539 |
exportable="false" |
1794 |
19 Jan 06 |
nicklas |
540 |
/> |
2403 |
21 Jun 06 |
martin |
541 |
<tbl:columndef |
2403 |
21 Jun 06 |
martin |
542 |
id="permissions" |
2403 |
21 Jun 06 |
martin |
543 |
title="Permissions" |
2403 |
21 Jun 06 |
martin |
544 |
/> |
5165 |
28 Oct 09 |
nicklas |
545 |
<tbl:columndef |
3552 |
06 Jul 07 |
martin |
546 |
id="sharedTo" |
3552 |
06 Jul 07 |
martin |
547 |
title="Shared to" |
5165 |
28 Oct 09 |
nicklas |
548 |
filterable="true" |
5165 |
28 Oct 09 |
nicklas |
549 |
filterproperty="!sharedTo.name" |
5165 |
28 Oct 09 |
nicklas |
550 |
datatype="string" |
3552 |
06 Jul 07 |
martin |
551 |
/> |
7857 |
20 Oct 20 |
nicklas |
552 |
<% |
7857 |
20 Oct 20 |
nicklas |
553 |
for (AnnotationLoaderUtil loader : annotationLoaders) |
7857 |
20 Oct 20 |
nicklas |
554 |
{ |
7857 |
20 Oct 20 |
nicklas |
555 |
AnnotationType at = loader.getAnnotationType(); |
7857 |
20 Oct 20 |
nicklas |
556 |
Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); |
7857 |
20 Oct 20 |
nicklas |
557 |
Enumeration<String, String> annotationEnum = null; |
7857 |
20 Oct 20 |
nicklas |
558 |
if (at.isEnumeration()) |
7857 |
20 Oct 20 |
nicklas |
559 |
{ |
7857 |
20 Oct 20 |
nicklas |
560 |
annotationEnum = new Enumeration<String, String>(); |
7857 |
20 Oct 20 |
nicklas |
561 |
if (!at.getDisplayAsList()) annotationEnum.add("", "-none-"); |
7857 |
20 Oct 20 |
nicklas |
562 |
List<?> values = at.getValues(); |
7857 |
20 Oct 20 |
nicklas |
563 |
for (Object value : values) |
7857 |
20 Oct 20 |
nicklas |
564 |
{ |
7857 |
20 Oct 20 |
nicklas |
565 |
String encoded = HTML.encodeTags(value.toString()); |
7857 |
20 Oct 20 |
nicklas |
566 |
annotationEnum.add(encoded, encoded); |
7857 |
20 Oct 20 |
nicklas |
567 |
} |
7857 |
20 Oct 20 |
nicklas |
568 |
} |
7857 |
20 Oct 20 |
nicklas |
569 |
%> |
7857 |
20 Oct 20 |
nicklas |
570 |
<tbl:columndef |
7857 |
20 Oct 20 |
nicklas |
571 |
id="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+at.getId()%>" |
7857 |
20 Oct 20 |
nicklas |
572 |
title="<%=HTML.encodeTags(at.getName())+(loader.isSearchingInheritedAnnotations() ? " [I]" : " [A]")%>" |
7857 |
20 Oct 20 |
nicklas |
573 |
property="<%=(loader.isSearchingInheritedAnnotations() ? "##" : "#")+at.getId()%>" |
7857 |
20 Oct 20 |
nicklas |
574 |
annotation="true" |
7857 |
20 Oct 20 |
nicklas |
575 |
datatype="<%=at.getValueType().getStringValue()%>" |
7857 |
20 Oct 20 |
nicklas |
576 |
enumeration="<%=annotationEnum%>" |
7857 |
20 Oct 20 |
nicklas |
577 |
smartenum="<%=at.getDisplayAsList() %>" |
7857 |
20 Oct 20 |
nicklas |
578 |
sortable="<%=at.getMultiplicity() == 1 && !loader.isSearchingInheritedAnnotations()%>" |
7857 |
20 Oct 20 |
nicklas |
579 |
filterable="true" |
7857 |
20 Oct 20 |
nicklas |
580 |
exportable="true" |
7857 |
20 Oct 20 |
nicklas |
581 |
formatter="<%=formatter%>" |
7857 |
20 Oct 20 |
nicklas |
582 |
unit="<%=at.getDefaultUnit()%>" |
7857 |
20 Oct 20 |
nicklas |
583 |
/> |
7857 |
20 Oct 20 |
nicklas |
584 |
<% |
7857 |
20 Oct 20 |
nicklas |
585 |
} |
7857 |
20 Oct 20 |
nicklas |
586 |
%> |
6040 |
30 Mar 12 |
nicklas |
587 |
<tbl:columndef |
6040 |
30 Mar 12 |
nicklas |
588 |
id="xt-columns" |
6040 |
30 Mar 12 |
nicklas |
589 |
extensions="<%=columnsInvoker%>" |
6040 |
30 Mar 12 |
nicklas |
590 |
jspcontext="<%=jspContext%>" |
6040 |
30 Mar 12 |
nicklas |
591 |
/> |
6604 |
18 Nov 14 |
nicklas |
592 |
<div class="panelgroup bg-filled-50 bottomborder"> |
6610 |
20 Nov 14 |
nicklas |
593 |
<tbl:toolbar subclass="bottomborder"> |
5952 |
10 Feb 12 |
nicklas |
594 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
595 |
id="btnNewDirectory" |
6308 |
20 Aug 13 |
nicklas |
596 |
data-item-type="DIRECTORY" |
6308 |
20 Aug 13 |
nicklas |
597 |
data-extra-url="<%="&parent_id="+directoryId%>" |
5952 |
10 Feb 12 |
nicklas |
598 |
disabled="<%=!createDirectoryPermission%>" |
5952 |
10 Feb 12 |
nicklas |
599 |
image="directory_new.png" |
5952 |
10 Feb 12 |
nicklas |
600 |
title="New directory…" |
5952 |
10 Feb 12 |
nicklas |
601 |
visible="<%=!isSearch%>" |
5952 |
10 Feb 12 |
nicklas |
602 |
tooltip="<%=createDirectoryPermission ? "Create a new directory" : "You do not have permission to create directories"%>" |
5952 |
10 Feb 12 |
nicklas |
603 |
/> |
5952 |
10 Feb 12 |
nicklas |
604 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
605 |
id="btnUpload" |
5952 |
10 Feb 12 |
nicklas |
606 |
disabled="<%=!createFilePermission%>" |
5952 |
10 Feb 12 |
nicklas |
607 |
image="upload.png" |
5952 |
10 Feb 12 |
nicklas |
608 |
title="Upload file…" |
5952 |
10 Feb 12 |
nicklas |
609 |
visible="<%=!isSearch%>" |
5952 |
10 Feb 12 |
nicklas |
610 |
tooltip="<%=createFilePermission ? "Upload a new file" : "You do not have permission to upload files"%>" |
5952 |
10 Feb 12 |
nicklas |
611 |
/> |
5952 |
10 Feb 12 |
nicklas |
612 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
613 |
id="btnNewURL" |
5952 |
10 Feb 12 |
nicklas |
614 |
disabled="<%=!createFilePermission%>" |
5952 |
10 Feb 12 |
nicklas |
615 |
image="url_new.png" |
5952 |
10 Feb 12 |
nicklas |
616 |
title="New URL…" |
5952 |
10 Feb 12 |
nicklas |
617 |
visible="<%=!isSearch%>" |
5952 |
10 Feb 12 |
nicklas |
618 |
tooltip="<%=createFilePermission ? "Create new URL reference" : "You do not have permission to create files"%>" |
5952 |
10 Feb 12 |
nicklas |
619 |
/> |
5952 |
10 Feb 12 |
nicklas |
620 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
621 |
id="btnEditMultipleFiles" |
5952 |
10 Feb 12 |
nicklas |
622 |
image="edit.png" |
5952 |
10 Feb 12 |
nicklas |
623 |
title="Edit…" |
5952 |
10 Feb 12 |
nicklas |
624 |
tooltip="Edit the selected files" |
5952 |
10 Feb 12 |
nicklas |
625 |
/> |
5952 |
10 Feb 12 |
nicklas |
626 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
627 |
id="btnMoveFiles" |
6308 |
20 Aug 13 |
nicklas |
628 |
subclass="auto-init" |
6308 |
20 Aug 13 |
nicklas |
629 |
data-auto-init="menu-anchor" |
6308 |
20 Aug 13 |
nicklas |
630 |
data-menu-id="moveFiles" |
5952 |
10 Feb 12 |
nicklas |
631 |
image="move.png" |
5952 |
10 Feb 12 |
nicklas |
632 |
title="Move…" |
5952 |
10 Feb 12 |
nicklas |
633 |
tooltip="Move the selected items" |
5952 |
10 Feb 12 |
nicklas |
634 |
visible="<%=mode.hasToolbar()%>" |
5952 |
10 Feb 12 |
nicklas |
635 |
/> |
5952 |
10 Feb 12 |
nicklas |
636 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
637 |
id="btnDeleteItems" |
5952 |
10 Feb 12 |
nicklas |
638 |
image="delete.png" |
5952 |
10 Feb 12 |
nicklas |
639 |
title="Delete" |
5952 |
10 Feb 12 |
nicklas |
640 |
tooltip="Delete the selected items" |
5952 |
10 Feb 12 |
nicklas |
641 |
visible="<%=mode.hasToolbar()%>" |
5952 |
10 Feb 12 |
nicklas |
642 |
/> |
5952 |
10 Feb 12 |
nicklas |
643 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
644 |
id="btnRestoreItems" |
5952 |
10 Feb 12 |
nicklas |
645 |
image="restore.png" |
5952 |
10 Feb 12 |
nicklas |
646 |
title="Restore" |
5952 |
10 Feb 12 |
nicklas |
647 |
tooltip="Restore the selected (deleted) items" |
5952 |
10 Feb 12 |
nicklas |
648 |
visible="<%=mode.hasToolbar()%>" |
5952 |
10 Feb 12 |
nicklas |
649 |
/> |
5952 |
10 Feb 12 |
nicklas |
650 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
651 |
id="btnShareItems" |
5952 |
10 Feb 12 |
nicklas |
652 |
image="share.png" |
5952 |
10 Feb 12 |
nicklas |
653 |
title="Share…" |
5952 |
10 Feb 12 |
nicklas |
654 |
tooltip="Share the selected items" |
5952 |
10 Feb 12 |
nicklas |
655 |
visible="<%=mode.hasToolbar()%>" |
5952 |
10 Feb 12 |
nicklas |
656 |
/> |
5952 |
10 Feb 12 |
nicklas |
657 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
658 |
id="btnSetOwner" |
5952 |
10 Feb 12 |
nicklas |
659 |
image="take_ownership.png" |
5952 |
10 Feb 12 |
nicklas |
660 |
title="Set owner…" |
5952 |
10 Feb 12 |
nicklas |
661 |
tooltip="Change owner of the selected items" |
5952 |
10 Feb 12 |
nicklas |
662 |
/> |
5952 |
10 Feb 12 |
nicklas |
663 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
664 |
id="btnColumns" |
5952 |
10 Feb 12 |
nicklas |
665 |
image="columns.png" |
5952 |
10 Feb 12 |
nicklas |
666 |
title="Columns…" |
5952 |
10 Feb 12 |
nicklas |
667 |
tooltip="Show, hide and re-order columns" |
5952 |
10 Feb 12 |
nicklas |
668 |
visible="<%=mode.hasToolbar()%>" |
5952 |
10 Feb 12 |
nicklas |
669 |
/> |
5952 |
10 Feb 12 |
nicklas |
670 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
671 |
id="btnImport" |
6308 |
20 Aug 13 |
nicklas |
672 |
data-plugin-type="IMPORT" |
5952 |
10 Feb 12 |
nicklas |
673 |
image="import.png" |
5952 |
10 Feb 12 |
nicklas |
674 |
title="Import…" |
5952 |
10 Feb 12 |
nicklas |
675 |
tooltip="Import data" |
6587 |
03 Nov 14 |
nicklas |
676 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5952 |
10 Feb 12 |
nicklas |
677 |
/> |
5952 |
10 Feb 12 |
nicklas |
678 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
679 |
id="btnExport" |
6308 |
20 Aug 13 |
nicklas |
680 |
data-plugin-type="EXPORT" |
5952 |
10 Feb 12 |
nicklas |
681 |
image="export.png" |
5952 |
10 Feb 12 |
nicklas |
682 |
title="Export…" |
5952 |
10 Feb 12 |
nicklas |
683 |
tooltip="Export data" |
6587 |
03 Nov 14 |
nicklas |
684 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5952 |
10 Feb 12 |
nicklas |
685 |
/> |
5952 |
10 Feb 12 |
nicklas |
686 |
<tbl:button |
6308 |
20 Aug 13 |
nicklas |
687 |
id="btnRunPlugin" |
6308 |
20 Aug 13 |
nicklas |
688 |
data-plugin-type="OTHER" |
5952 |
10 Feb 12 |
nicklas |
689 |
image="runplugin.png" |
5952 |
10 Feb 12 |
nicklas |
690 |
title="Run plugin…" |
5952 |
10 Feb 12 |
nicklas |
691 |
tooltip="Run a plugin" |
6587 |
03 Nov 14 |
nicklas |
692 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5952 |
10 Feb 12 |
nicklas |
693 |
/> |
5952 |
10 Feb 12 |
nicklas |
694 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
695 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5952 |
10 Feb 12 |
nicklas |
696 |
</tbl:toolbar> |
5952 |
10 Feb 12 |
nicklas |
697 |
<tbl:panel visible="<%=!isSearch%>"> |
6182 |
23 Oct 12 |
nicklas |
698 |
<tbl:presetselector /> |
6610 |
20 Nov 14 |
nicklas |
699 |
<div style="padding-top: 4px;"><%=currentPath%></div> |
5952 |
10 Feb 12 |
nicklas |
700 |
</tbl:panel> |
5952 |
10 Feb 12 |
nicklas |
701 |
<tbl:panel visible="<%=isSearch%>"> |
6182 |
23 Oct 12 |
nicklas |
702 |
<tbl:presetselector /> |
5952 |
10 Feb 12 |
nicklas |
703 |
<tbl:navigator |
5952 |
10 Feb 12 |
nicklas |
704 |
page="<%=cc.getPage()%>" |
5952 |
10 Feb 12 |
nicklas |
705 |
rowsperpage="<%=cc.getRowsPerPage()%>" |
5952 |
10 Feb 12 |
nicklas |
706 |
totalrows="<%=numFiles + numDirectories%>" |
5952 |
10 Feb 12 |
nicklas |
707 |
/> |
5952 |
10 Feb 12 |
nicklas |
708 |
</tbl:panel> |
5952 |
10 Feb 12 |
nicklas |
709 |
</div> |
1794 |
19 Jan 06 |
nicklas |
710 |
<tbl:data> |
5948 |
08 Feb 12 |
nicklas |
711 |
<tbl:headers> |
5948 |
08 Feb 12 |
nicklas |
712 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
713 |
<tbl:header clazz="row-index bg-filled-100" /> |
5948 |
08 Feb 12 |
nicklas |
714 |
<tbl:columnheaders /> |
5948 |
08 Feb 12 |
nicklas |
715 |
</tbl:headerrow> |
6703 |
02 Feb 15 |
nicklas |
716 |
<% |
6703 |
02 Feb 15 |
nicklas |
717 |
int numFilters = cc.getNumPropertyFilters(); |
6703 |
02 Feb 15 |
nicklas |
718 |
int numRows = cc.getFilterRows(); |
6703 |
02 Feb 15 |
nicklas |
719 |
for (int filterNo = 0; filterNo < numRows; filterNo++) |
6703 |
02 Feb 15 |
nicklas |
720 |
{ |
6703 |
02 Feb 15 |
nicklas |
721 |
boolean lastRow = filterNo == numRows-1; |
6703 |
02 Feb 15 |
nicklas |
722 |
%> |
6703 |
02 Feb 15 |
nicklas |
723 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
724 |
<tbl:header subclass="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
725 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
726 |
<div class="index"></div> |
7943 |
04 May 21 |
nicklas |
727 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
728 |
<base:icon |
7943 |
04 May 21 |
nicklas |
729 |
subclass="link table-check" |
7943 |
04 May 21 |
nicklas |
730 |
image="check_uncheck.png" |
7943 |
04 May 21 |
nicklas |
731 |
tooltip="Toggle all (use CTRL, ALT or SHIFT to check/uncheck)" |
7943 |
04 May 21 |
nicklas |
732 |
visible="<%=lastRow && mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
733 |
/> |
7943 |
04 May 21 |
nicklas |
734 |
</div> |
7943 |
04 May 21 |
nicklas |
735 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
736 |
<base:icon |
7943 |
04 May 21 |
nicklas |
737 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
738 |
image="add.png" |
7943 |
04 May 21 |
nicklas |
739 |
tooltip="Add extra filter row" |
7943 |
04 May 21 |
nicklas |
740 |
visible="<%=lastRow%>" |
7943 |
04 May 21 |
nicklas |
741 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
742 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
743 |
image="remove.png" |
7943 |
04 May 21 |
nicklas |
744 |
tooltip="Remove this filter row" |
7943 |
04 May 21 |
nicklas |
745 |
visible="<%=numRows > 1 || numFilters > 0 %>" |
7943 |
04 May 21 |
nicklas |
746 |
data-remove-row="<%=filterNo%>" |
7943 |
04 May 21 |
nicklas |
747 |
/> |
7943 |
04 May 21 |
nicklas |
748 |
</div> |
7943 |
04 May 21 |
nicklas |
749 |
</div> |
6703 |
02 Feb 15 |
nicklas |
750 |
</tbl:header> |
6703 |
02 Feb 15 |
nicklas |
751 |
<tbl:propertyfilter row="<%=filterNo%>" /> |
6703 |
02 Feb 15 |
nicklas |
752 |
</tbl:headerrow> |
6703 |
02 Feb 15 |
nicklas |
753 |
<% |
6703 |
02 Feb 15 |
nicklas |
754 |
} |
6703 |
02 Feb 15 |
nicklas |
755 |
%> |
7913 |
22 Feb 21 |
nicklas |
756 |
<tbl:columnsubtitles /> |
5948 |
08 Feb 12 |
nicklas |
757 |
</tbl:headers> |
5948 |
08 Feb 12 |
nicklas |
758 |
<tbl:rows> |
1794 |
19 Jan 06 |
nicklas |
759 |
<% |
5952 |
10 Feb 12 |
nicklas |
760 |
if (cc.getMessage() != null) |
5952 |
10 Feb 12 |
nicklas |
761 |
{ |
5952 |
10 Feb 12 |
nicklas |
762 |
%> |
6604 |
18 Nov 14 |
nicklas |
763 |
<tbl:panel subclass="bg-filled-50"> |
5952 |
10 Feb 12 |
nicklas |
764 |
<div class="messagecontainer error"><%=cc.getMessage()%></div> |
5952 |
10 Feb 12 |
nicklas |
765 |
</tbl:panel> |
5952 |
10 Feb 12 |
nicklas |
766 |
<% |
5952 |
10 Feb 12 |
nicklas |
767 |
cc.setMessage(null); |
5952 |
10 Feb 12 |
nicklas |
768 |
} |
1794 |
19 Jan 06 |
nicklas |
769 |
int index = 0; |
1803 |
23 Jan 06 |
nicklas |
770 |
int selectedItemId = cc.getId(); |
1798 |
20 Jan 06 |
nicklas |
771 |
|
1798 |
20 Jan 06 |
nicklas |
772 |
ItemContext dirContext = sc.getCurrentContext(Item.DIRECTORY); |
2029 |
20 Feb 06 |
nicklas |
773 |
if (directories != null) |
1794 |
19 Jan 06 |
nicklas |
774 |
{ |
2029 |
20 Feb 06 |
nicklas |
775 |
while (directories.hasNext()) |
2029 |
20 Feb 06 |
nicklas |
776 |
{ |
2029 |
20 Feb 06 |
nicklas |
777 |
index++; |
2029 |
20 Feb 06 |
nicklas |
778 |
numListed++; |
2029 |
20 Feb 06 |
nicklas |
779 |
Directory item = directories.next(); |
2029 |
20 Feb 06 |
nicklas |
780 |
int itemId = item.getId(); |
4003 |
26 Nov 07 |
nicklas |
781 |
boolean deletePermission = item.hasPermission(Permission.DELETE); |
2437 |
28 Jun 06 |
nicklas |
782 |
boolean sharePermission = item.hasPermission(Permission.SET_PERMISSION); |
7983 |
22 Jun 21 |
nicklas |
783 |
boolean uploadPermission = sc.hasPermission(Permission.CREATE, Item.FILE) && item.hasPermission(Permission.USE); |
2029 |
20 Feb 06 |
nicklas |
784 |
String name = HTML.encodeTags(item.getName()); |
5158 |
23 Oct 09 |
nicklas |
785 |
String path = item.getPath().toString(); |
5158 |
23 Oct 09 |
nicklas |
786 |
String tagPath = HTML.encodeTags(path); |
5946 |
03 Feb 12 |
nicklas |
787 |
String icon = item.getAutoCompress() ? "directory_compressed.png" : "directory.png"; |
5179 |
04 Nov 09 |
nicklas |
788 |
Directory parent = null; |
5179 |
04 Nov 09 |
nicklas |
789 |
try |
5179 |
04 Nov 09 |
nicklas |
790 |
{ |
5179 |
04 Nov 09 |
nicklas |
791 |
parent = item.getParent(); |
5179 |
04 Nov 09 |
nicklas |
792 |
} |
5179 |
04 Nov 09 |
nicklas |
793 |
catch (Throwable t) |
5179 |
04 Nov 09 |
nicklas |
794 |
{} |
6308 |
20 Aug 13 |
nicklas |
795 |
String tooltip = mode.isSelectionMode() ? |
6308 |
20 Aug 13 |
nicklas |
796 |
"Select this item" : "Edit this item"; |
2029 |
20 Feb 06 |
nicklas |
797 |
%> |
7983 |
22 Jun 21 |
nicklas |
798 |
<tbl:row subclass="auto-init" data-auto-init="directory-row" data-directory-id="<%=itemId%>" data-directory-path="<%=tagPath%>" data-upload-permission="<%=uploadPermission?1:0%>"> |
7943 |
04 May 21 |
nicklas |
799 |
<tbl:header clazz="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
800 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
801 |
<div class="index <%=index>999?"index-smaller":""%>"><base:icon |
7943 |
04 May 21 |
nicklas |
802 |
subclass="link auto-init" |
7943 |
04 May 21 |
nicklas |
803 |
data-auto-init="open-directory" |
7943 |
04 May 21 |
nicklas |
804 |
data-directory-id="<%=itemId %>" |
7943 |
04 May 21 |
nicklas |
805 |
image="<%=icon%>" |
7943 |
04 May 21 |
nicklas |
806 |
tooltip="<%=tagPath%>" |
7943 |
04 May 21 |
nicklas |
807 |
/></div> |
7943 |
04 May 21 |
nicklas |
808 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
809 |
<base:input |
7943 |
04 May 21 |
nicklas |
810 |
type="checkbox" |
7943 |
04 May 21 |
nicklas |
811 |
name="<%="D:"+itemId%>" |
7943 |
04 May 21 |
nicklas |
812 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
813 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
814 |
checked="<%=dirContext.getSelected().contains(itemId)%>" |
7943 |
04 May 21 |
nicklas |
815 |
visible="<%=mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
816 |
/> |
7943 |
04 May 21 |
nicklas |
817 |
</div> |
7943 |
04 May 21 |
nicklas |
818 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
819 |
<base:icon |
7943 |
04 May 21 |
nicklas |
820 |
image="deleted.png" |
7943 |
04 May 21 |
nicklas |
821 |
id="<%="delete."+itemId %>" |
7943 |
04 May 21 |
nicklas |
822 |
subclass="<%=deletePermission ? "table-delete-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
823 |
data-item-type="DIRECTORY" |
7943 |
04 May 21 |
nicklas |
824 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
825 |
data-notify="reloadOnNotify" |
7943 |
04 May 21 |
nicklas |
826 |
tooltip="This item has been scheduled for deletion" |
7943 |
04 May 21 |
nicklas |
827 |
visible="<%=item.isRemoved()%>" |
7943 |
04 May 21 |
nicklas |
828 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
829 |
image="shared.png" |
7943 |
04 May 21 |
nicklas |
830 |
id="<%="share."+itemId %>" |
7943 |
04 May 21 |
nicklas |
831 |
subclass="<%=sharePermission ? "table-share-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
832 |
data-item-type="DIRECTORY" |
7943 |
04 May 21 |
nicklas |
833 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
834 |
tooltip="This item is shared to other users, groups and/or projects" |
7943 |
04 May 21 |
nicklas |
835 |
visible="<%=item.isShared()%>" |
7943 |
04 May 21 |
nicklas |
836 |
/> |
7943 |
04 May 21 |
nicklas |
837 |
</div> |
7943 |
04 May 21 |
nicklas |
838 |
</div> |
7943 |
04 May 21 |
nicklas |
839 |
</tbl:header> |
6308 |
20 Aug 13 |
nicklas |
840 |
<tbl:cell column="name"><div |
6308 |
20 Aug 13 |
nicklas |
841 |
class="link auto-init" |
6308 |
20 Aug 13 |
nicklas |
842 |
data-auto-init="directory-item" |
6308 |
20 Aug 13 |
nicklas |
843 |
data-item-type="DIRECTORY" |
6308 |
20 Aug 13 |
nicklas |
844 |
data-item-id="<%=itemId%>" |
6308 |
20 Aug 13 |
nicklas |
845 |
data-force-edit="1" |
6308 |
20 Aug 13 |
nicklas |
846 |
data-path="<%=tagPath %>" |
6308 |
20 Aug 13 |
nicklas |
847 |
title="<%=tooltip%>"><%=name%></div></tbl:cell> |
5179 |
04 Nov 09 |
nicklas |
848 |
<tbl:cell column="path" style="white-space: nowrap;"> |
5179 |
04 Nov 09 |
nicklas |
849 |
<% |
5179 |
04 Nov 09 |
nicklas |
850 |
if (parent != null && mode.hasPropertyLink()) |
5179 |
04 Nov 09 |
nicklas |
851 |
{ |
5179 |
04 Nov 09 |
nicklas |
852 |
%> |
6308 |
20 Aug 13 |
nicklas |
853 |
<div class="link auto-init" |
6308 |
20 Aug 13 |
nicklas |
854 |
data-auto-init="open-directory" |
6308 |
20 Aug 13 |
nicklas |
855 |
data-directory-id="<%=parent.getId() %>" |
6308 |
20 Aug 13 |
nicklas |
856 |
title="Open this directory"><%=tagPath.substring(0, tagPath.length() - name.length())%></div> |
5179 |
04 Nov 09 |
nicklas |
857 |
<% |
5179 |
04 Nov 09 |
nicklas |
858 |
} |
5179 |
04 Nov 09 |
nicklas |
859 |
else |
5179 |
04 Nov 09 |
nicklas |
860 |
{ |
5179 |
04 Nov 09 |
nicklas |
861 |
%> |
5179 |
04 Nov 09 |
nicklas |
862 |
<%=tagPath.substring(0, tagPath.length() - name.length())%> |
5179 |
04 Nov 09 |
nicklas |
863 |
<% |
5179 |
04 Nov 09 |
nicklas |
864 |
} |
5179 |
04 Nov 09 |
nicklas |
865 |
%> |
5179 |
04 Nov 09 |
nicklas |
866 |
</tbl:cell> |
4332 |
12 Jun 08 |
martin |
867 |
<tbl:cell column="id"><%=item.getId()%></tbl:cell> |
5326 |
29 Apr 10 |
nicklas |
868 |
<tbl:cell column="url"> </tbl:cell> |
5361 |
14 Jun 10 |
nicklas |
869 |
<tbl:cell column="fileServer"> </tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
870 |
<tbl:cell column="size"> </tbl:cell> |
3719 |
12 Sep 07 |
nicklas |
871 |
<tbl:cell column="compressedSize"> </tbl:cell> |
3719 |
12 Sep 07 |
nicklas |
872 |
<tbl:cell column="compressed"><%=item.getAutoCompress() ? "yes" : "no"%></tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
873 |
<tbl:cell column="fileType"> </tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
874 |
<tbl:cell column="mimeType"> </tbl:cell> |
4520 |
15 Sep 08 |
nicklas |
875 |
<tbl:cell column="characterSet"> </tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
876 |
<tbl:cell column="md5"> </tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
877 |
<tbl:cell column="location"> </tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
878 |
<tbl:cell column="action"> </tbl:cell> |
2354 |
07 Jun 06 |
martin |
879 |
<tbl:cell column="owner" |
2354 |
07 Jun 06 |
martin |
880 |
><base:propertyvalue |
2354 |
07 Jun 06 |
martin |
881 |
item="<%=item%>" |
2354 |
07 Jun 06 |
martin |
882 |
property="owner" |
2354 |
07 Jun 06 |
martin |
883 |
enableEditLink="<%=mode.hasEditLink()%>" |
2354 |
07 Jun 06 |
martin |
884 |
enablePropertyLink="<%=mode.hasPropertyLink()%>" |
2354 |
07 Jun 06 |
martin |
885 |
/></tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
886 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
3466 |
08 Jun 07 |
nicklas |
887 |
<tbl:cell column="lastUpdate"> </tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
888 |
<tbl:cell column="actions"> </tbl:cell> |
2403 |
21 Jun 06 |
martin |
889 |
<tbl:cell column="permissions"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell> |
3552 |
06 Jul 07 |
martin |
890 |
<tbl:cell column="sharedTo"> |
3552 |
06 Jul 07 |
martin |
891 |
<% |
3552 |
06 Jul 07 |
martin |
892 |
Iterator<Nameable> sharees = ShareableUtil.getSharedTo(dc, item).iterator(); |
3552 |
06 Jul 07 |
martin |
893 |
while(sharees.hasNext()) |
3552 |
06 Jul 07 |
martin |
894 |
{ |
3552 |
06 Jul 07 |
martin |
895 |
out.write(Base.getLinkedName(ID, sharees.next(), false, mode.hasEditLink())); |
3552 |
06 Jul 07 |
martin |
896 |
out.write(sharees.hasNext() ? ", " : ""); |
3552 |
06 Jul 07 |
martin |
897 |
} |
3552 |
06 Jul 07 |
martin |
898 |
%> |
3552 |
06 Jul 07 |
martin |
899 |
</tbl:cell> |
6040 |
30 Mar 12 |
nicklas |
900 |
<tbl:xt-cells dc="<%=dc%>" item="<%=item%>"> |
6040 |
30 Mar 12 |
nicklas |
901 |
<tbl:cell column="xt-columns" /> |
6040 |
30 Mar 12 |
nicklas |
902 |
</tbl:xt-cells> |
2029 |
20 Feb 06 |
nicklas |
903 |
</tbl:row> |
2029 |
20 Feb 06 |
nicklas |
904 |
<% |
2029 |
20 Feb 06 |
nicklas |
905 |
} |
1794 |
19 Jan 06 |
nicklas |
906 |
} |
2029 |
20 Feb 06 |
nicklas |
907 |
if (files != null) |
2503 |
09 Aug 06 |
martin |
908 |
{ |
2029 |
20 Feb 06 |
nicklas |
909 |
while (files.hasNext()) |
2029 |
20 Feb 06 |
nicklas |
910 |
{ |
2029 |
20 Feb 06 |
nicklas |
911 |
File item = files.next(); |
7760 |
27 Nov 19 |
nicklas |
912 |
fileContext.setCurrentFile(item); |
2029 |
20 Feb 06 |
nicklas |
913 |
int itemId = item.getId(); |
5326 |
29 Apr 10 |
nicklas |
914 |
Location location = item.getLocation(); |
4003 |
26 Nov 07 |
nicklas |
915 |
boolean deletePermission = item.hasPermission(Permission.DELETE); |
2437 |
28 Jun 06 |
nicklas |
916 |
boolean sharePermission = item.hasPermission(Permission.SET_PERMISSION); |
2503 |
09 Aug 06 |
martin |
917 |
boolean writePermission = item.hasPermission(Permission.WRITE); |
2503 |
09 Aug 06 |
martin |
918 |
String tooltip = mode.isSelectionMode() ? |
2503 |
09 Aug 06 |
martin |
919 |
"Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : ""); |
2029 |
20 Feb 06 |
nicklas |
920 |
String name = HTML.encodeTags(item.getName()); |
2041 |
22 Feb 06 |
nicklas |
921 |
String path = item.getPath().toString(); |
2041 |
22 Feb 06 |
nicklas |
922 |
String tagPath = HTML.encodeTags(path); |
5946 |
03 Feb 12 |
nicklas |
923 |
String icon = "file.png"; |
5326 |
29 Apr 10 |
nicklas |
924 |
if (location == Location.EXTERNAL) |
5326 |
29 Apr 10 |
nicklas |
925 |
{ |
5326 |
29 Apr 10 |
nicklas |
926 |
icon = "url.png"; |
5326 |
29 Apr 10 |
nicklas |
927 |
} |
5326 |
29 Apr 10 |
nicklas |
928 |
else if (item.isCompressed()) |
5326 |
29 Apr 10 |
nicklas |
929 |
{ |
5946 |
03 Feb 12 |
nicklas |
930 |
icon = "file_compressed.png"; |
5326 |
29 Apr 10 |
nicklas |
931 |
} |
6268 |
11 Apr 13 |
nicklas |
932 |
String fileSize = Values.formatBytes(item.getSize(), 2); |
2029 |
20 Feb 06 |
nicklas |
933 |
index++; |
2029 |
20 Feb 06 |
nicklas |
934 |
numListed++; |
5179 |
04 Nov 09 |
nicklas |
935 |
Directory parent = null; |
5179 |
04 Nov 09 |
nicklas |
936 |
try |
5179 |
04 Nov 09 |
nicklas |
937 |
{ |
5179 |
04 Nov 09 |
nicklas |
938 |
parent = item.getDirectory(); |
5179 |
04 Nov 09 |
nicklas |
939 |
} |
5179 |
04 Nov 09 |
nicklas |
940 |
catch (Throwable t) |
5179 |
04 Nov 09 |
nicklas |
941 |
{} |
2029 |
20 Feb 06 |
nicklas |
942 |
%> |
2029 |
20 Feb 06 |
nicklas |
943 |
<tbl:row> |
7943 |
04 May 21 |
nicklas |
944 |
<tbl:header clazz="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
945 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
946 |
<div class="index <%=index>999?"index-smaller":""%>"><base:icon |
7943 |
04 May 21 |
nicklas |
947 |
image="<%=icon%>" |
7943 |
04 May 21 |
nicklas |
948 |
tooltip="<%=tagPath%>" |
7943 |
04 May 21 |
nicklas |
949 |
/></div> |
7943 |
04 May 21 |
nicklas |
950 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
951 |
<base:input |
7943 |
04 May 21 |
nicklas |
952 |
subclass="auto-init" |
7943 |
04 May 21 |
nicklas |
953 |
data-auto-init="file-check" |
7943 |
04 May 21 |
nicklas |
954 |
type="checkbox" |
7943 |
04 May 21 |
nicklas |
955 |
name="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
956 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
957 |
title="<%=tagPath%>" |
7943 |
04 May 21 |
nicklas |
958 |
checked="<%=cc.getSelected().contains(itemId) || selectedItemId == itemId%>" |
7943 |
04 May 21 |
nicklas |
959 |
visible="<%=mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
960 |
/> |
7943 |
04 May 21 |
nicklas |
961 |
<base:input |
7943 |
04 May 21 |
nicklas |
962 |
subclass="auto-init" |
7943 |
04 May 21 |
nicklas |
963 |
data-auto-init="file-check" |
7943 |
04 May 21 |
nicklas |
964 |
type="radio" |
7943 |
04 May 21 |
nicklas |
965 |
name="item_id" |
7943 |
04 May 21 |
nicklas |
966 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
967 |
title="<%=tagPath%>" |
7943 |
04 May 21 |
nicklas |
968 |
checked="<%=selectedItemId == itemId%>" |
7943 |
04 May 21 |
nicklas |
969 |
visible="<%=mode.hasRadio()%>" |
7943 |
04 May 21 |
nicklas |
970 |
/> |
7943 |
04 May 21 |
nicklas |
971 |
</div> |
7943 |
04 May 21 |
nicklas |
972 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
973 |
<base:icon |
7943 |
04 May 21 |
nicklas |
974 |
image="deleted.png" |
7943 |
04 May 21 |
nicklas |
975 |
id="<%="delete."+itemId %>" |
7943 |
04 May 21 |
nicklas |
976 |
subclass="<%=deletePermission ? "table-delete-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
977 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
978 |
data-notify="reloadOnNotify" |
7943 |
04 May 21 |
nicklas |
979 |
tooltip="This item has been scheduled for deletion" |
7943 |
04 May 21 |
nicklas |
980 |
visible="<%=item.isRemoved()%>" |
7943 |
04 May 21 |
nicklas |
981 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
982 |
image="shared.png" |
7943 |
04 May 21 |
nicklas |
983 |
id="<%="share."+itemId %>" |
7943 |
04 May 21 |
nicklas |
984 |
subclass="<%=sharePermission ? "table-share-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
985 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
986 |
tooltip="This item is shared to other users, groups and/or projects" |
7943 |
04 May 21 |
nicklas |
987 |
visible="<%=item.isShared()%>" |
7943 |
04 May 21 |
nicklas |
988 |
/> |
7943 |
04 May 21 |
nicklas |
989 |
</div> |
7943 |
04 May 21 |
nicklas |
990 |
</div> |
7943 |
04 May 21 |
nicklas |
991 |
</tbl:header> |
6308 |
20 Aug 13 |
nicklas |
992 |
<tbl:cell column="name"><div |
6308 |
20 Aug 13 |
nicklas |
993 |
class="link auto-init" |
6308 |
20 Aug 13 |
nicklas |
994 |
data-auto-init="file-item" |
6308 |
20 Aug 13 |
nicklas |
995 |
data-item-id="<%=itemId%>" |
6308 |
20 Aug 13 |
nicklas |
996 |
data-path="<%=tagPath %>" |
6308 |
20 Aug 13 |
nicklas |
997 |
data-no-edit="<%=writePermission ? 0 : 1 %>" |
6308 |
20 Aug 13 |
nicklas |
998 |
tabindex="0" |
2433 |
27 Jun 06 |
nicklas |
999 |
title="<%=tooltip%>"><%=name%></div></tbl:cell> |
5179 |
04 Nov 09 |
nicklas |
1000 |
<tbl:cell column="path" style="white-space: nowrap;"> |
5179 |
04 Nov 09 |
nicklas |
1001 |
<% |
5179 |
04 Nov 09 |
nicklas |
1002 |
if (parent != null && mode.hasPropertyLink()) |
5179 |
04 Nov 09 |
nicklas |
1003 |
{ |
5179 |
04 Nov 09 |
nicklas |
1004 |
%> |
6308 |
20 Aug 13 |
nicklas |
1005 |
<div class="link auto-init" |
6308 |
20 Aug 13 |
nicklas |
1006 |
data-auto-init="open-directory" |
6308 |
20 Aug 13 |
nicklas |
1007 |
data-directory-id="<%=parent.getId() %>" |
6308 |
20 Aug 13 |
nicklas |
1008 |
title="Open this directory"><%=tagPath.substring(0, tagPath.length() - name.length())%></div> |
5179 |
04 Nov 09 |
nicklas |
1009 |
<% |
5179 |
04 Nov 09 |
nicklas |
1010 |
} |
5179 |
04 Nov 09 |
nicklas |
1011 |
else |
5179 |
04 Nov 09 |
nicklas |
1012 |
{ |
5179 |
04 Nov 09 |
nicklas |
1013 |
%> |
5179 |
04 Nov 09 |
nicklas |
1014 |
<%=tagPath.substring(0, tagPath.length() - name.length())%> |
5179 |
04 Nov 09 |
nicklas |
1015 |
<% |
5179 |
04 Nov 09 |
nicklas |
1016 |
} |
5179 |
04 Nov 09 |
nicklas |
1017 |
%> |
5179 |
04 Nov 09 |
nicklas |
1018 |
</tbl:cell> |
6214 |
13 Dec 12 |
nicklas |
1019 |
<tbl:cell column="id"><%=item.getId()%></tbl:cell> |
5361 |
14 Jun 10 |
nicklas |
1020 |
<tbl:cell column="url"><%=HTML.niceFormat(item.getUrl(), HTML.LINK_URL)%></tbl:cell> |
5361 |
14 Jun 10 |
nicklas |
1021 |
<tbl:cell column="fileServer"><base:propertyvalue |
5361 |
14 Jun 10 |
nicklas |
1022 |
item="<%=item%>" |
5361 |
14 Jun 10 |
nicklas |
1023 |
property="fileServer" |
5361 |
14 Jun 10 |
nicklas |
1024 |
enableEditLink="<%=mode.hasEditLink()%>" |
5361 |
14 Jun 10 |
nicklas |
1025 |
enablePropertyLink="<%=mode.hasPropertyLink()%>" |
5361 |
14 Jun 10 |
nicklas |
1026 |
/></tbl:cell> |
4865 |
31 Mar 09 |
nicklas |
1027 |
<tbl:cell column="size"><span title="<%=item.getSize()%> bytes"><%=fileSize%></span></tbl:cell> |
6268 |
11 Apr 13 |
nicklas |
1028 |
<tbl:cell column="compressedSize"><span title="<%=item.getCompressedSize()%> bytes"><%=Values.formatBytes(item.getCompressedSize(), 2)%></span></tbl:cell> |
3719 |
12 Sep 07 |
nicklas |
1029 |
<tbl:cell column="compressed"><%=item.isCompressed() ? "yes" : "no"%></tbl:cell> |
3463 |
07 Jun 07 |
nicklas |
1030 |
<tbl:cell column="writeProtected"><%=item.isWriteProtected() ? "yes" : "no"%></tbl:cell> |
5630 |
13 May 11 |
nicklas |
1031 |
<tbl:cell column="itemSubtype" |
2354 |
07 Jun 06 |
martin |
1032 |
><base:propertyvalue |
2354 |
07 Jun 06 |
martin |
1033 |
item="<%=item%>" |
5630 |
13 May 11 |
nicklas |
1034 |
property="itemSubtype" |
2354 |
07 Jun 06 |
martin |
1035 |
enableEditLink="<%=mode.hasEditLink()%>" |
2354 |
07 Jun 06 |
martin |
1036 |
enablePropertyLink="<%=mode.hasPropertyLink()%>" |
2354 |
07 Jun 06 |
martin |
1037 |
/></tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
1038 |
<tbl:cell column="mimeType"><%=HTML.encodeTags(item.getMimeType())%></tbl:cell> |
4520 |
15 Sep 08 |
nicklas |
1039 |
<tbl:cell column="characterSet"><%=HTML.encodeTags(item.getCharacterSet())%></tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
1040 |
<tbl:cell column="location"><%=item.getLocation()%></tbl:cell> |
5326 |
29 Apr 10 |
nicklas |
1041 |
<tbl:cell column="md5"><%=HTML.encodeTags(item.getMd5())%></tbl:cell> |
2354 |
07 Jun 06 |
martin |
1042 |
<tbl:cell column="owner" |
2354 |
07 Jun 06 |
martin |
1043 |
><base:propertyvalue |
2354 |
07 Jun 06 |
martin |
1044 |
item="<%=item%>" |
2354 |
07 Jun 06 |
martin |
1045 |
property="owner" |
2354 |
07 Jun 06 |
martin |
1046 |
enableEditLink="<%=mode.hasEditLink()%>" |
2354 |
07 Jun 06 |
martin |
1047 |
enablePropertyLink="<%=mode.hasPropertyLink()%>" |
2354 |
07 Jun 06 |
martin |
1048 |
/></tbl:cell> |
2029 |
20 Feb 06 |
nicklas |
1049 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
3466 |
08 Jun 07 |
nicklas |
1050 |
<tbl:cell column="lastUpdate" value="<%=item.getLastUpdate()%>" /> |
7760 |
27 Nov 19 |
nicklas |
1051 |
<tbl:cell column="actions"><%fileViewer.render();%></tbl:cell> |
2403 |
21 Jun 06 |
martin |
1052 |
<tbl:cell column="permissions"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell> |
3552 |
06 Jul 07 |
martin |
1053 |
<tbl:cell column="sharedTo"> |
3552 |
06 Jul 07 |
martin |
1054 |
<% |
3552 |
06 Jul 07 |
martin |
1055 |
Iterator<Nameable> sharees = ShareableUtil.getSharedTo(dc, item).iterator(); |
3552 |
06 Jul 07 |
martin |
1056 |
while(sharees.hasNext()) |
3552 |
06 Jul 07 |
martin |
1057 |
{ |
3552 |
06 Jul 07 |
martin |
1058 |
Nameable n = sharees.next(); |
3552 |
06 Jul 07 |
martin |
1059 |
if (mode.hasPropertyLink()) |
3552 |
06 Jul 07 |
martin |
1060 |
{ |
3552 |
06 Jul 07 |
martin |
1061 |
out.write(Base.getLinkedName(ID, n, false, mode.hasEditLink())); |
3552 |
06 Jul 07 |
martin |
1062 |
} |
3552 |
06 Jul 07 |
martin |
1063 |
else |
3552 |
06 Jul 07 |
martin |
1064 |
{ |
3552 |
06 Jul 07 |
martin |
1065 |
out.write(HTML.encodeTags(n.getName())); |
3552 |
06 Jul 07 |
martin |
1066 |
} |
3552 |
06 Jul 07 |
martin |
1067 |
out.write(sharees.hasNext() ? ", " : ""); |
3552 |
06 Jul 07 |
martin |
1068 |
} |
3552 |
06 Jul 07 |
martin |
1069 |
%> |
3552 |
06 Jul 07 |
martin |
1070 |
</tbl:cell> |
7857 |
20 Oct 20 |
nicklas |
1071 |
<% |
7857 |
20 Oct 20 |
nicklas |
1072 |
if (item.isAnnotated()) |
7857 |
20 Oct 20 |
nicklas |
1073 |
{ |
7857 |
20 Oct 20 |
nicklas |
1074 |
AnnotationSetSnapshot snapshot = manager.getSnapshot(dc, item.getAnnotationSet().getId()); |
7857 |
20 Oct 20 |
nicklas |
1075 |
for (AnnotationLoaderUtil loader : annotationLoaders) |
7857 |
20 Oct 20 |
nicklas |
1076 |
{ |
7857 |
20 Oct 20 |
nicklas |
1077 |
%> |
7857 |
20 Oct 20 |
nicklas |
1078 |
<tbl:cell |
7857 |
20 Oct 20 |
nicklas |
1079 |
column="<%=(loader.isSearchingInheritedAnnotations() ? "ia" : "at")+loader.getId()%>" |
7857 |
20 Oct 20 |
nicklas |
1080 |
><% |
7857 |
20 Oct 20 |
nicklas |
1081 |
if (loader.find(snapshot, psInfo.reset())) |
7857 |
20 Oct 20 |
nicklas |
1082 |
{ |
7857 |
20 Oct 20 |
nicklas |
1083 |
%><tbl:cellvalue |
7857 |
20 Oct 20 |
nicklas |
1084 |
list="<%=loader.getValues()%>" |
8160 |
07 Jun 23 |
nicklas |
1085 |
bulletlist="<%=loader.useBulletList() %>" |
7857 |
20 Oct 20 |
nicklas |
1086 |
suffix="<%=loader.getUnitSymbol()%>" |
8083 |
20 Oct 22 |
nicklas |
1087 |
clazz="<%=psInfo.hasProjectSpecificAnnotation() ? "ps-annotation" : null%>" |
7857 |
20 Oct 20 |
nicklas |
1088 |
/><% |
7857 |
20 Oct 20 |
nicklas |
1089 |
} |
7857 |
20 Oct 20 |
nicklas |
1090 |
%></tbl:cell> |
7857 |
20 Oct 20 |
nicklas |
1091 |
<% |
7857 |
20 Oct 20 |
nicklas |
1092 |
} |
7857 |
20 Oct 20 |
nicklas |
1093 |
} |
7857 |
20 Oct 20 |
nicklas |
1094 |
%> |
6040 |
30 Mar 12 |
nicklas |
1095 |
<tbl:xt-cells dc="<%=dc%>" item="<%=item%>"> |
6040 |
30 Mar 12 |
nicklas |
1096 |
<tbl:cell column="xt-columns" /> |
6040 |
30 Mar 12 |
nicklas |
1097 |
</tbl:xt-cells> |
2029 |
20 Feb 06 |
nicklas |
1098 |
</tbl:row> |
2029 |
20 Feb 06 |
nicklas |
1099 |
<% |
2029 |
20 Feb 06 |
nicklas |
1100 |
} |
1794 |
19 Jan 06 |
nicklas |
1101 |
} |
5952 |
10 Feb 12 |
nicklas |
1102 |
if (numListed == 0) |
5952 |
10 Feb 12 |
nicklas |
1103 |
{ |
5952 |
10 Feb 12 |
nicklas |
1104 |
%> |
6610 |
20 Nov 14 |
nicklas |
1105 |
<tbl:panel subclass="bg-filled-50" visible="<%=!isSearch || hasFilter%>"> |
5952 |
10 Feb 12 |
nicklas |
1106 |
<div class="messagecontainer note"> |
5952 |
10 Feb 12 |
nicklas |
1107 |
No files or directories were found |
5952 |
10 Feb 12 |
nicklas |
1108 |
</div> |
5952 |
10 Feb 12 |
nicklas |
1109 |
</tbl:panel> |
6610 |
20 Nov 14 |
nicklas |
1110 |
<tbl:panel subclass="bg-filled-50" visible="<%=isSearch && !hasFilter%>"> |
5952 |
10 Feb 12 |
nicklas |
1111 |
<div class="messagecontainer note"> |
5952 |
10 Feb 12 |
nicklas |
1112 |
Please specify a search condition! |
5952 |
10 Feb 12 |
nicklas |
1113 |
</div> |
5952 |
10 Feb 12 |
nicklas |
1114 |
</tbl:panel> |
5952 |
10 Feb 12 |
nicklas |
1115 |
<% |
5952 |
10 Feb 12 |
nicklas |
1116 |
} |
1794 |
19 Jan 06 |
nicklas |
1117 |
%> |
1794 |
19 Jan 06 |
nicklas |
1118 |
</tbl:rows> |
1794 |
19 Jan 06 |
nicklas |
1119 |
</tbl:data> |
1794 |
19 Jan 06 |
nicklas |
1120 |
</tbl:table> |
1794 |
19 Jan 06 |
nicklas |
1121 |
</div> |
6308 |
20 Aug 13 |
nicklas |
1122 |
<div id="reloadOnNotify"></div> |
1794 |
19 Jan 06 |
nicklas |
1123 |
</base:body> |
1794 |
19 Jan 06 |
nicklas |
1124 |
</base:page> |
1794 |
19 Jan 06 |
nicklas |
1125 |
<% |
1794 |
19 Jan 06 |
nicklas |
1126 |
} |
1794 |
19 Jan 06 |
nicklas |
1127 |
finally |
1794 |
19 Jan 06 |
nicklas |
1128 |
{ |
1794 |
19 Jan 06 |
nicklas |
1129 |
if (files != null) files.close(); |
1794 |
19 Jan 06 |
nicklas |
1130 |
if (directories != null) directories.close(); |
1794 |
19 Jan 06 |
nicklas |
1131 |
if (dc != null) dc.close(); |
1794 |
19 Jan 06 |
nicklas |
1132 |
} |
3675 |
16 Aug 07 |
jari |
1133 |
%> |