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