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