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 |
Copyright (C) 2007 Nicklas Nordborg |
4704 |
11 Dec 08 |
martin |
6 |
|
4704 |
11 Dec 08 |
martin |
7 |
This file is part of BASE - BioArray Software Environment. |
4704 |
11 Dec 08 |
martin |
8 |
Available at http://base.thep.lu.se/ |
4704 |
11 Dec 08 |
martin |
9 |
|
4704 |
11 Dec 08 |
martin |
10 |
BASE is free software; you can redistribute it and/or |
4704 |
11 Dec 08 |
martin |
11 |
modify it under the terms of the GNU General Public License |
4704 |
11 Dec 08 |
martin |
12 |
as published by the Free Software Foundation; either version 3 |
4704 |
11 Dec 08 |
martin |
13 |
of the License, or (at your option) any later version. |
4704 |
11 Dec 08 |
martin |
14 |
|
4704 |
11 Dec 08 |
martin |
15 |
BASE is distributed in the hope that it will be useful, |
4704 |
11 Dec 08 |
martin |
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
4704 |
11 Dec 08 |
martin |
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4704 |
11 Dec 08 |
martin |
18 |
GNU General Public License for more details. |
4704 |
11 Dec 08 |
martin |
19 |
|
4704 |
11 Dec 08 |
martin |
20 |
You should have received a copy of the GNU General Public License |
4704 |
11 Dec 08 |
martin |
21 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
4704 |
11 Dec 08 |
martin |
22 |
------------------------------------------------------------------ |
4704 |
11 Dec 08 |
martin |
23 |
|
4704 |
11 Dec 08 |
martin |
24 |
@author Martin |
4704 |
11 Dec 08 |
martin |
25 |
@version 2.10 |
4704 |
11 Dec 08 |
martin |
26 |
--%> |
5426 |
24 Sep 10 |
nicklas |
27 |
<%@ page pageEncoding="UTF-8" session="false" |
4704 |
11 Dec 08 |
martin |
28 |
import="net.sf.basedb.core.SessionControl" |
4704 |
11 Dec 08 |
martin |
29 |
import="net.sf.basedb.core.DbControl" |
4704 |
11 Dec 08 |
martin |
30 |
import="net.sf.basedb.core.Item" |
4732 |
21 Jan 09 |
martin |
31 |
import="net.sf.basedb.core.Hardware" |
4704 |
11 Dec 08 |
martin |
32 |
import="net.sf.basedb.core.ItemContext" |
4704 |
11 Dec 08 |
martin |
33 |
import="net.sf.basedb.core.SystemItems" |
4704 |
11 Dec 08 |
martin |
34 |
import="net.sf.basedb.core.Permission" |
4704 |
11 Dec 08 |
martin |
35 |
import="net.sf.basedb.core.Include" |
4704 |
11 Dec 08 |
martin |
36 |
import="net.sf.basedb.core.BioPlate" |
5262 |
08 Mar 10 |
nicklas |
37 |
import="net.sf.basedb.core.BioPlateType" |
6056 |
12 Jun 12 |
nicklas |
38 |
import="net.sf.basedb.core.ItemSubtype" |
6056 |
12 Jun 12 |
nicklas |
39 |
import="net.sf.basedb.core.Project" |
4704 |
11 Dec 08 |
martin |
40 |
import="net.sf.basedb.core.ItemQuery" |
4704 |
11 Dec 08 |
martin |
41 |
import="net.sf.basedb.core.ItemResultList" |
4704 |
11 Dec 08 |
martin |
42 |
import="net.sf.basedb.core.PermissionDeniedException" |
4704 |
11 Dec 08 |
martin |
43 |
import="net.sf.basedb.core.PlateGeometry" |
4704 |
11 Dec 08 |
martin |
44 |
import="net.sf.basedb.core.BaseException" |
4704 |
11 Dec 08 |
martin |
45 |
import="net.sf.basedb.core.query.Orders" |
4704 |
11 Dec 08 |
martin |
46 |
import="net.sf.basedb.core.query.Hql" |
4704 |
11 Dec 08 |
martin |
47 |
import="net.sf.basedb.clients.web.Base" |
4704 |
11 Dec 08 |
martin |
48 |
import="net.sf.basedb.clients.web.util.HTML" |
4704 |
11 Dec 08 |
martin |
49 |
import="net.sf.basedb.util.Values" |
5492 |
16 Nov 10 |
nicklas |
50 |
import="net.sf.basedb.core.plugin.GuiContext" |
5492 |
16 Nov 10 |
nicklas |
51 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5492 |
16 Nov 10 |
nicklas |
52 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5492 |
16 Nov 10 |
nicklas |
53 |
import="net.sf.basedb.clients.web.extensions.edit.EditUtil" |
7604 |
25 Feb 19 |
nicklas |
54 |
import="net.sf.basedb.clients.web.extensions.tabcontrol.TabAction" |
5996 |
05 Mar 12 |
nicklas |
55 |
import="net.sf.basedb.util.formatter.Formatter" |
5996 |
05 Mar 12 |
nicklas |
56 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
5996 |
05 Mar 12 |
nicklas |
57 |
import="net.sf.basedb.clients.web.formatter.FormatterSettings" |
5492 |
16 Nov 10 |
nicklas |
58 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
4704 |
11 Dec 08 |
martin |
59 |
import="java.util.List" |
4704 |
11 Dec 08 |
martin |
60 |
import="java.util.Set" |
4704 |
11 Dec 08 |
martin |
61 |
import="java.util.HashSet" |
4704 |
11 Dec 08 |
martin |
62 |
import="java.util.Date" |
4704 |
11 Dec 08 |
martin |
63 |
%> |
4704 |
11 Dec 08 |
martin |
64 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
4704 |
11 Dec 08 |
martin |
65 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
6145 |
21 Sep 12 |
nicklas |
66 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
4704 |
11 Dec 08 |
martin |
67 |
<% |
4704 |
11 Dec 08 |
martin |
68 |
final Item itemType = Item.BIOPLATE; |
4704 |
11 Dec 08 |
martin |
69 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
4704 |
11 Dec 08 |
martin |
70 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
4704 |
11 Dec 08 |
martin |
71 |
final int itemId = cc.getId(); |
4704 |
11 Dec 08 |
martin |
72 |
final String ID = sc.getId(); |
4704 |
11 Dec 08 |
martin |
73 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
74 |
final DbControl dc = sc.newDbControl(":Edit "+itemType); |
4704 |
11 Dec 08 |
martin |
75 |
try |
4704 |
11 Dec 08 |
martin |
76 |
{ |
4704 |
11 Dec 08 |
martin |
77 |
String title = null; |
4704 |
11 Dec 08 |
martin |
78 |
BioPlate bioplate = null; |
5996 |
05 Mar 12 |
nicklas |
79 |
Date eventDate = null; |
4704 |
11 Dec 08 |
martin |
80 |
|
4704 |
11 Dec 08 |
martin |
81 |
boolean readCurrentPlateGeometry = true; |
4704 |
11 Dec 08 |
martin |
82 |
PlateGeometry currentPlateGeometry = null; |
5262 |
08 Mar 10 |
nicklas |
83 |
boolean readCurrentBioPlateType = true; |
5262 |
08 Mar 10 |
nicklas |
84 |
BioPlateType currentBioPlateType = null; |
6056 |
12 Jun 12 |
nicklas |
85 |
ItemSubtype currentStorageType = null; |
4704 |
11 Dec 08 |
martin |
86 |
|
4732 |
21 Jan 09 |
martin |
87 |
boolean readCurrentFreezer = true; |
4732 |
21 Jan 09 |
martin |
88 |
Hardware currentFreezer = null; |
4732 |
21 Jan 09 |
martin |
89 |
|
4704 |
11 Dec 08 |
martin |
90 |
if (itemId == 0) |
4704 |
11 Dec 08 |
martin |
91 |
{ |
4704 |
11 Dec 08 |
martin |
92 |
title = "Create bioplate"; |
4704 |
11 Dec 08 |
martin |
93 |
cc.removeObject("item"); |
4704 |
11 Dec 08 |
martin |
94 |
|
4704 |
11 Dec 08 |
martin |
95 |
int plateGeometryId = Values.getInt(request.getParameter("plategeometry_id")); |
4704 |
11 Dec 08 |
martin |
96 |
if (plateGeometryId != 0) |
4704 |
11 Dec 08 |
martin |
97 |
{ |
4704 |
11 Dec 08 |
martin |
98 |
currentPlateGeometry = PlateGeometry.getById(dc, plateGeometryId); |
4704 |
11 Dec 08 |
martin |
99 |
} |
4704 |
11 Dec 08 |
martin |
100 |
else if (cc.getPropertyFilter("plateType.name") != null) |
4704 |
11 Dec 08 |
martin |
101 |
{ |
4704 |
11 Dec 08 |
martin |
102 |
currentPlateGeometry = Base.getFirstMatching(dc, PlateGeometry.getQuery(), "name", cc.getPropertyFilter("plateGeometry.name")); |
4704 |
11 Dec 08 |
martin |
103 |
} |
5262 |
08 Mar 10 |
nicklas |
104 |
int bioPlateTypeId = Values.getInt(request.getParameter("bioplatetype_id")); |
5262 |
08 Mar 10 |
nicklas |
105 |
if (bioPlateTypeId != 0) |
5262 |
08 Mar 10 |
nicklas |
106 |
{ |
5262 |
08 Mar 10 |
nicklas |
107 |
currentBioPlateType = BioPlateType.getById(dc, bioPlateTypeId); |
5262 |
08 Mar 10 |
nicklas |
108 |
} |
5262 |
08 Mar 10 |
nicklas |
109 |
else if (cc.getPropertyFilter("bioPlateType.name") != null) |
5262 |
08 Mar 10 |
nicklas |
110 |
{ |
5262 |
08 Mar 10 |
nicklas |
111 |
currentBioPlateType = Base.getFirstMatching(dc, BioPlateType.getQuery(), "name", cc.getPropertyFilter("bioPlateType.name")); |
6056 |
12 Jun 12 |
nicklas |
112 |
if (currentBioPlateType != null) |
6056 |
12 Jun 12 |
nicklas |
113 |
{ |
6056 |
12 Jun 12 |
nicklas |
114 |
currentStorageType = currentBioPlateType.getStorageType(); |
6056 |
12 Jun 12 |
nicklas |
115 |
} |
5262 |
08 Mar 10 |
nicklas |
116 |
} |
4732 |
21 Jan 09 |
martin |
117 |
|
4732 |
21 Jan 09 |
martin |
118 |
int freezerId = Values.getInt(request.getParameter("freezer_id")); |
4732 |
21 Jan 09 |
martin |
119 |
if (freezerId != 0) |
4732 |
21 Jan 09 |
martin |
120 |
{ |
4732 |
21 Jan 09 |
martin |
121 |
currentFreezer = Hardware.getById(dc, freezerId); |
4732 |
21 Jan 09 |
martin |
122 |
} |
7605 |
26 Feb 19 |
nicklas |
123 |
eventDate = cc.getPropertyObject("eventDate"); |
4704 |
11 Dec 08 |
martin |
124 |
} |
4704 |
11 Dec 08 |
martin |
125 |
else |
4704 |
11 Dec 08 |
martin |
126 |
{ |
4704 |
11 Dec 08 |
martin |
127 |
bioplate = BioPlate.getById(dc, itemId); |
6306 |
13 Aug 13 |
nicklas |
128 |
bioplate.checkPermission(Permission.WRITE); |
4704 |
11 Dec 08 |
martin |
129 |
cc.setObject("item", bioplate); |
4704 |
11 Dec 08 |
martin |
130 |
title = "Edit bioplate -- " + HTML.encodeTags(bioplate.getName()); |
5996 |
05 Mar 12 |
nicklas |
131 |
eventDate = bioplate.getEventDate(); |
4704 |
11 Dec 08 |
martin |
132 |
try |
4704 |
11 Dec 08 |
martin |
133 |
{ |
4704 |
11 Dec 08 |
martin |
134 |
currentPlateGeometry = bioplate.getPlateGeometry(); |
4704 |
11 Dec 08 |
martin |
135 |
} |
4704 |
11 Dec 08 |
martin |
136 |
catch (PermissionDeniedException ex) |
4704 |
11 Dec 08 |
martin |
137 |
{ |
4704 |
11 Dec 08 |
martin |
138 |
readCurrentPlateGeometry = false; |
4704 |
11 Dec 08 |
martin |
139 |
} |
4732 |
21 Jan 09 |
martin |
140 |
try |
4732 |
21 Jan 09 |
martin |
141 |
{ |
5262 |
08 Mar 10 |
nicklas |
142 |
currentBioPlateType = bioplate.getBioPlateType(); |
6056 |
12 Jun 12 |
nicklas |
143 |
currentStorageType = currentBioPlateType.getStorageType(); |
5262 |
08 Mar 10 |
nicklas |
144 |
} |
5262 |
08 Mar 10 |
nicklas |
145 |
catch (PermissionDeniedException ex) |
5262 |
08 Mar 10 |
nicklas |
146 |
{ |
5262 |
08 Mar 10 |
nicklas |
147 |
readCurrentBioPlateType = false; |
5262 |
08 Mar 10 |
nicklas |
148 |
} |
5262 |
08 Mar 10 |
nicklas |
149 |
try |
5262 |
08 Mar 10 |
nicklas |
150 |
{ |
4732 |
21 Jan 09 |
martin |
151 |
currentFreezer = bioplate.getFreezer(); |
4732 |
21 Jan 09 |
martin |
152 |
} |
4732 |
21 Jan 09 |
martin |
153 |
catch (PermissionDeniedException ex) |
4732 |
21 Jan 09 |
martin |
154 |
{ |
4732 |
21 Jan 09 |
martin |
155 |
readCurrentFreezer = false; |
4732 |
21 Jan 09 |
martin |
156 |
} |
4704 |
11 Dec 08 |
martin |
157 |
} |
6056 |
12 Jun 12 |
nicklas |
158 |
|
6056 |
12 Jun 12 |
nicklas |
159 |
// Load default items |
6056 |
12 Jun 12 |
nicklas |
160 |
int activeProjectId = sc.getActiveProjectId(); |
6056 |
12 Jun 12 |
nicklas |
161 |
List<Hardware> defaultFreezers = null; |
6056 |
12 Jun 12 |
nicklas |
162 |
if (activeProjectId > 0) |
6056 |
12 Jun 12 |
nicklas |
163 |
{ |
6056 |
12 Jun 12 |
nicklas |
164 |
Project activeProject = Project.getById(dc, activeProjectId); |
6056 |
12 Jun 12 |
nicklas |
165 |
if (currentStorageType == null) currentStorageType = ItemSubtype.getById(dc, SystemItems.getId(Hardware.FREEZER)); |
7605 |
26 Feb 19 |
nicklas |
166 |
defaultFreezers = activeProject.findDefaultItems(dc, currentStorageType, false); |
6056 |
12 Jun 12 |
nicklas |
167 |
} |
6056 |
12 Jun 12 |
nicklas |
168 |
|
6056 |
12 Jun 12 |
nicklas |
169 |
// Load recently used items |
7605 |
26 Feb 19 |
nicklas |
170 |
List<Hardware> recentFreezers = cc.getRecent(dc, Item.HARDWARE, currentStorageType); |
7605 |
26 Feb 19 |
nicklas |
171 |
List<PlateGeometry> recentPlateGeometry = cc.getRecent(dc, Item.PLATEGEOMETRY); |
7605 |
26 Feb 19 |
nicklas |
172 |
List<BioPlateType> recentBioPlateType = cc.getRecent(dc, Item.BIOPLATETYPE); |
6056 |
12 Jun 12 |
nicklas |
173 |
|
5996 |
05 Mar 12 |
nicklas |
174 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
5996 |
05 Mar 12 |
nicklas |
175 |
String dateFormat = FormatterSettings.getDateFormat(sc); |
5996 |
05 Mar 12 |
nicklas |
176 |
String jsDateFormat = HTML.javaScriptEncode(dateFormat); |
5996 |
05 Mar 12 |
nicklas |
177 |
String htmlDateFormat = HTML.encodeTags(dateFormat); |
6217 |
14 Dec 12 |
nicklas |
178 |
|
5492 |
16 Nov 10 |
nicklas |
179 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), bioplate); |
7604 |
25 Feb 19 |
nicklas |
180 |
ExtensionsInvoker<TabAction> invoker = EditUtil.useEditExtensions(jspContext); |
4704 |
11 Dec 08 |
martin |
181 |
%> |
6306 |
13 Aug 13 |
nicklas |
182 |
<base:page type="popup" title="<%=title%>" id="edit-page"> |
6306 |
13 Aug 13 |
nicklas |
183 |
<base:head scripts="tabcontrol-2.js,subtypes.js,~bioplates.js" styles="tabcontrol.css"> |
5492 |
16 Nov 10 |
nicklas |
184 |
<ext:scripts context="<%=jspContext%>" /> |
5492 |
16 Nov 10 |
nicklas |
185 |
<ext:stylesheets context="<%=jspContext%>" /> |
4704 |
11 Dec 08 |
martin |
186 |
</base:head> |
6306 |
13 Aug 13 |
nicklas |
187 |
<base:body> |
5913 |
15 Dec 11 |
nicklas |
188 |
<h1><%=title%> <base:help tabcontrol="settings" /></h1> |
5913 |
15 Dec 11 |
nicklas |
189 |
|
6162 |
10 Oct 12 |
nicklas |
190 |
<form action="index.jsp?ID=<%=ID%>" method="post" name="bioplate"> |
4704 |
11 Dec 08 |
martin |
191 |
<input type="hidden" name="cmd" value="UpdateItem"> |
4704 |
11 Dec 08 |
martin |
192 |
|
5913 |
15 Dec 11 |
nicklas |
193 |
<t:tabcontrol id="settings" |
5913 |
15 Dec 11 |
nicklas |
194 |
subclass="content dialogtabcontrol" |
6254 |
22 Mar 13 |
nicklas |
195 |
position="bottom" remember="<%=bioplate != null%>" |
5492 |
16 Nov 10 |
nicklas |
196 |
extensions="<%=invoker%>"> |
6306 |
13 Aug 13 |
nicklas |
197 |
<t:tab id="info" title="Plate" helpid="bioplate.edit"> |
5913 |
15 Dec 11 |
nicklas |
198 |
<table class="fullform input100"> |
4704 |
11 Dec 08 |
martin |
199 |
<tr> |
5913 |
15 Dec 11 |
nicklas |
200 |
<th>Name</th> |
6306 |
13 Aug 13 |
nicklas |
201 |
<td><input class="text required auto-init" data-auto-init="<%=bioplate == null ? "focus-select" : "focus" %>" |
6306 |
13 Aug 13 |
nicklas |
202 |
type="text" name="name" |
4704 |
11 Dec 08 |
martin |
203 |
value="<%=HTML.encodeTags(bioplate == null ? Values.getString(cc.getPropertyValue("name"), "New bioplate") : bioplate.getName())%>" |
5913 |
15 Dec 11 |
nicklas |
204 |
maxlength="<%=BioPlate.MAX_NAME_LENGTH%>"></td> |
5913 |
15 Dec 11 |
nicklas |
205 |
<td></td> |
4704 |
11 Dec 08 |
martin |
206 |
</tr> |
4704 |
11 Dec 08 |
martin |
207 |
<tr> |
5913 |
15 Dec 11 |
nicklas |
208 |
<th>Bioplate type</th> |
5262 |
08 Mar 10 |
nicklas |
209 |
<td> |
5262 |
08 Mar 10 |
nicklas |
210 |
<% |
5262 |
08 Mar 10 |
nicklas |
211 |
if (bioplate != null) |
5262 |
08 Mar 10 |
nicklas |
212 |
{ |
5262 |
08 Mar 10 |
nicklas |
213 |
%> |
5262 |
08 Mar 10 |
nicklas |
214 |
<%=Base.getEncodedName(currentBioPlateType, !readCurrentBioPlateType)%> |
5262 |
08 Mar 10 |
nicklas |
215 |
<% |
5262 |
08 Mar 10 |
nicklas |
216 |
} |
5262 |
08 Mar 10 |
nicklas |
217 |
else |
5262 |
08 Mar 10 |
nicklas |
218 |
{ |
5262 |
08 Mar 10 |
nicklas |
219 |
%> |
5262 |
08 Mar 10 |
nicklas |
220 |
<base:select |
5262 |
08 Mar 10 |
nicklas |
221 |
id="bioplatetype_id" |
5262 |
08 Mar 10 |
nicklas |
222 |
clazz="selectionlist unchangeable" |
5262 |
08 Mar 10 |
nicklas |
223 |
required="true" |
5262 |
08 Mar 10 |
nicklas |
224 |
current="<%=currentBioPlateType%>" |
5262 |
08 Mar 10 |
nicklas |
225 |
denied="<%=!readCurrentBioPlateType%>" |
5262 |
08 Mar 10 |
nicklas |
226 |
recent="<%=recentBioPlateType%>" |
5262 |
08 Mar 10 |
nicklas |
227 |
newitem="true" |
5262 |
08 Mar 10 |
nicklas |
228 |
/> |
5262 |
08 Mar 10 |
nicklas |
229 |
<% |
5262 |
08 Mar 10 |
nicklas |
230 |
} |
5262 |
08 Mar 10 |
nicklas |
231 |
%> |
5262 |
08 Mar 10 |
nicklas |
232 |
</td> |
5913 |
15 Dec 11 |
nicklas |
233 |
<td></td> |
5262 |
08 Mar 10 |
nicklas |
234 |
</tr> |
5262 |
08 Mar 10 |
nicklas |
235 |
<tr> |
5913 |
15 Dec 11 |
nicklas |
236 |
<th>Plate geometry</th> |
4704 |
11 Dec 08 |
martin |
237 |
<td> |
4704 |
11 Dec 08 |
martin |
238 |
<% |
4704 |
11 Dec 08 |
martin |
239 |
if (bioplate != null) |
4704 |
11 Dec 08 |
martin |
240 |
{ |
4704 |
11 Dec 08 |
martin |
241 |
%> |
4704 |
11 Dec 08 |
martin |
242 |
<%=Base.getEncodedName(currentPlateGeometry, !readCurrentPlateGeometry)%> |
4704 |
11 Dec 08 |
martin |
243 |
<% |
4704 |
11 Dec 08 |
martin |
244 |
} |
4704 |
11 Dec 08 |
martin |
245 |
else |
4704 |
11 Dec 08 |
martin |
246 |
{ |
4704 |
11 Dec 08 |
martin |
247 |
%> |
4732 |
21 Jan 09 |
martin |
248 |
<base:select |
4732 |
21 Jan 09 |
martin |
249 |
id="plategeometry_id" |
5262 |
08 Mar 10 |
nicklas |
250 |
clazz="selectionlist unchangeable" |
4732 |
21 Jan 09 |
martin |
251 |
required="true" |
4732 |
21 Jan 09 |
martin |
252 |
current="<%=currentPlateGeometry%>" |
4732 |
21 Jan 09 |
martin |
253 |
denied="<%=!readCurrentPlateGeometry%>" |
4732 |
21 Jan 09 |
martin |
254 |
recent="<%=recentPlateGeometry%>" |
4732 |
21 Jan 09 |
martin |
255 |
newitem="true" |
4732 |
21 Jan 09 |
martin |
256 |
/> |
4704 |
11 Dec 08 |
martin |
257 |
<% |
4704 |
11 Dec 08 |
martin |
258 |
} |
4704 |
11 Dec 08 |
martin |
259 |
%> |
4704 |
11 Dec 08 |
martin |
260 |
</td> |
5913 |
15 Dec 11 |
nicklas |
261 |
<td></td> |
5262 |
08 Mar 10 |
nicklas |
262 |
</tr> |
4732 |
21 Jan 09 |
martin |
263 |
<tr> |
6056 |
12 Jun 12 |
nicklas |
264 |
<th>Storage location</th> |
4732 |
21 Jan 09 |
martin |
265 |
<td> |
4732 |
21 Jan 09 |
martin |
266 |
<base:select |
6306 |
13 Aug 13 |
nicklas |
267 |
id="storage_id" |
4732 |
21 Jan 09 |
martin |
268 |
clazz="selectionlist" |
4732 |
21 Jan 09 |
martin |
269 |
required="false" |
6306 |
13 Aug 13 |
nicklas |
270 |
data-freezer-id="<%=SystemItems.getId(Hardware.FREEZER)%>" |
6306 |
13 Aug 13 |
nicklas |
271 |
data-storage-type-id="<%=currentStorageType == null ? "" : currentStorageType.getId() %>" |
4732 |
21 Jan 09 |
martin |
272 |
current="<%=currentFreezer%>" |
4732 |
21 Jan 09 |
martin |
273 |
denied="<%=!readCurrentFreezer%>" |
4732 |
21 Jan 09 |
martin |
274 |
recent="<%=recentFreezers%>" |
6056 |
12 Jun 12 |
nicklas |
275 |
defaultitems="<%=defaultFreezers %>" |
4732 |
21 Jan 09 |
martin |
276 |
newitem="<%=bioplate == null%>" |
4732 |
21 Jan 09 |
martin |
277 |
/> |
4732 |
21 Jan 09 |
martin |
278 |
</td> |
5913 |
15 Dec 11 |
nicklas |
279 |
<td></td> |
4704 |
11 Dec 08 |
martin |
280 |
</tr> |
4732 |
21 Jan 09 |
martin |
281 |
<tr> |
6061 |
13 Jun 12 |
nicklas |
282 |
<th class="subprompt">- section</th> |
6061 |
13 Jun 12 |
nicklas |
283 |
<td> |
6217 |
14 Dec 12 |
nicklas |
284 |
<input class="text" type="text" name="section" style="width: 10em;" |
6061 |
13 Jun 12 |
nicklas |
285 |
value="<%=HTML.encodeTags(bioplate == null ? Values.getString(cc.getPropertyValue("section"), "") : bioplate.getSection())%>" |
6061 |
13 Jun 12 |
nicklas |
286 |
maxlength="<%=BioPlate.MAX_SECTION_LENGTH%>"> |
6061 |
13 Jun 12 |
nicklas |
287 |
</td> |
6061 |
13 Jun 12 |
nicklas |
288 |
<td></td> |
6061 |
13 Jun 12 |
nicklas |
289 |
</tr> |
6061 |
13 Jun 12 |
nicklas |
290 |
<tr> |
6061 |
13 Jun 12 |
nicklas |
291 |
<th class="subprompt">- tray</th> |
6061 |
13 Jun 12 |
nicklas |
292 |
<td> |
6217 |
14 Dec 12 |
nicklas |
293 |
<input class="text" type="text" name="tray" style="width: 10em;" |
6061 |
13 Jun 12 |
nicklas |
294 |
value="<%=HTML.encodeTags(bioplate == null ? Values.getString(cc.getPropertyValue("tray"), "") : bioplate.getTray())%>" |
6061 |
13 Jun 12 |
nicklas |
295 |
maxlength="<%=BioPlate.MAX_TRAY_LENGTH%>"> |
6061 |
13 Jun 12 |
nicklas |
296 |
</td> |
6061 |
13 Jun 12 |
nicklas |
297 |
<td></td> |
6061 |
13 Jun 12 |
nicklas |
298 |
</tr> |
6061 |
13 Jun 12 |
nicklas |
299 |
<tr> |
6061 |
13 Jun 12 |
nicklas |
300 |
<th class="subprompt">- position</th> |
6061 |
13 Jun 12 |
nicklas |
301 |
<td> |
6217 |
14 Dec 12 |
nicklas |
302 |
<input class="text" type="text" name="position" style="width: 10em;" |
6061 |
13 Jun 12 |
nicklas |
303 |
value="<%=HTML.encodeTags(bioplate == null ? Values.getString(cc.getPropertyValue("position"), "") : bioplate.getPosition())%>" |
6061 |
13 Jun 12 |
nicklas |
304 |
maxlength="<%=BioPlate.MAX_POSITION_LENGTH%>"> |
6061 |
13 Jun 12 |
nicklas |
305 |
</td> |
6061 |
13 Jun 12 |
nicklas |
306 |
<td></td> |
6061 |
13 Jun 12 |
nicklas |
307 |
</tr> |
6061 |
13 Jun 12 |
nicklas |
308 |
<tr> |
5996 |
05 Mar 12 |
nicklas |
309 |
<th>Created</th> |
5996 |
05 Mar 12 |
nicklas |
310 |
<td> |
5996 |
05 Mar 12 |
nicklas |
311 |
<table> |
5996 |
05 Mar 12 |
nicklas |
312 |
<tr> |
5996 |
05 Mar 12 |
nicklas |
313 |
<td> |
6217 |
14 Dec 12 |
nicklas |
314 |
<input class="text" style="width: 15em;" type="text" name="event_date" id="event_date" |
5996 |
05 Mar 12 |
nicklas |
315 |
value="<%=HTML.encodeTags(dateFormatter.format(eventDate))%>" |
5996 |
05 Mar 12 |
nicklas |
316 |
maxlength="20" title="Enter date in format: <%=htmlDateFormat%>"> |
5996 |
05 Mar 12 |
nicklas |
317 |
</td> |
5996 |
05 Mar 12 |
nicklas |
318 |
<td> |
6216 |
14 Dec 12 |
nicklas |
319 |
<base:calendar textarea="event_date" title="Created" /> |
5996 |
05 Mar 12 |
nicklas |
320 |
</td> |
5996 |
05 Mar 12 |
nicklas |
321 |
</tr> |
5996 |
05 Mar 12 |
nicklas |
322 |
</table> |
5996 |
05 Mar 12 |
nicklas |
323 |
</td> |
5996 |
05 Mar 12 |
nicklas |
324 |
<td></td> |
5996 |
05 Mar 12 |
nicklas |
325 |
</tr> |
5996 |
05 Mar 12 |
nicklas |
326 |
<tr> |
5913 |
15 Dec 11 |
nicklas |
327 |
<th>Barcode</th> |
6217 |
14 Dec 12 |
nicklas |
328 |
<td><input class="text" type="text" name="barcode" |
4732 |
21 Jan 09 |
martin |
329 |
value="<%=HTML.encodeTags(bioplate == null ? Values.getString(cc.getPropertyValue("barcode"), "") : bioplate.getBarcode())%>" |
5913 |
15 Dec 11 |
nicklas |
330 |
maxlength="<%=BioPlate.MAX_BARCODE_LENGTH%>"></td> |
5913 |
15 Dec 11 |
nicklas |
331 |
<td></td> |
4732 |
21 Jan 09 |
martin |
332 |
</tr> |
5454 |
28 Oct 10 |
nicklas |
333 |
<tr> |
5913 |
15 Dec 11 |
nicklas |
334 |
<th class="prompt"><label for="destroyed">Destroyed</label></th> |
5812 |
17 Oct 11 |
nicklas |
335 |
<td><input type="checkbox" name="destroyed" id="destroyed" value="1" |
5454 |
28 Oct 10 |
nicklas |
336 |
<%=(bioplate != null && bioplate.isDestroyed()) || (bioplate == null && Values.getBoolean(cc.getPropertyValue("destroyed"))) ? "checked" : ""%>> |
5454 |
28 Oct 10 |
nicklas |
337 |
</td> |
5913 |
15 Dec 11 |
nicklas |
338 |
<td></td> |
5454 |
28 Oct 10 |
nicklas |
339 |
</tr> |
5913 |
15 Dec 11 |
nicklas |
340 |
<tr class="dynamic"> |
5913 |
15 Dec 11 |
nicklas |
341 |
<th>Description</th> |
5913 |
15 Dec 11 |
nicklas |
342 |
<td> |
6217 |
14 Dec 12 |
nicklas |
343 |
<textarea class="text" rows="6" name="description" id="description" |
4704 |
11 Dec 08 |
martin |
344 |
><%=HTML.encodeTags(bioplate == null ? cc.getPropertyValue("description") : bioplate.getDescription())%></textarea> |
4704 |
11 Dec 08 |
martin |
345 |
</td> |
5913 |
15 Dec 11 |
nicklas |
346 |
<td style="width: 20px;"> |
6215 |
13 Dec 12 |
nicklas |
347 |
<base:zoom textarea="description" title="Description" /> |
5913 |
15 Dec 11 |
nicklas |
348 |
</td> |
4704 |
11 Dec 08 |
martin |
349 |
</tr> |
4704 |
11 Dec 08 |
martin |
350 |
</table> |
4704 |
11 Dec 08 |
martin |
351 |
</t:tab> |
4704 |
11 Dec 08 |
martin |
352 |
|
6306 |
13 Aug 13 |
nicklas |
353 |
<t:tab id="annotations" title="Annotations" helpid="annotations.edit"> |
6254 |
22 Mar 13 |
nicklas |
354 |
<jsp:include page="../../common/annotations/annotate_frameset.jsp"> |
6254 |
22 Mar 13 |
nicklas |
355 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6254 |
22 Mar 13 |
nicklas |
356 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6254 |
22 Mar 13 |
nicklas |
357 |
<jsp:param name="ID" value="<%=ID%>" /> |
6306 |
13 Aug 13 |
nicklas |
358 |
</jsp:include> |
6306 |
13 Aug 13 |
nicklas |
359 |
</t:tab> |
6254 |
22 Mar 13 |
nicklas |
360 |
|
4704 |
11 Dec 08 |
martin |
361 |
</t:tabcontrol> |
5913 |
15 Dec 11 |
nicklas |
362 |
</form> |
4704 |
11 Dec 08 |
martin |
363 |
|
5913 |
15 Dec 11 |
nicklas |
364 |
<div class="legend"> |
5946 |
03 Feb 12 |
nicklas |
365 |
<base:icon image="required.png" />= required information |
5913 |
15 Dec 11 |
nicklas |
366 |
<%if (bioplate == null) {%><br> |
5967 |
16 Feb 12 |
nicklas |
367 |
<base:icon image="unchangeable.png" />= can't be changed later |
5913 |
15 Dec 11 |
nicklas |
368 |
<%}%> |
5913 |
15 Dec 11 |
nicklas |
369 |
</div> |
5913 |
15 Dec 11 |
nicklas |
370 |
|
5913 |
15 Dec 11 |
nicklas |
371 |
<base:buttongroup subclass="dialogbuttons"> |
6306 |
13 Aug 13 |
nicklas |
372 |
<base:button id="btnSave" title="Save" /> |
6306 |
13 Aug 13 |
nicklas |
373 |
<base:button id="close" title="Cancel" /> |
5913 |
15 Dec 11 |
nicklas |
374 |
</base:buttongroup> |
4704 |
11 Dec 08 |
martin |
375 |
</base:body> |
4704 |
11 Dec 08 |
martin |
376 |
</base:page> |
4704 |
11 Dec 08 |
martin |
377 |
<% |
4704 |
11 Dec 08 |
martin |
378 |
} |
4704 |
11 Dec 08 |
martin |
379 |
finally |
4704 |
11 Dec 08 |
martin |
380 |
{ |
4704 |
11 Dec 08 |
martin |
381 |
if (dc != null) dc.close(); |
4704 |
11 Dec 08 |
martin |
382 |
} |
4704 |
11 Dec 08 |
martin |
383 |
%> |