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