6742 |
17 Feb 15 |
nicklas |
1 |
<%-- $Id$ |
6742 |
17 Feb 15 |
nicklas |
2 |
------------------------------------------------------------------ |
6742 |
17 Feb 15 |
nicklas |
Copyright (C) 2015 Nicklas Nordborg |
6742 |
17 Feb 15 |
nicklas |
4 |
|
6742 |
17 Feb 15 |
nicklas |
5 |
This file is part of BASE - BioArray Software Environment. |
6742 |
17 Feb 15 |
nicklas |
6 |
Available at http://base.thep.lu.se/ |
6742 |
17 Feb 15 |
nicklas |
7 |
|
6742 |
17 Feb 15 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
6742 |
17 Feb 15 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
6742 |
17 Feb 15 |
nicklas |
10 |
as published by the Free Software Foundation; either version 3 |
6742 |
17 Feb 15 |
nicklas |
11 |
of the License, or (at your option) any later version. |
6742 |
17 Feb 15 |
nicklas |
12 |
|
6742 |
17 Feb 15 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
6742 |
17 Feb 15 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
6742 |
17 Feb 15 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6742 |
17 Feb 15 |
nicklas |
16 |
GNU General Public License for more details. |
6742 |
17 Feb 15 |
nicklas |
17 |
|
6742 |
17 Feb 15 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
6742 |
17 Feb 15 |
nicklas |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
6742 |
17 Feb 15 |
nicklas |
20 |
------------------------------------------------------------------ |
6742 |
17 Feb 15 |
nicklas |
21 |
|
6742 |
17 Feb 15 |
nicklas |
22 |
@author Nicklas |
6742 |
17 Feb 15 |
nicklas |
23 |
--%> |
6742 |
17 Feb 15 |
nicklas |
24 |
<%@ page pageEncoding="UTF-8" session="false" |
6742 |
17 Feb 15 |
nicklas |
25 |
import="net.sf.basedb.core.SessionControl" |
6742 |
17 Feb 15 |
nicklas |
26 |
import="net.sf.basedb.core.DbControl" |
6742 |
17 Feb 15 |
nicklas |
27 |
import="net.sf.basedb.core.Item" |
6742 |
17 Feb 15 |
nicklas |
28 |
import="net.sf.basedb.core.AnnotationType" |
6742 |
17 Feb 15 |
nicklas |
29 |
import="net.sf.basedb.core.AnnotationSet" |
6742 |
17 Feb 15 |
nicklas |
30 |
import="net.sf.basedb.core.Annotation" |
6742 |
17 Feb 15 |
nicklas |
31 |
import="net.sf.basedb.core.ItemQuery" |
6742 |
17 Feb 15 |
nicklas |
32 |
import="net.sf.basedb.core.ItemResultIterator" |
6742 |
17 Feb 15 |
nicklas |
33 |
import="net.sf.basedb.core.ItemResultList" |
6742 |
17 Feb 15 |
nicklas |
34 |
import="net.sf.basedb.core.ItemList" |
6753 |
20 Feb 15 |
nicklas |
35 |
import="net.sf.basedb.core.ItemSubtype" |
6742 |
17 Feb 15 |
nicklas |
36 |
import="net.sf.basedb.core.ItemContext" |
6742 |
17 Feb 15 |
nicklas |
37 |
import="net.sf.basedb.core.Nameable" |
6753 |
20 Feb 15 |
nicklas |
38 |
import="net.sf.basedb.core.RawDataTypes" |
6753 |
20 Feb 15 |
nicklas |
39 |
import="net.sf.basedb.core.RawDataType" |
6753 |
20 Feb 15 |
nicklas |
40 |
import="net.sf.basedb.core.Metadata" |
6742 |
17 Feb 15 |
nicklas |
41 |
import="net.sf.basedb.core.Permission" |
6753 |
20 Feb 15 |
nicklas |
42 |
import="net.sf.basedb.core.Type" |
6742 |
17 Feb 15 |
nicklas |
43 |
import="net.sf.basedb.core.PluginDefinition" |
6742 |
17 Feb 15 |
nicklas |
44 |
import="net.sf.basedb.core.plugin.GuiContext" |
6742 |
17 Feb 15 |
nicklas |
45 |
import="net.sf.basedb.core.plugin.Plugin" |
6742 |
17 Feb 15 |
nicklas |
46 |
import="net.sf.basedb.core.query.Hql" |
6742 |
17 Feb 15 |
nicklas |
47 |
import="net.sf.basedb.core.query.Orders" |
6753 |
20 Feb 15 |
nicklas |
48 |
import="net.sf.basedb.core.query.Expressions" |
6753 |
20 Feb 15 |
nicklas |
49 |
import="net.sf.basedb.core.query.Restrictions" |
6742 |
17 Feb 15 |
nicklas |
50 |
import="net.sf.basedb.core.snapshot.AnnotationLoaderUtil" |
6742 |
17 Feb 15 |
nicklas |
51 |
import="net.sf.basedb.core.snapshot.AnnotationTypeFilter" |
6742 |
17 Feb 15 |
nicklas |
52 |
import="net.sf.basedb.core.snapshot.AnnotationSnapshot" |
6742 |
17 Feb 15 |
nicklas |
53 |
import="net.sf.basedb.core.snapshot.AnnotationSetSnapshot" |
6742 |
17 Feb 15 |
nicklas |
54 |
import="net.sf.basedb.core.snapshot.SnapshotManager" |
6742 |
17 Feb 15 |
nicklas |
55 |
import="net.sf.basedb.clients.web.Base" |
6742 |
17 Feb 15 |
nicklas |
56 |
import="net.sf.basedb.clients.web.PermissionUtil" |
6742 |
17 Feb 15 |
nicklas |
57 |
import="net.sf.basedb.clients.web.ModeInfo" |
6742 |
17 Feb 15 |
nicklas |
58 |
import="net.sf.basedb.clients.web.util.HTML" |
6742 |
17 Feb 15 |
nicklas |
59 |
import="net.sf.basedb.util.Enumeration" |
6742 |
17 Feb 15 |
nicklas |
60 |
import="net.sf.basedb.util.ShareableUtil" |
6742 |
17 Feb 15 |
nicklas |
61 |
import="net.sf.basedb.util.Values" |
6742 |
17 Feb 15 |
nicklas |
62 |
import="net.sf.basedb.util.formatter.Formatter" |
6742 |
17 Feb 15 |
nicklas |
63 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
6742 |
17 Feb 15 |
nicklas |
64 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
6742 |
17 Feb 15 |
nicklas |
65 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
6742 |
17 Feb 15 |
nicklas |
66 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
67 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
6742 |
17 Feb 15 |
nicklas |
68 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
7604 |
25 Feb 19 |
nicklas |
69 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnAction" |
6742 |
17 Feb 15 |
nicklas |
70 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnUtil" |
7337 |
12 Apr 17 |
nicklas |
71 |
import="net.sf.basedb.clients.web.util.ProjectSpecificInfoFilter" |
6742 |
17 Feb 15 |
nicklas |
72 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
6742 |
17 Feb 15 |
nicklas |
73 |
import="java.util.Iterator" |
6742 |
17 Feb 15 |
nicklas |
74 |
import="java.util.List" |
6742 |
17 Feb 15 |
nicklas |
75 |
import="java.util.Map" |
6742 |
17 Feb 15 |
nicklas |
76 |
import="java.util.ArrayList" |
6753 |
20 Feb 15 |
nicklas |
77 |
import="java.util.Set" |
6753 |
20 Feb 15 |
nicklas |
78 |
import="java.util.HashSet" |
6773 |
16 Mar 15 |
nicklas |
79 |
import="java.util.Date" |
6742 |
17 Feb 15 |
nicklas |
80 |
%> |
6742 |
17 Feb 15 |
nicklas |
81 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
6742 |
17 Feb 15 |
nicklas |
82 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
6742 |
17 Feb 15 |
nicklas |
83 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
6742 |
17 Feb 15 |
nicklas |
84 |
<%! |
6742 |
17 Feb 15 |
nicklas |
85 |
private static final Item itemType = Item.ITEMLIST; |
6742 |
17 Feb 15 |
nicklas |
86 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST); |
6742 |
17 Feb 15 |
nicklas |
87 |
private static Enumeration<String, String> memberTypes = new Enumeration<String, String>(); |
6753 |
20 Feb 15 |
nicklas |
88 |
private static Set<Integer> memberTypeIds = new HashSet<Integer>(); |
6753 |
20 Feb 15 |
nicklas |
89 |
|
6742 |
17 Feb 15 |
nicklas |
90 |
static |
6742 |
17 Feb 15 |
nicklas |
91 |
{ |
6742 |
17 Feb 15 |
nicklas |
92 |
for (Item itemType : Metadata.getListableItems()) |
6742 |
17 Feb 15 |
nicklas |
93 |
{ |
6753 |
20 Feb 15 |
nicklas |
94 |
memberTypeIds.add(itemType.getValue()); |
6742 |
17 Feb 15 |
nicklas |
95 |
memberTypes.add(Integer.toString(itemType.getValue()), itemType.toString()); |
6742 |
17 Feb 15 |
nicklas |
96 |
} |
6742 |
17 Feb 15 |
nicklas |
97 |
} |
6742 |
17 Feb 15 |
nicklas |
98 |
%> |
6742 |
17 Feb 15 |
nicklas |
99 |
<% |
6742 |
17 Feb 15 |
nicklas |
100 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType); |
6742 |
17 Feb 15 |
nicklas |
101 |
final String ID = sc.getId(); |
6742 |
17 Feb 15 |
nicklas |
102 |
final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType); |
6742 |
17 Feb 15 |
nicklas |
103 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
6742 |
17 Feb 15 |
nicklas |
104 |
|
6742 |
17 Feb 15 |
nicklas |
105 |
final ModeInfo mode = ModeInfo.get(request.getParameter("mode")); |
6742 |
17 Feb 15 |
nicklas |
106 |
final String callback = request.getParameter("callback"); |
6742 |
17 Feb 15 |
nicklas |
107 |
final String title = mode.generateTitle("item list", "item lists"); |
7954 |
12 May 21 |
nicklas |
108 |
final DbControl dc = sc.newDbControl(":List "+itemType); |
6742 |
17 Feb 15 |
nicklas |
109 |
ItemResultIterator<ItemList> lists = null; |
6742 |
17 Feb 15 |
nicklas |
110 |
List<AnnotationLoaderUtil> annotationLoaders = new ArrayList<AnnotationLoaderUtil>(); |
6742 |
17 Feb 15 |
nicklas |
111 |
try |
6742 |
17 Feb 15 |
nicklas |
112 |
{ |
6753 |
20 Feb 15 |
nicklas |
113 |
|
6753 |
20 Feb 15 |
nicklas |
114 |
final ItemQuery<ItemSubtype> subtypesQuery = Base.getSubtypesQuery(null); |
6753 |
20 Feb 15 |
nicklas |
115 |
subtypesQuery.restrict( |
6753 |
20 Feb 15 |
nicklas |
116 |
Restrictions.in( |
6753 |
20 Feb 15 |
nicklas |
117 |
Hql.property("itemType"), |
6753 |
20 Feb 15 |
nicklas |
118 |
Expressions.parameter("memberTypes") |
6753 |
20 Feb 15 |
nicklas |
119 |
)); |
6753 |
20 Feb 15 |
nicklas |
120 |
subtypesQuery.setParameter("memberTypes", memberTypeIds, Type.INT); |
6753 |
20 Feb 15 |
nicklas |
121 |
Enumeration<String, String> subtypesEnum = new Enumeration<String, String>(); |
6753 |
20 Feb 15 |
nicklas |
122 |
subtypesEnum.add("", "- none -"); |
6753 |
20 Feb 15 |
nicklas |
123 |
for (ItemSubtype st : subtypesQuery.list(dc)) |
6753 |
20 Feb 15 |
nicklas |
124 |
{ |
6753 |
20 Feb 15 |
nicklas |
125 |
subtypesEnum.add(Integer.toString(st.getId()), HTML.encodeTags(st.getName()) + " <span class=\"itemsubtype\">(" + st.getMainItemType() + ")</span>"); |
6753 |
20 Feb 15 |
nicklas |
126 |
} |
6753 |
20 Feb 15 |
nicklas |
127 |
|
6742 |
17 Feb 15 |
nicklas |
128 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
6742 |
17 Feb 15 |
nicklas |
129 |
final ItemQuery<AnnotationType> annotationTypeQuery = Base.getAnnotationTypesQuery(itemType); |
6742 |
17 Feb 15 |
nicklas |
130 |
SnapshotManager manager = new SnapshotManager(); |
7337 |
12 Apr 17 |
nicklas |
131 |
ProjectSpecificInfoFilter psInfo = new ProjectSpecificInfoFilter(); |
6742 |
17 Feb 15 |
nicklas |
132 |
for (AnnotationType at : annotationTypeQuery.list(dc)) |
6742 |
17 Feb 15 |
nicklas |
133 |
{ |
6742 |
17 Feb 15 |
nicklas |
134 |
annotationLoaders.add(new AnnotationLoaderUtil(dc, manager, at)); |
6742 |
17 Feb 15 |
nicklas |
135 |
} |
7914 |
23 Feb 21 |
nicklas |
136 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null); |
6742 |
17 Feb 15 |
nicklas |
137 |
try |
6742 |
17 Feb 15 |
nicklas |
138 |
{ |
7914 |
23 Feb 21 |
nicklas |
139 |
final ItemQuery<ItemList> query = Base.getConfiguredQuery(dc, cc, jspContext, true, ItemList.getQuery(), mode); |
6742 |
17 Feb 15 |
nicklas |
140 |
lists = query.iterate(dc); |
6742 |
17 Feb 15 |
nicklas |
141 |
} |
6742 |
17 Feb 15 |
nicklas |
142 |
catch (Throwable t) |
6742 |
17 Feb 15 |
nicklas |
143 |
{ |
6742 |
17 Feb 15 |
nicklas |
144 |
cc.setMessage(t.getMessage()); |
6742 |
17 Feb 15 |
nicklas |
145 |
} |
6742 |
17 Feb 15 |
nicklas |
146 |
int numListed = 0; |
6773 |
16 Mar 15 |
nicklas |
147 |
Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); |
7604 |
25 Feb 19 |
nicklas |
148 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
7604 |
25 Feb 19 |
nicklas |
149 |
ExtensionsInvoker<ListColumnAction<ItemList,?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext); |
6742 |
17 Feb 15 |
nicklas |
150 |
%> |
6742 |
17 Feb 15 |
nicklas |
151 |
<base:page title="<%=title==null ? "Item lists" : title%>" type="<%=mode.getPageType()%>" id="list-page"> |
6742 |
17 Feb 15 |
nicklas |
152 |
<base:head scripts="table.js,~lists.js" styles="table.css,toolbar.css"> |
6742 |
17 Feb 15 |
nicklas |
153 |
<ext:scripts context="<%=jspContext%>" /> |
6742 |
17 Feb 15 |
nicklas |
154 |
<ext:stylesheets context="<%=jspContext%>" /> |
7943 |
04 May 21 |
nicklas |
155 |
<style> |
7943 |
04 May 21 |
nicklas |
156 |
.row-index |
7943 |
04 May 21 |
nicklas |
157 |
{ |
7943 |
04 May 21 |
nicklas |
158 |
width: 8.5em !important; |
7943 |
04 May 21 |
nicklas |
159 |
} |
7943 |
04 May 21 |
nicklas |
160 |
.row-index > div |
7943 |
04 May 21 |
nicklas |
161 |
{ |
7943 |
04 May 21 |
nicklas |
162 |
grid-template-columns: 1fr 20px 52px !important; |
7943 |
04 May 21 |
nicklas |
163 |
} |
7943 |
04 May 21 |
nicklas |
164 |
</style> |
6742 |
17 Feb 15 |
nicklas |
165 |
</base:head> |
6742 |
17 Feb 15 |
nicklas |
166 |
|
6742 |
17 Feb 15 |
nicklas |
167 |
<base:body> |
6742 |
17 Feb 15 |
nicklas |
168 |
<h1><%=title==null ? "Item lists" : title%></h1> |
6742 |
17 Feb 15 |
nicklas |
169 |
<div class="content"> |
6742 |
17 Feb 15 |
nicklas |
170 |
<tbl:table |
6742 |
17 Feb 15 |
nicklas |
171 |
id="lists" |
6742 |
17 Feb 15 |
nicklas |
172 |
columns="<%=cc.getSetting("columns")%>" |
6742 |
17 Feb 15 |
nicklas |
173 |
sortby="<%=cc.getSortProperty()%>" |
6742 |
17 Feb 15 |
nicklas |
174 |
direction="<%=cc.getSortDirection()%>" |
6742 |
17 Feb 15 |
nicklas |
175 |
action="index.jsp" |
6742 |
17 Feb 15 |
nicklas |
176 |
sc="<%=sc%>" |
6742 |
17 Feb 15 |
nicklas |
177 |
item="<%=itemType%>" |
6742 |
17 Feb 15 |
nicklas |
178 |
filterrows="<%=cc.getFilterRows()%>" |
6742 |
17 Feb 15 |
nicklas |
179 |
subclass="fulltable" |
7982 |
14 Jun 21 |
nicklas |
180 |
stickyheaders="<%=cc.getSetting("columns.sticky", "name")%>" |
6742 |
17 Feb 15 |
nicklas |
181 |
> |
6742 |
17 Feb 15 |
nicklas |
182 |
<tbl:hidden |
6742 |
17 Feb 15 |
nicklas |
183 |
name="mode" |
6742 |
17 Feb 15 |
nicklas |
184 |
value="<%=mode.getName()%>" |
6742 |
17 Feb 15 |
nicklas |
185 |
/> |
6742 |
17 Feb 15 |
nicklas |
186 |
<tbl:hidden |
6742 |
17 Feb 15 |
nicklas |
187 |
name="callback" |
6742 |
17 Feb 15 |
nicklas |
188 |
value="<%=callback%>" |
6742 |
17 Feb 15 |
nicklas |
189 |
skip="<%=callback == null%>" |
6742 |
17 Feb 15 |
nicklas |
190 |
/> |
6742 |
17 Feb 15 |
nicklas |
191 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
192 |
id="name" |
6742 |
17 Feb 15 |
nicklas |
193 |
property="name" |
6742 |
17 Feb 15 |
nicklas |
194 |
datatype="string" |
6742 |
17 Feb 15 |
nicklas |
195 |
title="Name" |
6742 |
17 Feb 15 |
nicklas |
196 |
sortable="true" |
6742 |
17 Feb 15 |
nicklas |
197 |
filterable="true" |
6742 |
17 Feb 15 |
nicklas |
198 |
exportable="true" |
6742 |
17 Feb 15 |
nicklas |
199 |
show="always" |
6742 |
17 Feb 15 |
nicklas |
200 |
/> |
6742 |
17 Feb 15 |
nicklas |
201 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
202 |
id="externalId" |
6742 |
17 Feb 15 |
nicklas |
203 |
property="externalId" |
6742 |
17 Feb 15 |
nicklas |
204 |
datatype="string" |
6742 |
17 Feb 15 |
nicklas |
205 |
title="External ID" |
6742 |
17 Feb 15 |
nicklas |
206 |
sortable="true" |
6742 |
17 Feb 15 |
nicklas |
207 |
filterable="true" |
6742 |
17 Feb 15 |
nicklas |
208 |
exportable="true" |
6742 |
17 Feb 15 |
nicklas |
209 |
/> |
6742 |
17 Feb 15 |
nicklas |
210 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
211 |
id="memberType" |
6742 |
17 Feb 15 |
nicklas |
212 |
property="memberType" |
6742 |
17 Feb 15 |
nicklas |
213 |
datatype="int" |
6742 |
17 Feb 15 |
nicklas |
214 |
title="Member type" |
6742 |
17 Feb 15 |
nicklas |
215 |
sortable="true" |
6742 |
17 Feb 15 |
nicklas |
216 |
filterable="true" |
6742 |
17 Feb 15 |
nicklas |
217 |
exportable="true" |
6742 |
17 Feb 15 |
nicklas |
218 |
enumeration="<%=memberTypes%>" |
6742 |
17 Feb 15 |
nicklas |
219 |
/> |
6742 |
17 Feb 15 |
nicklas |
220 |
<tbl:columndef |
6753 |
20 Feb 15 |
nicklas |
221 |
id="itemSubtype" |
6753 |
20 Feb 15 |
nicklas |
222 |
property="itemSubtype" |
6753 |
20 Feb 15 |
nicklas |
223 |
sortproperty="itemSubtype.name" |
6753 |
20 Feb 15 |
nicklas |
224 |
exportproperty="itemSubtype.name:string" |
6753 |
20 Feb 15 |
nicklas |
225 |
datatype="int" |
6753 |
20 Feb 15 |
nicklas |
226 |
enumeration="<%=subtypesEnum%>" |
6753 |
20 Feb 15 |
nicklas |
227 |
title="Subtype" |
6753 |
20 Feb 15 |
nicklas |
228 |
sortable="true" |
6753 |
20 Feb 15 |
nicklas |
229 |
filterable="true" |
6753 |
20 Feb 15 |
nicklas |
230 |
exportable="true" |
6753 |
20 Feb 15 |
nicklas |
231 |
/> |
6753 |
20 Feb 15 |
nicklas |
232 |
<% |
6753 |
20 Feb 15 |
nicklas |
233 |
Enumeration<String, String> rawEnumeration = new Enumeration<String, String>(); |
6753 |
20 Feb 15 |
nicklas |
234 |
rawEnumeration.add("", "- none "); |
6753 |
20 Feb 15 |
nicklas |
235 |
for (RawDataType rdt : RawDataTypes.getRawDataTypes()) |
6753 |
20 Feb 15 |
nicklas |
236 |
{ |
6753 |
20 Feb 15 |
nicklas |
237 |
rawEnumeration.add(rdt.getId(), HTML.encodeTags(rdt.getName())); |
6753 |
20 Feb 15 |
nicklas |
238 |
} |
6753 |
20 Feb 15 |
nicklas |
239 |
rawEnumeration.sortValues(); |
6753 |
20 Feb 15 |
nicklas |
240 |
%> |
6753 |
20 Feb 15 |
nicklas |
241 |
<tbl:columndef |
6753 |
20 Feb 15 |
nicklas |
242 |
id="rawDataType" |
6753 |
20 Feb 15 |
nicklas |
243 |
property="rawDataType" |
6753 |
20 Feb 15 |
nicklas |
244 |
datatype="string" |
6753 |
20 Feb 15 |
nicklas |
245 |
enumeration="<%=rawEnumeration%>" |
6753 |
20 Feb 15 |
nicklas |
246 |
title="Raw data type" |
6753 |
20 Feb 15 |
nicklas |
247 |
sortable="true" |
6753 |
20 Feb 15 |
nicklas |
248 |
filterable="true" |
6753 |
20 Feb 15 |
nicklas |
249 |
exportable="true" |
6753 |
20 Feb 15 |
nicklas |
250 |
/> |
6753 |
20 Feb 15 |
nicklas |
251 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
252 |
id="size" |
6742 |
17 Feb 15 |
nicklas |
253 |
property="size" |
6742 |
17 Feb 15 |
nicklas |
254 |
datatype="int" |
6742 |
17 Feb 15 |
nicklas |
255 |
title="Size" |
6742 |
17 Feb 15 |
nicklas |
256 |
sortable="true" |
6742 |
17 Feb 15 |
nicklas |
257 |
filterable="true" |
6742 |
17 Feb 15 |
nicklas |
258 |
exportable="true" |
6742 |
17 Feb 15 |
nicklas |
259 |
/> |
6742 |
17 Feb 15 |
nicklas |
260 |
<tbl:columndef |
6773 |
16 Mar 15 |
nicklas |
261 |
id="syncDate" |
6773 |
16 Mar 15 |
nicklas |
262 |
property="syncDate" |
6773 |
16 Mar 15 |
nicklas |
263 |
datatype="timestamp" |
6773 |
16 Mar 15 |
nicklas |
264 |
title="Sync date" |
6773 |
16 Mar 15 |
nicklas |
265 |
sortable="true" |
6773 |
16 Mar 15 |
nicklas |
266 |
filterable="true" |
6773 |
16 Mar 15 |
nicklas |
267 |
exportable="true" |
6773 |
16 Mar 15 |
nicklas |
268 |
formatter="<%=dateTimeFormatter%>" |
6773 |
16 Mar 15 |
nicklas |
269 |
/> |
6773 |
16 Mar 15 |
nicklas |
270 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
271 |
id="id" |
6742 |
17 Feb 15 |
nicklas |
272 |
clazz="uniquecol" |
6742 |
17 Feb 15 |
nicklas |
273 |
property="id" |
6742 |
17 Feb 15 |
nicklas |
274 |
datatype="int" |
6742 |
17 Feb 15 |
nicklas |
275 |
title="ID" |
6742 |
17 Feb 15 |
nicklas |
276 |
sortable="true" |
6742 |
17 Feb 15 |
nicklas |
277 |
filterable="true" |
6742 |
17 Feb 15 |
nicklas |
278 |
exportable="true" |
6742 |
17 Feb 15 |
nicklas |
279 |
/> |
6742 |
17 Feb 15 |
nicklas |
280 |
<tbl:columndef |
7813 |
19 May 20 |
nicklas |
281 |
id="disableManualMembers" |
7813 |
19 May 20 |
nicklas |
282 |
property="disableManualMembers" |
7813 |
19 May 20 |
nicklas |
283 |
datatype="boolean" |
7813 |
19 May 20 |
nicklas |
284 |
title="Locked (manual)" |
7813 |
19 May 20 |
nicklas |
285 |
sortable="true" |
7813 |
19 May 20 |
nicklas |
286 |
filterable="true" |
7813 |
19 May 20 |
nicklas |
287 |
exportable="true" |
7813 |
19 May 20 |
nicklas |
288 |
/> |
7813 |
19 May 20 |
nicklas |
289 |
<tbl:columndef |
7813 |
19 May 20 |
nicklas |
290 |
id="disableSyncFilters" |
7813 |
19 May 20 |
nicklas |
291 |
property="disableSyncFilters" |
7813 |
19 May 20 |
nicklas |
292 |
datatype="boolean" |
7813 |
19 May 20 |
nicklas |
293 |
title="Locked (sync)" |
7813 |
19 May 20 |
nicklas |
294 |
sortable="true" |
7813 |
19 May 20 |
nicklas |
295 |
filterable="true" |
7813 |
19 May 20 |
nicklas |
296 |
exportable="true" |
7813 |
19 May 20 |
nicklas |
297 |
/> |
7813 |
19 May 20 |
nicklas |
298 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
299 |
id="owner" |
6742 |
17 Feb 15 |
nicklas |
300 |
property="owner.name" |
6742 |
17 Feb 15 |
nicklas |
301 |
datatype="string" |
6742 |
17 Feb 15 |
nicklas |
302 |
title="Owner" |
6742 |
17 Feb 15 |
nicklas |
303 |
sortable="true" |
6742 |
17 Feb 15 |
nicklas |
304 |
filterable="true" |
6742 |
17 Feb 15 |
nicklas |
305 |
exportable="true" |
6742 |
17 Feb 15 |
nicklas |
306 |
/> |
6742 |
17 Feb 15 |
nicklas |
307 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
308 |
id="description" |
6742 |
17 Feb 15 |
nicklas |
309 |
property="description" |
6742 |
17 Feb 15 |
nicklas |
310 |
datatype="string" |
6742 |
17 Feb 15 |
nicklas |
311 |
title="Description" |
6742 |
17 Feb 15 |
nicklas |
312 |
sortable="true" |
6742 |
17 Feb 15 |
nicklas |
313 |
filterable="true" |
6742 |
17 Feb 15 |
nicklas |
314 |
exportable="true" |
6742 |
17 Feb 15 |
nicklas |
315 |
/> |
6742 |
17 Feb 15 |
nicklas |
316 |
<% |
6742 |
17 Feb 15 |
nicklas |
317 |
for (AnnotationLoaderUtil loader : annotationLoaders) |
6742 |
17 Feb 15 |
nicklas |
318 |
{ |
6742 |
17 Feb 15 |
nicklas |
319 |
AnnotationType at = loader.getAnnotationType(); |
6742 |
17 Feb 15 |
nicklas |
320 |
Enumeration<String, String> annotationEnum = null; |
7605 |
26 Feb 19 |
nicklas |
321 |
Formatter<Object> formatter = FormatterFactory.getTypeFormatter(sc, at.getValueType()); |
6742 |
17 Feb 15 |
nicklas |
322 |
if (at.isEnumeration()) |
6742 |
17 Feb 15 |
nicklas |
323 |
{ |
6742 |
17 Feb 15 |
nicklas |
324 |
annotationEnum = new Enumeration<String, String>(); |
6784 |
18 Mar 15 |
nicklas |
325 |
if (!at.getDisplayAsList()) annotationEnum.add("", "-none-"); |
6742 |
17 Feb 15 |
nicklas |
326 |
List<?> values = at.getValues(); |
6742 |
17 Feb 15 |
nicklas |
327 |
for (Object value : values) |
6742 |
17 Feb 15 |
nicklas |
328 |
{ |
6742 |
17 Feb 15 |
nicklas |
329 |
String encoded = formatter.format(value); |
6742 |
17 Feb 15 |
nicklas |
330 |
annotationEnum.add(encoded, encoded); |
6742 |
17 Feb 15 |
nicklas |
331 |
} |
6742 |
17 Feb 15 |
nicklas |
332 |
} |
6742 |
17 Feb 15 |
nicklas |
333 |
%> |
6742 |
17 Feb 15 |
nicklas |
334 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
335 |
id="<%="at"+at.getId()%>" |
6742 |
17 Feb 15 |
nicklas |
336 |
title="<%=HTML.encodeTags(at.getName())+" [A]"%>" |
6742 |
17 Feb 15 |
nicklas |
337 |
property="<%="#"+at.getId()%>" |
6742 |
17 Feb 15 |
nicklas |
338 |
annotation="true" |
6742 |
17 Feb 15 |
nicklas |
339 |
datatype="<%=at.getValueType().getStringValue()%>" |
6742 |
17 Feb 15 |
nicklas |
340 |
enumeration="<%=annotationEnum%>" |
6742 |
17 Feb 15 |
nicklas |
341 |
smartenum="<%=at.getDisplayAsList() %>" |
6742 |
17 Feb 15 |
nicklas |
342 |
sortable="<%=at.getMultiplicity() == 1%>" |
6742 |
17 Feb 15 |
nicklas |
343 |
filterable="true" |
6742 |
17 Feb 15 |
nicklas |
344 |
exportable="true" |
6742 |
17 Feb 15 |
nicklas |
345 |
formatter="<%=formatter%>" |
6742 |
17 Feb 15 |
nicklas |
346 |
unit="<%=at.getDefaultUnit()%>" |
6742 |
17 Feb 15 |
nicklas |
347 |
/> |
6742 |
17 Feb 15 |
nicklas |
348 |
<% |
6742 |
17 Feb 15 |
nicklas |
349 |
} |
6742 |
17 Feb 15 |
nicklas |
350 |
%> |
6742 |
17 Feb 15 |
nicklas |
351 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
352 |
id="permission" |
6742 |
17 Feb 15 |
nicklas |
353 |
title="Permission" |
6742 |
17 Feb 15 |
nicklas |
354 |
/> |
6742 |
17 Feb 15 |
nicklas |
355 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
356 |
id="sharedTo" |
6742 |
17 Feb 15 |
nicklas |
357 |
title="Shared to" |
6742 |
17 Feb 15 |
nicklas |
358 |
filterable="true" |
6742 |
17 Feb 15 |
nicklas |
359 |
filterproperty="!sharedTo.name" |
6742 |
17 Feb 15 |
nicklas |
360 |
datatype="string" |
6742 |
17 Feb 15 |
nicklas |
361 |
/> |
6742 |
17 Feb 15 |
nicklas |
362 |
<tbl:columndef |
6742 |
17 Feb 15 |
nicklas |
363 |
id="xt-columns" |
6742 |
17 Feb 15 |
nicklas |
364 |
extensions="<%=columnsInvoker%>" |
6742 |
17 Feb 15 |
nicklas |
365 |
jspcontext="<%=jspContext%>" |
6742 |
17 Feb 15 |
nicklas |
366 |
/> |
6742 |
17 Feb 15 |
nicklas |
367 |
<div class="panelgroup bg-filled-50 bottomborder"> |
6742 |
17 Feb 15 |
nicklas |
368 |
<tbl:toolbar |
6742 |
17 Feb 15 |
nicklas |
369 |
subclass="bottomborder" |
6742 |
17 Feb 15 |
nicklas |
370 |
visible="<%=mode.hasToolbar()%>" |
6742 |
17 Feb 15 |
nicklas |
371 |
> |
6742 |
17 Feb 15 |
nicklas |
372 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
373 |
id="btnNewItem" |
6742 |
17 Feb 15 |
nicklas |
374 |
disabled="<%=!createPermission%>" |
6742 |
17 Feb 15 |
nicklas |
375 |
image="new.png" |
6742 |
17 Feb 15 |
nicklas |
376 |
title="New…" |
6742 |
17 Feb 15 |
nicklas |
377 |
tooltip="<%=createPermission ? "Create new item list" : "You do not have permission to create item lists"%>" |
6742 |
17 Feb 15 |
nicklas |
378 |
/> |
6742 |
17 Feb 15 |
nicklas |
379 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
380 |
id="btnDeleteItems" |
6742 |
17 Feb 15 |
nicklas |
381 |
image="delete.png" |
6742 |
17 Feb 15 |
nicklas |
382 |
title="Delete" |
6742 |
17 Feb 15 |
nicklas |
383 |
tooltip="Delete the selected items" |
6742 |
17 Feb 15 |
nicklas |
384 |
/> |
6742 |
17 Feb 15 |
nicklas |
385 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
386 |
id="btnRestoreItems" |
6742 |
17 Feb 15 |
nicklas |
387 |
image="restore.png" |
6742 |
17 Feb 15 |
nicklas |
388 |
title="Restore" |
6742 |
17 Feb 15 |
nicklas |
389 |
tooltip="Restore the selected (deleted) items" |
6742 |
17 Feb 15 |
nicklas |
390 |
/> |
6742 |
17 Feb 15 |
nicklas |
391 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
392 |
id="btnShareItems" |
6742 |
17 Feb 15 |
nicklas |
393 |
image="share.png" |
6742 |
17 Feb 15 |
nicklas |
394 |
title="Share…" |
6742 |
17 Feb 15 |
nicklas |
395 |
tooltip="Share the selected items" |
6742 |
17 Feb 15 |
nicklas |
396 |
/> |
6742 |
17 Feb 15 |
nicklas |
397 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
398 |
id="btnSetOwner" |
6742 |
17 Feb 15 |
nicklas |
399 |
image="take_ownership.png" |
6742 |
17 Feb 15 |
nicklas |
400 |
title="Set owner…" |
6742 |
17 Feb 15 |
nicklas |
401 |
tooltip="Change owner of the selected items" |
6742 |
17 Feb 15 |
nicklas |
402 |
/> |
6742 |
17 Feb 15 |
nicklas |
403 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
404 |
id="btnColumns" |
6742 |
17 Feb 15 |
nicklas |
405 |
image="columns.png" |
6742 |
17 Feb 15 |
nicklas |
406 |
title="Columns…" |
6742 |
17 Feb 15 |
nicklas |
407 |
tooltip="Show, hide and re-order columns" |
6742 |
17 Feb 15 |
nicklas |
408 |
/> |
6742 |
17 Feb 15 |
nicklas |
409 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
410 |
id="btnImport" |
6742 |
17 Feb 15 |
nicklas |
411 |
data-plugin-type="IMPORT" |
6742 |
17 Feb 15 |
nicklas |
412 |
image="import.png" |
6742 |
17 Feb 15 |
nicklas |
413 |
title="Import…" |
6742 |
17 Feb 15 |
nicklas |
414 |
tooltip="Import data" |
6742 |
17 Feb 15 |
nicklas |
415 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
6742 |
17 Feb 15 |
nicklas |
416 |
/> |
6742 |
17 Feb 15 |
nicklas |
417 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
418 |
id="btnExport" |
6742 |
17 Feb 15 |
nicklas |
419 |
data-plugin-type="EXPORT" |
6742 |
17 Feb 15 |
nicklas |
420 |
image="export.png" |
6742 |
17 Feb 15 |
nicklas |
421 |
title="Export…" |
6742 |
17 Feb 15 |
nicklas |
422 |
tooltip="Export data" |
6742 |
17 Feb 15 |
nicklas |
423 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
6742 |
17 Feb 15 |
nicklas |
424 |
/> |
6742 |
17 Feb 15 |
nicklas |
425 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
426 |
id="btnRunPlugin" |
6742 |
17 Feb 15 |
nicklas |
427 |
data-plugin-type="OTHER" |
6742 |
17 Feb 15 |
nicklas |
428 |
image="runplugin.png" |
6742 |
17 Feb 15 |
nicklas |
429 |
title="Run plugin…" |
6742 |
17 Feb 15 |
nicklas |
430 |
tooltip="Run a plugin" |
6742 |
17 Feb 15 |
nicklas |
431 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
6742 |
17 Feb 15 |
nicklas |
432 |
/> |
6742 |
17 Feb 15 |
nicklas |
433 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
434 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
6742 |
17 Feb 15 |
nicklas |
435 |
</tbl:toolbar> |
6742 |
17 Feb 15 |
nicklas |
436 |
<tbl:panel> |
6742 |
17 Feb 15 |
nicklas |
437 |
<tbl:presetselector /> |
6742 |
17 Feb 15 |
nicklas |
438 |
<tbl:navigator |
6742 |
17 Feb 15 |
nicklas |
439 |
page="<%=cc.getPage()%>" |
6742 |
17 Feb 15 |
nicklas |
440 |
rowsperpage="<%=cc.getRowsPerPage()%>" |
6742 |
17 Feb 15 |
nicklas |
441 |
totalrows="<%=lists == null ? 0 : lists.getTotalCount()%>" |
6742 |
17 Feb 15 |
nicklas |
442 |
visible="<%=mode.hasNavigator()%>" |
6742 |
17 Feb 15 |
nicklas |
443 |
/> |
6742 |
17 Feb 15 |
nicklas |
444 |
</tbl:panel> |
6742 |
17 Feb 15 |
nicklas |
445 |
</div> |
6742 |
17 Feb 15 |
nicklas |
446 |
<tbl:data> |
6742 |
17 Feb 15 |
nicklas |
447 |
<tbl:headers> |
6742 |
17 Feb 15 |
nicklas |
448 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
449 |
<tbl:header clazz="row-index bg-filled-100" /> |
6742 |
17 Feb 15 |
nicklas |
450 |
<tbl:columnheaders /> |
6742 |
17 Feb 15 |
nicklas |
451 |
</tbl:headerrow> |
6742 |
17 Feb 15 |
nicklas |
452 |
<% |
6742 |
17 Feb 15 |
nicklas |
453 |
int numFilters = cc.getNumPropertyFilters(); |
6742 |
17 Feb 15 |
nicklas |
454 |
int numRows = cc.getFilterRows(); |
6742 |
17 Feb 15 |
nicklas |
455 |
for (int filterNo = 0; filterNo < numRows; filterNo++) |
6742 |
17 Feb 15 |
nicklas |
456 |
{ |
6742 |
17 Feb 15 |
nicklas |
457 |
boolean lastRow = filterNo == numRows-1; |
6742 |
17 Feb 15 |
nicklas |
458 |
%> |
6742 |
17 Feb 15 |
nicklas |
459 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
460 |
<tbl:header subclass="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
461 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
462 |
<div class="index"></div> |
7943 |
04 May 21 |
nicklas |
463 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
464 |
<base:icon |
7943 |
04 May 21 |
nicklas |
465 |
subclass="link table-check" |
7943 |
04 May 21 |
nicklas |
466 |
image="check_uncheck.png" |
7943 |
04 May 21 |
nicklas |
467 |
tooltip="Toggle all (use CTRL, ALT or SHIFT to check/uncheck)" |
7943 |
04 May 21 |
nicklas |
468 |
visible="<%=lastRow && mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
469 |
/> |
7943 |
04 May 21 |
nicklas |
470 |
</div> |
7943 |
04 May 21 |
nicklas |
471 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
472 |
<base:icon |
7943 |
04 May 21 |
nicklas |
473 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
474 |
image="add.png" |
7943 |
04 May 21 |
nicklas |
475 |
tooltip="Add extra filter row" |
7943 |
04 May 21 |
nicklas |
476 |
visible="<%=lastRow%>" |
7943 |
04 May 21 |
nicklas |
477 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
478 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
479 |
image="remove.png" |
7943 |
04 May 21 |
nicklas |
480 |
tooltip="Remove this filter row" |
7943 |
04 May 21 |
nicklas |
481 |
visible="<%=numRows > 1 || numFilters > 0 %>" |
7943 |
04 May 21 |
nicklas |
482 |
data-remove-row="<%=filterNo%>" |
7943 |
04 May 21 |
nicklas |
483 |
/> |
7943 |
04 May 21 |
nicklas |
484 |
</div> |
7943 |
04 May 21 |
nicklas |
485 |
</div> |
6742 |
17 Feb 15 |
nicklas |
486 |
</tbl:header> |
6742 |
17 Feb 15 |
nicklas |
487 |
<tbl:propertyfilter row="<%=filterNo%>" /> |
6742 |
17 Feb 15 |
nicklas |
488 |
</tbl:headerrow> |
6742 |
17 Feb 15 |
nicklas |
489 |
<% |
6742 |
17 Feb 15 |
nicklas |
490 |
} |
6742 |
17 Feb 15 |
nicklas |
491 |
%> |
7913 |
22 Feb 21 |
nicklas |
492 |
<tbl:columnsubtitles /> |
6742 |
17 Feb 15 |
nicklas |
493 |
</tbl:headers> |
6742 |
17 Feb 15 |
nicklas |
494 |
<tbl:rows> |
6742 |
17 Feb 15 |
nicklas |
495 |
<% |
6742 |
17 Feb 15 |
nicklas |
496 |
if (cc.getMessage() != null) |
6742 |
17 Feb 15 |
nicklas |
497 |
{ |
6742 |
17 Feb 15 |
nicklas |
498 |
%> |
6742 |
17 Feb 15 |
nicklas |
499 |
<tbl:panel subclass="bg-filled-50"> |
6742 |
17 Feb 15 |
nicklas |
500 |
<div class="messagecontainer error"><%=cc.getMessage()%></div> |
6742 |
17 Feb 15 |
nicklas |
501 |
</tbl:panel> |
6742 |
17 Feb 15 |
nicklas |
502 |
<% |
6742 |
17 Feb 15 |
nicklas |
503 |
cc.setMessage(null); |
6742 |
17 Feb 15 |
nicklas |
504 |
} |
6742 |
17 Feb 15 |
nicklas |
505 |
int index = cc.getPage()*cc.getRowsPerPage(); |
6742 |
17 Feb 15 |
nicklas |
506 |
int selectedItemId = cc.getId(); |
6742 |
17 Feb 15 |
nicklas |
507 |
if (lists != null) |
6742 |
17 Feb 15 |
nicklas |
508 |
{ |
6742 |
17 Feb 15 |
nicklas |
509 |
while (lists.hasNext()) |
6742 |
17 Feb 15 |
nicklas |
510 |
{ |
6742 |
17 Feb 15 |
nicklas |
511 |
ItemList item = lists.next(); |
6742 |
17 Feb 15 |
nicklas |
512 |
int itemId = item.getId(); |
6742 |
17 Feb 15 |
nicklas |
513 |
|
6742 |
17 Feb 15 |
nicklas |
514 |
|
6742 |
17 Feb 15 |
nicklas |
515 |
boolean deletePermission = item.hasPermission(Permission.DELETE); |
6742 |
17 Feb 15 |
nicklas |
516 |
boolean sharePermission = item.hasPermission(Permission.SET_PERMISSION); |
6742 |
17 Feb 15 |
nicklas |
517 |
boolean usePermission = item.hasPermission(Permission.USE); |
6742 |
17 Feb 15 |
nicklas |
518 |
boolean writePermission = item.hasPermission(Permission.WRITE); |
6742 |
17 Feb 15 |
nicklas |
519 |
String tooltip = mode.isSelectionMode() ? |
6742 |
17 Feb 15 |
nicklas |
520 |
"Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : ""); |
6742 |
17 Feb 15 |
nicklas |
521 |
String name = HTML.encodeTags(item.getName()); |
6742 |
17 Feb 15 |
nicklas |
522 |
index++; |
6742 |
17 Feb 15 |
nicklas |
523 |
numListed++; |
6742 |
17 Feb 15 |
nicklas |
524 |
%> |
6742 |
17 Feb 15 |
nicklas |
525 |
<tbl:row> |
7943 |
04 May 21 |
nicklas |
526 |
<tbl:header clazz="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
527 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
528 |
<div class="index <%=index>999?"index-smaller":""%>"><%=index%></div> |
7943 |
04 May 21 |
nicklas |
529 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
530 |
<base:input |
7943 |
04 May 21 |
nicklas |
531 |
type="checkbox" |
7943 |
04 May 21 |
nicklas |
532 |
name="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
533 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
534 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
535 |
checked="<%=cc.getSelected().contains(itemId)%>" |
7943 |
04 May 21 |
nicklas |
536 |
visible="<%=mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
537 |
/> |
7943 |
04 May 21 |
nicklas |
538 |
<base:input |
7943 |
04 May 21 |
nicklas |
539 |
type="radio" |
7943 |
04 May 21 |
nicklas |
540 |
name="item_id" |
7943 |
04 May 21 |
nicklas |
541 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
542 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
543 |
checked="<%=selectedItemId == itemId%>" |
7943 |
04 May 21 |
nicklas |
544 |
visible="<%=mode.hasRadio()%>" |
7943 |
04 May 21 |
nicklas |
545 |
/> |
7943 |
04 May 21 |
nicklas |
546 |
</div> |
7943 |
04 May 21 |
nicklas |
547 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
548 |
<base:icon |
7943 |
04 May 21 |
nicklas |
549 |
image="deleted.png" |
7943 |
04 May 21 |
nicklas |
550 |
id="<%="delete."+itemId %>" |
7943 |
04 May 21 |
nicklas |
551 |
subclass="<%=deletePermission ? "table-delete-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
552 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
553 |
tooltip="This item has been scheduled for deletion" |
7943 |
04 May 21 |
nicklas |
554 |
visible="<%=item.isRemoved()%>" |
7943 |
04 May 21 |
nicklas |
555 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
556 |
image="shared.png" |
7943 |
04 May 21 |
nicklas |
557 |
id="<%="share."+itemId %>" |
7943 |
04 May 21 |
nicklas |
558 |
subclass="<%=sharePermission ? "table-share-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
559 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
560 |
tooltip="This item is shared to other users, groups and/or projects" |
7943 |
04 May 21 |
nicklas |
561 |
visible="<%=item.isShared()%>" |
7943 |
04 May 21 |
nicklas |
562 |
/> |
7943 |
04 May 21 |
nicklas |
563 |
<base:icon |
7943 |
04 May 21 |
nicklas |
564 |
image="copy.png" |
7943 |
04 May 21 |
nicklas |
565 |
id="<%="clone."+itemId %>" |
7943 |
04 May 21 |
nicklas |
566 |
tooltip="Create a new list using this as a template" |
7943 |
04 May 21 |
nicklas |
567 |
subclass="auto-init" |
7943 |
04 May 21 |
nicklas |
568 |
data-auto-init="clone" |
7943 |
04 May 21 |
nicklas |
569 |
data-item-id="<%=itemId %>" |
7943 |
04 May 21 |
nicklas |
570 |
visible="<%=createPermission%>" |
7943 |
04 May 21 |
nicklas |
571 |
/> |
7943 |
04 May 21 |
nicklas |
572 |
</div> |
7943 |
04 May 21 |
nicklas |
573 |
</div> |
7943 |
04 May 21 |
nicklas |
574 |
</tbl:header> |
6742 |
17 Feb 15 |
nicklas |
575 |
<tbl:cell column="name"><div |
6742 |
17 Feb 15 |
nicklas |
576 |
class="link table-item" |
6742 |
17 Feb 15 |
nicklas |
577 |
data-item-id="<%=itemId%>" |
6742 |
17 Feb 15 |
nicklas |
578 |
data-no-edit="<%=writePermission ? 0 : 1 %>" |
6742 |
17 Feb 15 |
nicklas |
579 |
tabindex="0" |
6742 |
17 Feb 15 |
nicklas |
580 |
title="<%=tooltip%>"><%=name%></div></tbl:cell> |
6742 |
17 Feb 15 |
nicklas |
581 |
<tbl:cell column="id"><%=item.getId()%></tbl:cell> |
6742 |
17 Feb 15 |
nicklas |
582 |
<tbl:cell column="size"><%=item.getSize()%></tbl:cell> |
6773 |
16 Mar 15 |
nicklas |
583 |
<tbl:cell column="syncDate" value="<%=item.getSyncDate()%>" /> |
6742 |
17 Feb 15 |
nicklas |
584 |
<tbl:cell column="externalId"><%=HTML.encodeTags(item.getExternalId())%></tbl:cell> |
6742 |
17 Feb 15 |
nicklas |
585 |
<tbl:cell column="memberType"><%=item.getMemberType()%></tbl:cell> |
6753 |
20 Feb 15 |
nicklas |
586 |
<tbl:cell column="itemSubtype"><base:propertyvalue |
6753 |
20 Feb 15 |
nicklas |
587 |
item="<%=item%>" |
6753 |
20 Feb 15 |
nicklas |
588 |
property="itemSubtype" |
6753 |
20 Feb 15 |
nicklas |
589 |
nulltext="" |
6753 |
20 Feb 15 |
nicklas |
590 |
enableEditLink="<%=mode.hasEditLink()%>" |
6753 |
20 Feb 15 |
nicklas |
591 |
enablePropertyLink="<%=mode.hasPropertyLink()%>" |
6753 |
20 Feb 15 |
nicklas |
592 |
/></tbl:cell> |
6753 |
20 Feb 15 |
nicklas |
593 |
<tbl:cell column="rawDataType"><%=HTML.encodeTags(item.getRawDataType() != null ? item.getRawDataType().getName() : "")%></tbl:cell> |
7813 |
19 May 20 |
nicklas |
594 |
<tbl:cell column="disableManualMembers"><%=item.getDisableManualMembers() ? "Yes" : "No" %></tbl:cell> |
7813 |
19 May 20 |
nicklas |
595 |
<tbl:cell column="disableSyncFilters"><%=item.getDisableSyncFilters() ? "Yes" : "No" %></tbl:cell> |
6742 |
17 Feb 15 |
nicklas |
596 |
<tbl:cell column="owner" |
6742 |
17 Feb 15 |
nicklas |
597 |
><base:propertyvalue |
6742 |
17 Feb 15 |
nicklas |
598 |
item="<%=item%>" |
6742 |
17 Feb 15 |
nicklas |
599 |
property="owner" |
6742 |
17 Feb 15 |
nicklas |
600 |
enableEditLink="<%=mode.hasEditLink()%>" |
6742 |
17 Feb 15 |
nicklas |
601 |
enablePropertyLink="<%=mode.hasPropertyLink()%>" |
6742 |
17 Feb 15 |
nicklas |
602 |
/></tbl:cell> |
6742 |
17 Feb 15 |
nicklas |
603 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
6742 |
17 Feb 15 |
nicklas |
604 |
<% |
6742 |
17 Feb 15 |
nicklas |
605 |
if (item.isAnnotated()) |
6742 |
17 Feb 15 |
nicklas |
606 |
{ |
6742 |
17 Feb 15 |
nicklas |
607 |
AnnotationSetSnapshot snapshot = manager.getSnapshot(dc, item.getAnnotationSet().getId()); |
6742 |
17 Feb 15 |
nicklas |
608 |
for (AnnotationLoaderUtil loader : annotationLoaders) |
6742 |
17 Feb 15 |
nicklas |
609 |
{ |
6742 |
17 Feb 15 |
nicklas |
610 |
%> |
6742 |
17 Feb 15 |
nicklas |
611 |
<tbl:cell |
6742 |
17 Feb 15 |
nicklas |
612 |
column="<%="at"+loader.getId()%>" |
6742 |
17 Feb 15 |
nicklas |
613 |
><% |
7337 |
12 Apr 17 |
nicklas |
614 |
if (loader.find(snapshot, psInfo.reset())) |
6742 |
17 Feb 15 |
nicklas |
615 |
{ |
6742 |
17 Feb 15 |
nicklas |
616 |
%><tbl:cellvalue |
6742 |
17 Feb 15 |
nicklas |
617 |
list="<%=loader.getValues()%>" |
8160 |
07 Jun 23 |
nicklas |
618 |
bulletlist="<%=loader.useBulletList() %>" |
6742 |
17 Feb 15 |
nicklas |
619 |
suffix="<%=loader.getUnitSymbol()%>" |
8083 |
20 Oct 22 |
nicklas |
620 |
clazz="<%=psInfo.hasProjectSpecificAnnotation() ? "ps-annotation" : null%>" |
6742 |
17 Feb 15 |
nicklas |
621 |
/><% |
6742 |
17 Feb 15 |
nicklas |
622 |
} |
6742 |
17 Feb 15 |
nicklas |
623 |
%></tbl:cell> |
6742 |
17 Feb 15 |
nicklas |
624 |
<% |
6742 |
17 Feb 15 |
nicklas |
625 |
} |
6742 |
17 Feb 15 |
nicklas |
626 |
} |
6742 |
17 Feb 15 |
nicklas |
627 |
%> |
6742 |
17 Feb 15 |
nicklas |
628 |
<tbl:cell column="permission"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell> |
6742 |
17 Feb 15 |
nicklas |
629 |
<tbl:cell column="sharedTo"> |
6742 |
17 Feb 15 |
nicklas |
630 |
<% |
6742 |
17 Feb 15 |
nicklas |
631 |
Iterator<Nameable> sharees = ShareableUtil.getSharedTo(dc, item).iterator(); |
6742 |
17 Feb 15 |
nicklas |
632 |
while(sharees.hasNext()) |
6742 |
17 Feb 15 |
nicklas |
633 |
{ |
6742 |
17 Feb 15 |
nicklas |
634 |
Nameable n = sharees.next(); |
6742 |
17 Feb 15 |
nicklas |
635 |
if (mode.hasPropertyLink()) |
6742 |
17 Feb 15 |
nicklas |
636 |
{ |
6742 |
17 Feb 15 |
nicklas |
637 |
out.write(Base.getLinkedName(ID, n, false, mode.hasEditLink())); |
6742 |
17 Feb 15 |
nicklas |
638 |
} |
6742 |
17 Feb 15 |
nicklas |
639 |
else |
6742 |
17 Feb 15 |
nicklas |
640 |
{ |
6742 |
17 Feb 15 |
nicklas |
641 |
out.write(HTML.encodeTags(n.getName())); |
6742 |
17 Feb 15 |
nicklas |
642 |
} |
6742 |
17 Feb 15 |
nicklas |
643 |
out.write(sharees.hasNext() ? ", " : ""); |
6742 |
17 Feb 15 |
nicklas |
644 |
} |
6742 |
17 Feb 15 |
nicklas |
645 |
%> |
6742 |
17 Feb 15 |
nicklas |
646 |
</tbl:cell> |
6742 |
17 Feb 15 |
nicklas |
647 |
<tbl:xt-cells dc="<%=dc%>" item="<%=item%>"> |
6742 |
17 Feb 15 |
nicklas |
648 |
<tbl:cell column="xt-columns" /> |
6742 |
17 Feb 15 |
nicklas |
649 |
</tbl:xt-cells> |
6742 |
17 Feb 15 |
nicklas |
650 |
</tbl:row> |
6742 |
17 Feb 15 |
nicklas |
651 |
<% |
6742 |
17 Feb 15 |
nicklas |
652 |
} |
6742 |
17 Feb 15 |
nicklas |
653 |
} |
6742 |
17 Feb 15 |
nicklas |
654 |
if (numListed == 0) |
6742 |
17 Feb 15 |
nicklas |
655 |
{ |
6742 |
17 Feb 15 |
nicklas |
656 |
%> |
6742 |
17 Feb 15 |
nicklas |
657 |
<tbl:panel subclass="bg-filled-50"> |
6742 |
17 Feb 15 |
nicklas |
658 |
<div class="messagecontainer note"> |
6742 |
17 Feb 15 |
nicklas |
659 |
<%=lists == null || lists.getTotalCount() == 0 ? "No lists were found" : "No lists on this page. Please select another page!" %> |
6742 |
17 Feb 15 |
nicklas |
660 |
</div> |
6742 |
17 Feb 15 |
nicklas |
661 |
</tbl:panel> |
6742 |
17 Feb 15 |
nicklas |
662 |
<% |
6742 |
17 Feb 15 |
nicklas |
663 |
} |
6742 |
17 Feb 15 |
nicklas |
664 |
%> |
6742 |
17 Feb 15 |
nicklas |
665 |
</tbl:rows> |
6742 |
17 Feb 15 |
nicklas |
666 |
</tbl:data> |
6742 |
17 Feb 15 |
nicklas |
667 |
</tbl:table> |
6742 |
17 Feb 15 |
nicklas |
668 |
</div> |
6742 |
17 Feb 15 |
nicklas |
669 |
|
6742 |
17 Feb 15 |
nicklas |
670 |
<base:buttongroup subclass="dialogbuttons"> |
6742 |
17 Feb 15 |
nicklas |
671 |
<base:button id="btnOk" title="Ok" visible="<%=mode.hasOkButton()%>" /> |
6742 |
17 Feb 15 |
nicklas |
672 |
<base:button id="close" title="Cancel" visible="<%=mode.hasCancelButton()%>" /> |
6742 |
17 Feb 15 |
nicklas |
673 |
<base:button id="close" title="Close" visible="<%=mode.hasCloseButton()%>" /> |
6742 |
17 Feb 15 |
nicklas |
674 |
</base:buttongroup> |
6742 |
17 Feb 15 |
nicklas |
675 |
|
6742 |
17 Feb 15 |
nicklas |
676 |
</base:body> |
6742 |
17 Feb 15 |
nicklas |
677 |
</base:page> |
6742 |
17 Feb 15 |
nicklas |
678 |
<% |
6742 |
17 Feb 15 |
nicklas |
679 |
} |
6742 |
17 Feb 15 |
nicklas |
680 |
finally |
6742 |
17 Feb 15 |
nicklas |
681 |
{ |
6742 |
17 Feb 15 |
nicklas |
682 |
if (lists != null) lists.close(); |
6742 |
17 Feb 15 |
nicklas |
683 |
if (dc != null) dc.close(); |
6742 |
17 Feb 15 |
nicklas |
684 |
} |
6742 |
17 Feb 15 |
nicklas |
685 |
%> |