5657 |
16 Jun 11 |
nicklas |
1 |
<%-- $Id $ |
5657 |
16 Jun 11 |
nicklas |
2 |
------------------------------------------------------------------ |
5657 |
16 Jun 11 |
nicklas |
Copyright (C) 2011 Nicklas Nordborg |
5657 |
16 Jun 11 |
nicklas |
4 |
|
5657 |
16 Jun 11 |
nicklas |
5 |
This file is part of BASE - BioArray Software Environment. |
5657 |
16 Jun 11 |
nicklas |
6 |
Available at http://base.thep.lu.se/ |
5657 |
16 Jun 11 |
nicklas |
7 |
|
5657 |
16 Jun 11 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
5657 |
16 Jun 11 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
5657 |
16 Jun 11 |
nicklas |
10 |
as published by the Free Software Foundation; either version 3 |
5657 |
16 Jun 11 |
nicklas |
11 |
of the License, or (at your option) any later version. |
5657 |
16 Jun 11 |
nicklas |
12 |
|
5657 |
16 Jun 11 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
5657 |
16 Jun 11 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
5657 |
16 Jun 11 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5657 |
16 Jun 11 |
nicklas |
16 |
GNU General Public License for more details. |
5657 |
16 Jun 11 |
nicklas |
17 |
|
5657 |
16 Jun 11 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
5657 |
16 Jun 11 |
nicklas |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
5657 |
16 Jun 11 |
nicklas |
20 |
------------------------------------------------------------------ |
5657 |
16 Jun 11 |
nicklas |
21 |
--%> |
5657 |
16 Jun 11 |
nicklas |
22 |
<%@ page pageEncoding="UTF-8" session="false" |
5657 |
16 Jun 11 |
nicklas |
23 |
import="net.sf.basedb.core.SessionControl" |
5657 |
16 Jun 11 |
nicklas |
24 |
import="net.sf.basedb.core.DbControl" |
5685 |
04 Aug 11 |
nicklas |
25 |
import="net.sf.basedb.core.DerivedBioAssay" |
5685 |
04 Aug 11 |
nicklas |
26 |
import="net.sf.basedb.core.PhysicalBioAssay" |
5685 |
04 Aug 11 |
nicklas |
27 |
import="net.sf.basedb.core.Extract" |
5657 |
16 Jun 11 |
nicklas |
28 |
import="net.sf.basedb.core.ItemSubtype" |
5657 |
16 Jun 11 |
nicklas |
29 |
import="net.sf.basedb.core.Protocol" |
6996 |
03 Nov 15 |
nicklas |
30 |
import="net.sf.basedb.core.Kit" |
5657 |
16 Jun 11 |
nicklas |
31 |
import="net.sf.basedb.core.Hardware" |
5657 |
16 Jun 11 |
nicklas |
32 |
import="net.sf.basedb.core.Software" |
5687 |
09 Aug 11 |
nicklas |
33 |
import="net.sf.basedb.core.Project" |
5657 |
16 Jun 11 |
nicklas |
34 |
import="net.sf.basedb.core.Item" |
5657 |
16 Jun 11 |
nicklas |
35 |
import="net.sf.basedb.core.ItemContext" |
5657 |
16 Jun 11 |
nicklas |
36 |
import="net.sf.basedb.core.Permission" |
5657 |
16 Jun 11 |
nicklas |
37 |
import="net.sf.basedb.core.ItemQuery" |
5657 |
16 Jun 11 |
nicklas |
38 |
import="net.sf.basedb.core.ItemResultList" |
5657 |
16 Jun 11 |
nicklas |
39 |
import="net.sf.basedb.core.Include" |
6082 |
14 Aug 12 |
nicklas |
40 |
import="net.sf.basedb.core.Type" |
6082 |
14 Aug 12 |
nicklas |
41 |
import="net.sf.basedb.core.query.Expressions" |
5657 |
16 Jun 11 |
nicklas |
42 |
import="net.sf.basedb.core.query.Orders" |
5657 |
16 Jun 11 |
nicklas |
43 |
import="net.sf.basedb.core.query.Hql" |
6082 |
14 Aug 12 |
nicklas |
44 |
import="net.sf.basedb.core.query.Restrictions" |
5657 |
16 Jun 11 |
nicklas |
45 |
import="net.sf.basedb.core.PermissionDeniedException" |
5657 |
16 Jun 11 |
nicklas |
46 |
import="net.sf.basedb.core.BaseException" |
5657 |
16 Jun 11 |
nicklas |
47 |
import="net.sf.basedb.clients.web.Base" |
5657 |
16 Jun 11 |
nicklas |
48 |
import="net.sf.basedb.clients.web.util.HTML" |
5657 |
16 Jun 11 |
nicklas |
49 |
import="net.sf.basedb.util.Values" |
5687 |
09 Aug 11 |
nicklas |
50 |
import="net.sf.basedb.util.ListUtil" |
5657 |
16 Jun 11 |
nicklas |
51 |
import="net.sf.basedb.core.plugin.GuiContext" |
5657 |
16 Jun 11 |
nicklas |
52 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5657 |
16 Jun 11 |
nicklas |
53 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5657 |
16 Jun 11 |
nicklas |
54 |
import="net.sf.basedb.clients.web.extensions.edit.EditUtil" |
7604 |
25 Feb 19 |
nicklas |
55 |
import="net.sf.basedb.clients.web.extensions.tabcontrol.TabAction" |
5657 |
16 Jun 11 |
nicklas |
56 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
6314 |
02 Sep 13 |
nicklas |
57 |
import="net.sf.basedb.util.json.JsonUtil" |
6314 |
02 Sep 13 |
nicklas |
58 |
import="net.sf.basedb.util.json.NameableConverter" |
6314 |
02 Sep 13 |
nicklas |
59 |
import="org.json.simple.JSONObject" |
5657 |
16 Jun 11 |
nicklas |
60 |
import="java.util.Date" |
5657 |
16 Jun 11 |
nicklas |
61 |
import="java.util.List" |
5687 |
09 Aug 11 |
nicklas |
62 |
import="java.util.Collections" |
5657 |
16 Jun 11 |
nicklas |
63 |
%> |
5657 |
16 Jun 11 |
nicklas |
64 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
5657 |
16 Jun 11 |
nicklas |
65 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
6139 |
19 Sep 12 |
nicklas |
66 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
5657 |
16 Jun 11 |
nicklas |
67 |
<% |
5685 |
04 Aug 11 |
nicklas |
68 |
final Item itemType = Item.DERIVEDBIOASSAY; |
5657 |
16 Jun 11 |
nicklas |
69 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
5657 |
16 Jun 11 |
nicklas |
70 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
5721 |
06 Sep 11 |
nicklas |
71 |
final String tabId = Values.getString(request.getParameter("tab"), null); |
5657 |
16 Jun 11 |
nicklas |
72 |
final int itemId = cc.getId(); |
5657 |
16 Jun 11 |
nicklas |
73 |
final String ID = sc.getId(); |
5657 |
16 Jun 11 |
nicklas |
74 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
75 |
final DbControl dc = sc.newDbControl(":Edit "+itemType); |
5657 |
16 Jun 11 |
nicklas |
76 |
try |
5657 |
16 Jun 11 |
nicklas |
77 |
{ |
5685 |
04 Aug 11 |
nicklas |
78 |
DerivedBioAssay bioAssay = null; |
5657 |
16 Jun 11 |
nicklas |
79 |
String title = null; |
5657 |
16 Jun 11 |
nicklas |
80 |
|
5657 |
16 Jun 11 |
nicklas |
81 |
boolean readCurrentSubtype = true; |
5687 |
09 Aug 11 |
nicklas |
82 |
ItemSubtype currentSubtype = null; |
5657 |
16 Jun 11 |
nicklas |
83 |
|
5685 |
04 Aug 11 |
nicklas |
84 |
boolean readCurrentExtract = true; |
5685 |
04 Aug 11 |
nicklas |
85 |
Extract currentExtract = null; |
5685 |
04 Aug 11 |
nicklas |
86 |
|
5657 |
16 Jun 11 |
nicklas |
87 |
boolean readCurrentProtocol = true; |
5657 |
16 Jun 11 |
nicklas |
88 |
Protocol currentProtocol = null; |
6996 |
03 Nov 15 |
nicklas |
89 |
|
6996 |
03 Nov 15 |
nicklas |
90 |
boolean readCurrentKit = true; |
6996 |
03 Nov 15 |
nicklas |
91 |
Kit currentKit = null; |
5657 |
16 Jun 11 |
nicklas |
92 |
|
5657 |
16 Jun 11 |
nicklas |
93 |
boolean readCurrentHardware = true; |
5657 |
16 Jun 11 |
nicklas |
94 |
Hardware currentHardware = null; |
5657 |
16 Jun 11 |
nicklas |
95 |
|
5657 |
16 Jun 11 |
nicklas |
96 |
boolean readCurrentSoftware = true; |
5657 |
16 Jun 11 |
nicklas |
97 |
Software currentSoftware = null; |
5657 |
16 Jun 11 |
nicklas |
98 |
|
6082 |
14 Aug 12 |
nicklas |
99 |
ItemQuery<PhysicalBioAssay> physicalQuery = null; |
6082 |
14 Aug 12 |
nicklas |
100 |
ItemQuery<DerivedBioAssay> parentQuery = null; |
6082 |
14 Aug 12 |
nicklas |
101 |
|
6082 |
14 Aug 12 |
nicklas |
102 |
Item parentType = null; |
6082 |
14 Aug 12 |
nicklas |
103 |
|
5657 |
16 Jun 11 |
nicklas |
104 |
if (itemId == 0) |
5657 |
16 Jun 11 |
nicklas |
105 |
{ |
5685 |
04 Aug 11 |
nicklas |
106 |
title = "New derived bioassay"; |
5657 |
16 Jun 11 |
nicklas |
107 |
cc.removeObject("item"); |
6082 |
14 Aug 12 |
nicklas |
108 |
int parentId = Values.getInt(request.getParameter("parent_id")); |
6082 |
14 Aug 12 |
nicklas |
109 |
int physicalBioAssayId = Values.getInt(request.getParameter("physicalbioassay_id")); |
5687 |
09 Aug 11 |
nicklas |
110 |
int currentSubtypeId = Values.getInt(request.getParameter("subtype_id")); |
5687 |
09 Aug 11 |
nicklas |
111 |
List<ItemSubtype> relatedToParent = Collections.emptyList(); |
6082 |
14 Aug 12 |
nicklas |
112 |
|
5657 |
16 Jun 11 |
nicklas |
113 |
if (parentId != 0) |
5657 |
16 Jun 11 |
nicklas |
114 |
{ |
6082 |
14 Aug 12 |
nicklas |
115 |
parentType = Item.DERIVEDBIOASSAY; |
6082 |
14 Aug 12 |
nicklas |
116 |
DerivedBioAssay dba = DerivedBioAssay.getById(dc, parentId); |
6082 |
14 Aug 12 |
nicklas |
117 |
parentQuery = DerivedBioAssay.getQuery(); |
6082 |
14 Aug 12 |
nicklas |
118 |
parentQuery.restrict(Restrictions.eq(Hql.property("id"), Expressions.integer(parentId))); |
5687 |
09 Aug 11 |
nicklas |
119 |
if (currentSubtypeId == 0) |
5687 |
09 Aug 11 |
nicklas |
120 |
{ |
6082 |
14 Aug 12 |
nicklas |
121 |
relatedToParent = ItemSubtype.getParentSubtypes(dc, dba, Item.DERIVEDBIOASSAY); |
5687 |
09 Aug 11 |
nicklas |
122 |
} |
5657 |
16 Jun 11 |
nicklas |
123 |
} |
6082 |
14 Aug 12 |
nicklas |
124 |
else if (physicalBioAssayId != 0) |
5657 |
16 Jun 11 |
nicklas |
125 |
{ |
6082 |
14 Aug 12 |
nicklas |
126 |
parentType = Item.PHYSICALBIOASSAY; |
6082 |
14 Aug 12 |
nicklas |
127 |
PhysicalBioAssay pba = PhysicalBioAssay.getById(dc, physicalBioAssayId); |
6082 |
14 Aug 12 |
nicklas |
128 |
physicalQuery = PhysicalBioAssay.getQuery(); |
6082 |
14 Aug 12 |
nicklas |
129 |
physicalQuery.restrict(Restrictions.eq(Hql.property("id"), Expressions.integer(physicalBioAssayId))); |
6082 |
14 Aug 12 |
nicklas |
130 |
if (currentSubtypeId == 0) |
5657 |
16 Jun 11 |
nicklas |
131 |
{ |
6082 |
14 Aug 12 |
nicklas |
132 |
relatedToParent = ItemSubtype.getParentSubtypes(dc, pba, Item.DERIVEDBIOASSAY); |
5657 |
16 Jun 11 |
nicklas |
133 |
} |
5657 |
16 Jun 11 |
nicklas |
134 |
} |
6082 |
14 Aug 12 |
nicklas |
135 |
else if ("PHYISCALBIOASSAY".equals(request.getParameter("useParents"))) |
6082 |
14 Aug 12 |
nicklas |
136 |
{ |
6082 |
14 Aug 12 |
nicklas |
137 |
parentType = Item.PHYSICALBIOASSAY; |
6082 |
14 Aug 12 |
nicklas |
138 |
physicalQuery = PhysicalBioAssay.getQuery(); |
6082 |
14 Aug 12 |
nicklas |
139 |
physicalQuery.restrict(Restrictions.in(Hql.property("id"), Expressions.parameter("selected"))); |
6082 |
14 Aug 12 |
nicklas |
140 |
physicalQuery.setParameter("selected", sc.getCurrentContext(Item.PHYSICALBIOASSAY).getSelected(), Type.INT); |
6082 |
14 Aug 12 |
nicklas |
141 |
} |
6082 |
14 Aug 12 |
nicklas |
142 |
else if ("DERIVEDBIOASSAY".equals(request.getParameter("useParents"))) |
6082 |
14 Aug 12 |
nicklas |
143 |
{ |
6082 |
14 Aug 12 |
nicklas |
144 |
parentType = Item.DERIVEDBIOASSAY; |
6082 |
14 Aug 12 |
nicklas |
145 |
parentQuery = DerivedBioAssay.getQuery(); |
6082 |
14 Aug 12 |
nicklas |
146 |
parentQuery.restrict(Restrictions.in(Hql.property("id"), Expressions.parameter("selected"))); |
6082 |
14 Aug 12 |
nicklas |
147 |
parentQuery.setParameter("selected", cc.getSelected(), Type.INT); |
6082 |
14 Aug 12 |
nicklas |
148 |
} |
6082 |
14 Aug 12 |
nicklas |
149 |
|
7587 |
06 Feb 19 |
nicklas |
150 |
int extractId = Values.getInt(request.getParameter("extract_id")); |
7587 |
06 Feb 19 |
nicklas |
151 |
if (extractId != 0) |
7587 |
06 Feb 19 |
nicklas |
152 |
{ |
7587 |
06 Feb 19 |
nicklas |
153 |
currentExtract = Extract.getById(dc, extractId); |
7587 |
06 Feb 19 |
nicklas |
154 |
} |
7587 |
06 Feb 19 |
nicklas |
155 |
else if (cc.getPropertyFilter("extract.name") != null) |
7587 |
06 Feb 19 |
nicklas |
156 |
{ |
7587 |
06 Feb 19 |
nicklas |
157 |
currentExtract = Base.getFirstMatching(dc, Extract.getQuery(), "name", cc.getPropertyFilter("extract.name")); |
7587 |
06 Feb 19 |
nicklas |
158 |
} |
7587 |
06 Feb 19 |
nicklas |
159 |
|
5687 |
09 Aug 11 |
nicklas |
160 |
if (currentSubtypeId == 0) |
5687 |
09 Aug 11 |
nicklas |
161 |
{ |
5687 |
09 Aug 11 |
nicklas |
162 |
if (relatedToParent.size() > 0) |
5687 |
09 Aug 11 |
nicklas |
163 |
{ |
5687 |
09 Aug 11 |
nicklas |
164 |
// Find most recently used related subtype |
7605 |
26 Feb 19 |
nicklas |
165 |
List<ItemSubtype> recentSubtypes = cc.getRecent(dc, Item.ITEMSUBTYPE); |
5687 |
09 Aug 11 |
nicklas |
166 |
currentSubtype = ListUtil.findFirstCommon(recentSubtypes, relatedToParent, relatedToParent.get(0)); |
5687 |
09 Aug 11 |
nicklas |
167 |
} |
5687 |
09 Aug 11 |
nicklas |
168 |
else |
5687 |
09 Aug 11 |
nicklas |
169 |
{ |
5687 |
09 Aug 11 |
nicklas |
170 |
int recentSubtypeId = Values.getInt(cc.getRecent(Item.ITEMSUBTYPE.name(), 0)); |
5687 |
09 Aug 11 |
nicklas |
171 |
currentSubtypeId = Values.getInt(cc.getPropertyValue("itemSubtype"), recentSubtypeId); |
5687 |
09 Aug 11 |
nicklas |
172 |
if (currentSubtypeId > 0) currentSubtype = ItemSubtype.getById(dc, currentSubtypeId); |
5687 |
09 Aug 11 |
nicklas |
173 |
} |
5687 |
09 Aug 11 |
nicklas |
174 |
} |
5657 |
16 Jun 11 |
nicklas |
175 |
} |
5657 |
16 Jun 11 |
nicklas |
176 |
else |
5657 |
16 Jun 11 |
nicklas |
177 |
{ |
5685 |
04 Aug 11 |
nicklas |
178 |
bioAssay = DerivedBioAssay.getById(dc, itemId); |
5685 |
04 Aug 11 |
nicklas |
179 |
bioAssay.checkPermission(Permission.WRITE); |
5685 |
04 Aug 11 |
nicklas |
180 |
cc.setObject("item", bioAssay); |
5685 |
04 Aug 11 |
nicklas |
181 |
title = "Edit bioassay -- " + HTML.encodeTags(bioAssay.getName()); |
5657 |
16 Jun 11 |
nicklas |
182 |
|
6082 |
14 Aug 12 |
nicklas |
183 |
if (bioAssay.isRoot()) |
5657 |
16 Jun 11 |
nicklas |
184 |
{ |
6082 |
14 Aug 12 |
nicklas |
185 |
physicalQuery = bioAssay.getPhysicalBioAssays(); |
6082 |
14 Aug 12 |
nicklas |
186 |
parentType = Item.PHYSICALBIOASSAY; |
5657 |
16 Jun 11 |
nicklas |
187 |
} |
6082 |
14 Aug 12 |
nicklas |
188 |
else |
5657 |
16 Jun 11 |
nicklas |
189 |
{ |
6082 |
14 Aug 12 |
nicklas |
190 |
parentQuery = bioAssay.getParents(); |
6082 |
14 Aug 12 |
nicklas |
191 |
parentType = Item.DERIVEDBIOASSAY; |
5657 |
16 Jun 11 |
nicklas |
192 |
} |
6082 |
14 Aug 12 |
nicklas |
193 |
|
5657 |
16 Jun 11 |
nicklas |
194 |
try |
5657 |
16 Jun 11 |
nicklas |
195 |
{ |
6082 |
14 Aug 12 |
nicklas |
196 |
currentSubtype = bioAssay.getItemSubtype(); |
5657 |
16 Jun 11 |
nicklas |
197 |
} |
5657 |
16 Jun 11 |
nicklas |
198 |
catch (PermissionDeniedException ex) |
5657 |
16 Jun 11 |
nicklas |
199 |
{ |
6082 |
14 Aug 12 |
nicklas |
200 |
readCurrentSubtype = false; |
5685 |
04 Aug 11 |
nicklas |
201 |
} |
5685 |
04 Aug 11 |
nicklas |
202 |
try |
5685 |
04 Aug 11 |
nicklas |
203 |
{ |
5685 |
04 Aug 11 |
nicklas |
204 |
currentExtract = bioAssay.getExtract(); |
5657 |
16 Jun 11 |
nicklas |
205 |
} |
5657 |
16 Jun 11 |
nicklas |
206 |
catch (PermissionDeniedException ex) |
5657 |
16 Jun 11 |
nicklas |
207 |
{ |
5685 |
04 Aug 11 |
nicklas |
208 |
readCurrentExtract = false; |
5685 |
04 Aug 11 |
nicklas |
209 |
} |
5685 |
04 Aug 11 |
nicklas |
210 |
try |
5685 |
04 Aug 11 |
nicklas |
211 |
{ |
5685 |
04 Aug 11 |
nicklas |
212 |
currentProtocol = bioAssay.getProtocol(); |
5685 |
04 Aug 11 |
nicklas |
213 |
} |
5685 |
04 Aug 11 |
nicklas |
214 |
catch (PermissionDeniedException ex) |
5685 |
04 Aug 11 |
nicklas |
215 |
{ |
5657 |
16 Jun 11 |
nicklas |
216 |
readCurrentProtocol = false; |
5657 |
16 Jun 11 |
nicklas |
217 |
} |
5657 |
16 Jun 11 |
nicklas |
218 |
try |
5657 |
16 Jun 11 |
nicklas |
219 |
{ |
6996 |
03 Nov 15 |
nicklas |
220 |
currentKit = bioAssay.getKit(); |
6996 |
03 Nov 15 |
nicklas |
221 |
} |
6996 |
03 Nov 15 |
nicklas |
222 |
catch (PermissionDeniedException ex) |
6996 |
03 Nov 15 |
nicklas |
223 |
{ |
6996 |
03 Nov 15 |
nicklas |
224 |
readCurrentKit = false; |
6996 |
03 Nov 15 |
nicklas |
225 |
} |
6996 |
03 Nov 15 |
nicklas |
226 |
try |
6996 |
03 Nov 15 |
nicklas |
227 |
{ |
5685 |
04 Aug 11 |
nicklas |
228 |
currentHardware = bioAssay.getHardware(); |
5657 |
16 Jun 11 |
nicklas |
229 |
} |
5657 |
16 Jun 11 |
nicklas |
230 |
catch (PermissionDeniedException ex) |
5657 |
16 Jun 11 |
nicklas |
231 |
{ |
5657 |
16 Jun 11 |
nicklas |
232 |
readCurrentHardware = false; |
5657 |
16 Jun 11 |
nicklas |
233 |
} |
5657 |
16 Jun 11 |
nicklas |
234 |
try |
5657 |
16 Jun 11 |
nicklas |
235 |
{ |
5685 |
04 Aug 11 |
nicklas |
236 |
currentSoftware = bioAssay.getSoftware(); |
5657 |
16 Jun 11 |
nicklas |
237 |
} |
5657 |
16 Jun 11 |
nicklas |
238 |
catch (PermissionDeniedException ex) |
5657 |
16 Jun 11 |
nicklas |
239 |
{ |
5657 |
16 Jun 11 |
nicklas |
240 |
readCurrentSoftware = false; |
5657 |
16 Jun 11 |
nicklas |
241 |
} |
5657 |
16 Jun 11 |
nicklas |
242 |
} |
5687 |
09 Aug 11 |
nicklas |
243 |
|
5687 |
09 Aug 11 |
nicklas |
244 |
// Default items |
5687 |
09 Aug 11 |
nicklas |
245 |
int activeProjectId = sc.getActiveProjectId(); |
5687 |
09 Aug 11 |
nicklas |
246 |
List<Protocol> defaultProtocols = null; |
5687 |
09 Aug 11 |
nicklas |
247 |
List<Hardware> defaultHardware = null; |
5687 |
09 Aug 11 |
nicklas |
248 |
List<Software> defaultSoftware = null; |
5687 |
09 Aug 11 |
nicklas |
249 |
if (activeProjectId > 0) |
5687 |
09 Aug 11 |
nicklas |
250 |
{ |
5687 |
09 Aug 11 |
nicklas |
251 |
Project activeProject = Project.getById(dc, activeProjectId); |
7605 |
26 Feb 19 |
nicklas |
252 |
defaultProtocols = activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.PROTOCOL); |
7605 |
26 Feb 19 |
nicklas |
253 |
defaultHardware = activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.HARDWARE); |
7605 |
26 Feb 19 |
nicklas |
254 |
defaultSoftware = activeProject.findDefaultItemsOfRelatedSubtype(dc, currentSubtype, Item.SOFTWARE); |
5687 |
09 Aug 11 |
nicklas |
255 |
} |
5687 |
09 Aug 11 |
nicklas |
256 |
|
5687 |
09 Aug 11 |
nicklas |
257 |
// Load recently used items |
7605 |
26 Feb 19 |
nicklas |
258 |
List<Protocol> recentProtocols = cc.getRecent(dc, Item.PROTOCOL, currentSubtype); |
7605 |
26 Feb 19 |
nicklas |
259 |
List<Kit> recentKits = cc.getRecent(dc, Item.KIT, currentSubtype); |
7605 |
26 Feb 19 |
nicklas |
260 |
List<Hardware> recentHardware = cc.getRecent(dc, Item.HARDWARE, currentSubtype); |
7605 |
26 Feb 19 |
nicklas |
261 |
List<Software> recentSoftware = cc.getRecent(dc, Item.SOFTWARE, currentSubtype); |
5687 |
09 Aug 11 |
nicklas |
262 |
|
5657 |
16 Jun 11 |
nicklas |
263 |
// Query to retrieve item types |
5657 |
16 Jun 11 |
nicklas |
264 |
final ItemQuery<ItemSubtype> subtypesQuery = Base.getSubtypesQuery(itemType); |
5657 |
16 Jun 11 |
nicklas |
265 |
subtypesQuery.include(Include.ALL); |
5657 |
16 Jun 11 |
nicklas |
266 |
|
6314 |
02 Sep 13 |
nicklas |
267 |
// Load parent physical bioassays |
6314 |
02 Sep 13 |
nicklas |
268 |
JSONObject jsonPhysicalBioAssays = new JSONObject(); |
6314 |
02 Sep 13 |
nicklas |
269 |
jsonPhysicalBioAssays.put("itemType", "PHYSICALBIOASSAY"); |
6314 |
02 Sep 13 |
nicklas |
270 |
if (physicalQuery != null) |
6314 |
02 Sep 13 |
nicklas |
271 |
{ |
6314 |
02 Sep 13 |
nicklas |
272 |
physicalQuery.include(Include.ALL); |
6314 |
02 Sep 13 |
nicklas |
273 |
physicalQuery.order(Orders.asc(Hql.property("name"))); |
7604 |
25 Feb 19 |
nicklas |
274 |
jsonPhysicalBioAssays.put("items", JsonUtil.toArray(physicalQuery.iterate(dc), new NameableConverter<PhysicalBioAssay>())); |
6314 |
02 Sep 13 |
nicklas |
275 |
} |
6314 |
02 Sep 13 |
nicklas |
276 |
|
6314 |
02 Sep 13 |
nicklas |
277 |
// Load parent derived bioassays |
6314 |
02 Sep 13 |
nicklas |
278 |
JSONObject jsonParents = new JSONObject(); |
6314 |
02 Sep 13 |
nicklas |
279 |
jsonParents.put("itemType", "DERIVEDBIOASSAY"); |
6314 |
02 Sep 13 |
nicklas |
280 |
if (parentQuery != null) |
6314 |
02 Sep 13 |
nicklas |
281 |
{ |
6314 |
02 Sep 13 |
nicklas |
282 |
parentQuery.include(Include.ALL); |
6314 |
02 Sep 13 |
nicklas |
283 |
parentQuery.order(Orders.asc(Hql.property("name"))); |
6314 |
02 Sep 13 |
nicklas |
284 |
ItemResultList<DerivedBioAssay> parents = parentQuery.list(dc); |
7604 |
25 Feb 19 |
nicklas |
285 |
jsonParents.put("items", JsonUtil.toArray(parents, new NameableConverter<DerivedBioAssay>())); |
6314 |
02 Sep 13 |
nicklas |
286 |
if (parents.size() == 1 && currentExtract == null) |
6314 |
02 Sep 13 |
nicklas |
287 |
{ |
6314 |
02 Sep 13 |
nicklas |
288 |
try |
6314 |
02 Sep 13 |
nicklas |
289 |
{ |
6314 |
02 Sep 13 |
nicklas |
290 |
currentExtract = parents.get(0).getExtract(); |
6314 |
02 Sep 13 |
nicklas |
291 |
} |
6314 |
02 Sep 13 |
nicklas |
292 |
catch (PermissionDeniedException ex) |
6314 |
02 Sep 13 |
nicklas |
293 |
{} |
6314 |
02 Sep 13 |
nicklas |
294 |
} |
6314 |
02 Sep 13 |
nicklas |
295 |
} |
6217 |
14 Dec 12 |
nicklas |
296 |
|
5685 |
04 Aug 11 |
nicklas |
297 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), bioAssay); |
7604 |
25 Feb 19 |
nicklas |
298 |
ExtensionsInvoker<TabAction> invoker = EditUtil.useEditExtensions(jspContext); |
5657 |
16 Jun 11 |
nicklas |
299 |
%> |
6314 |
02 Sep 13 |
nicklas |
300 |
<base:page type="popup" title="<%=title%>" id="edit-page"> |
6314 |
02 Sep 13 |
nicklas |
301 |
<base:head scripts="tabcontrol-2.js,subtypes.js,linkitems-2.js,~bioassays.js" styles="tabcontrol.css"> |
5657 |
16 Jun 11 |
nicklas |
302 |
<ext:scripts context="<%=jspContext%>" /> |
5657 |
16 Jun 11 |
nicklas |
303 |
<ext:stylesheets context="<%=jspContext%>" /> |
5657 |
16 Jun 11 |
nicklas |
304 |
</base:head> |
6314 |
02 Sep 13 |
nicklas |
305 |
<base:body> |
5915 |
16 Dec 11 |
nicklas |
306 |
<h1><%=title%> <base:help tabcontrol="settings" /></h1> |
6162 |
10 Oct 12 |
nicklas |
307 |
<form action="index.jsp?ID=<%=ID%>" method="post" name="bioAssay"> |
5657 |
16 Jun 11 |
nicklas |
308 |
<input type="hidden" name="cmd" value="UpdateItem"> |
5915 |
16 Dec 11 |
nicklas |
309 |
|
5915 |
16 Dec 11 |
nicklas |
310 |
<t:tabcontrol id="settings" |
5915 |
16 Dec 11 |
nicklas |
311 |
subclass="content dialogtabcontrol" |
5915 |
16 Dec 11 |
nicklas |
312 |
position="bottom" active="<%=tabId%>" remember="<%=tabId == null && bioAssay != null%>" |
5657 |
16 Jun 11 |
nicklas |
313 |
extensions="<%=invoker%>"> |
6314 |
02 Sep 13 |
nicklas |
314 |
<t:tab id="info" title="Bioassay" helpid="derivedbioassay.edit"> |
5915 |
16 Dec 11 |
nicklas |
315 |
<table class="fullform input100"> |
5657 |
16 Jun 11 |
nicklas |
316 |
<tr> |
5915 |
16 Dec 11 |
nicklas |
317 |
<th>Name</th> |
6314 |
02 Sep 13 |
nicklas |
318 |
<td><input class="text required auto-init" data-auto-init="<%=bioAssay == null ? "focus-select" : "focus" %>" |
6314 |
02 Sep 13 |
nicklas |
319 |
type="text" name="name" |
5685 |
04 Aug 11 |
nicklas |
320 |
value="<%=HTML.encodeTags(bioAssay == null ? Values.getString(cc.getPropertyValue("name"), "New derived bioassay") : bioAssay.getName())%>" |
5915 |
16 Dec 11 |
nicklas |
321 |
maxlength="<%=DerivedBioAssay.MAX_NAME_LENGTH%>"></td> |
5915 |
16 Dec 11 |
nicklas |
322 |
<td></td> |
5657 |
16 Jun 11 |
nicklas |
323 |
</tr> |
5915 |
16 Dec 11 |
nicklas |
324 |
<tr> |
5915 |
16 Dec 11 |
nicklas |
325 |
<th>Type</th> |
5915 |
16 Dec 11 |
nicklas |
326 |
<td> |
6297 |
14 Jun 13 |
nicklas |
327 |
<select name="subtype_id" id="subtype_id" |
6314 |
02 Sep 13 |
nicklas |
328 |
<%=!readCurrentSubtype ? "disabled readonly class=\"disabled selectionlist\"" : "class=\"selectionlist\""%>> |
5657 |
16 Jun 11 |
nicklas |
329 |
<% |
5657 |
16 Jun 11 |
nicklas |
330 |
if (!readCurrentSubtype) |
5657 |
16 Jun 11 |
nicklas |
331 |
{ |
5657 |
16 Jun 11 |
nicklas |
332 |
%> |
5657 |
16 Jun 11 |
nicklas |
333 |
<option value="-1">- denied - |
5657 |
16 Jun 11 |
nicklas |
334 |
<% |
5657 |
16 Jun 11 |
nicklas |
335 |
} |
5657 |
16 Jun 11 |
nicklas |
336 |
else |
5657 |
16 Jun 11 |
nicklas |
337 |
{ |
5657 |
16 Jun 11 |
nicklas |
338 |
%> |
5657 |
16 Jun 11 |
nicklas |
339 |
<option value="0">-none- |
5657 |
16 Jun 11 |
nicklas |
340 |
<% |
5687 |
09 Aug 11 |
nicklas |
341 |
int currentSubtypeId = currentSubtype == null ? 0 : currentSubtype.getId(); |
5657 |
16 Jun 11 |
nicklas |
342 |
for (ItemSubtype subtype : subtypesQuery.list(dc)) |
5657 |
16 Jun 11 |
nicklas |
343 |
{ |
5657 |
16 Jun 11 |
nicklas |
344 |
int id = subtype.getId(); |
5657 |
16 Jun 11 |
nicklas |
345 |
if (id != currentSubtypeId && subtype.isRemoved()) continue; |
5657 |
16 Jun 11 |
nicklas |
346 |
%> |
5685 |
04 Aug 11 |
nicklas |
347 |
<option value="<%=id == currentSubtypeId && bioAssay != null ? -id : id%>" |
5657 |
16 Jun 11 |
nicklas |
348 |
<%=id == currentSubtypeId ? "selected" : ""%> |
5657 |
16 Jun 11 |
nicklas |
349 |
title="<%=HTML.encodeTags(subtype.getDescription()) %>" |
5657 |
16 Jun 11 |
nicklas |
350 |
><%=HTML.encodeTags(subtype.getName())%> |
5657 |
16 Jun 11 |
nicklas |
351 |
<% |
5657 |
16 Jun 11 |
nicklas |
352 |
} |
5657 |
16 Jun 11 |
nicklas |
353 |
} |
5657 |
16 Jun 11 |
nicklas |
354 |
%> |
5657 |
16 Jun 11 |
nicklas |
355 |
</select> |
5657 |
16 Jun 11 |
nicklas |
356 |
</td> |
5915 |
16 Dec 11 |
nicklas |
357 |
<td></td> |
5657 |
16 Jun 11 |
nicklas |
358 |
</tr> |
5657 |
16 Jun 11 |
nicklas |
359 |
<% |
5685 |
04 Aug 11 |
nicklas |
360 |
if (bioAssay == null) |
5657 |
16 Jun 11 |
nicklas |
361 |
{ |
5657 |
16 Jun 11 |
nicklas |
362 |
%> |
5657 |
16 Jun 11 |
nicklas |
363 |
<tr> |
5915 |
16 Dec 11 |
nicklas |
364 |
<th>Parent type</th> |
5657 |
16 Jun 11 |
nicklas |
365 |
<td> |
5657 |
16 Jun 11 |
nicklas |
366 |
<input id="isRoot" type="radio" name="isRoot" value="1" |
6082 |
14 Aug 12 |
nicklas |
367 |
<%=parentType == Item.PHYSICALBIOASSAY ? "checked" : "" %> |
6314 |
02 Sep 13 |
nicklas |
368 |
><label for="isRoot">Physical bioassay</label> |
5657 |
16 Jun 11 |
nicklas |
369 |
<input id="isChild" type="radio" name="isRoot" value="0" |
6082 |
14 Aug 12 |
nicklas |
370 |
<%=parentType != Item.PHYSICALBIOASSAY ? "checked" : "" %> |
6314 |
02 Sep 13 |
nicklas |
371 |
><label for="isChild">Derived bioassay</label><br> |
5657 |
16 Jun 11 |
nicklas |
372 |
</td> |
5915 |
16 Dec 11 |
nicklas |
373 |
<td></td> |
5657 |
16 Jun 11 |
nicklas |
374 |
</tr> |
6082 |
14 Aug 12 |
nicklas |
375 |
<% |
6082 |
14 Aug 12 |
nicklas |
376 |
} |
6082 |
14 Aug 12 |
nicklas |
377 |
%> |
6082 |
14 Aug 12 |
nicklas |
378 |
<% |
6082 |
14 Aug 12 |
nicklas |
379 |
if (bioAssay == null || bioAssay.isRoot()) |
6082 |
14 Aug 12 |
nicklas |
380 |
{ |
6082 |
14 Aug 12 |
nicklas |
381 |
%> |
6082 |
14 Aug 12 |
nicklas |
382 |
<tr id="physicalBioAssaySection"> |
6082 |
14 Aug 12 |
nicklas |
383 |
<th class="subprompt">- physical bioassays</th> |
5657 |
16 Jun 11 |
nicklas |
384 |
<td> |
6082 |
14 Aug 12 |
nicklas |
385 |
<div class="selectionlist"> |
6082 |
14 Aug 12 |
nicklas |
386 |
<table> |
6082 |
14 Aug 12 |
nicklas |
387 |
<tr> |
6082 |
14 Aug 12 |
nicklas |
388 |
<td> |
6314 |
02 Sep 13 |
nicklas |
389 |
<select name="physicalBioAssays" id="physicalBioAssays" |
6314 |
02 Sep 13 |
nicklas |
390 |
class="auto-init" |
6314 |
02 Sep 13 |
nicklas |
391 |
data-auto-init="link-container" |
6314 |
02 Sep 13 |
nicklas |
392 |
data-initial-items="[<%=HTML.encodeTags(jsonPhysicalBioAssays.toJSONString()) %>]" |
6314 |
02 Sep 13 |
nicklas |
393 |
data-initial-action="<%=bioAssay == null ? 1 : 0 %>" |
6314 |
02 Sep 13 |
nicklas |
394 |
size="4" multiple> |
6082 |
14 Aug 12 |
nicklas |
395 |
</select> |
6082 |
14 Aug 12 |
nicklas |
396 |
</td> |
6082 |
14 Aug 12 |
nicklas |
397 |
<td> |
6082 |
14 Aug 12 |
nicklas |
398 |
<td style="vertical-align: top;"> |
6082 |
14 Aug 12 |
nicklas |
399 |
<base:buttongroup vertical="true"> |
6082 |
14 Aug 12 |
nicklas |
400 |
<base:button |
6314 |
02 Sep 13 |
nicklas |
401 |
id="btnAddPhysicalBioAssays" |
6082 |
14 Aug 12 |
nicklas |
402 |
subclass="leftaligned" |
6082 |
14 Aug 12 |
nicklas |
403 |
style="width: 12em;" |
6082 |
14 Aug 12 |
nicklas |
404 |
title="Add bioassays…" |
6082 |
14 Aug 12 |
nicklas |
405 |
tooltip="Add physical bioassays" |
6082 |
14 Aug 12 |
nicklas |
406 |
/> |
6082 |
14 Aug 12 |
nicklas |
407 |
<base:button |
6314 |
02 Sep 13 |
nicklas |
408 |
subclass="leftaligned auto-init" |
6314 |
02 Sep 13 |
nicklas |
409 |
data-auto-init="remove-link" |
6314 |
02 Sep 13 |
nicklas |
410 |
data-list-id="physicalBioAssays" |
6082 |
14 Aug 12 |
nicklas |
411 |
style="width: 12em;" |
6082 |
14 Aug 12 |
nicklas |
412 |
title="Remove" |
6082 |
14 Aug 12 |
nicklas |
413 |
tooltip="Remove the selected physical bioassays" |
6082 |
14 Aug 12 |
nicklas |
414 |
/> |
6082 |
14 Aug 12 |
nicklas |
415 |
</base:buttongroup> |
6082 |
14 Aug 12 |
nicklas |
416 |
</td> |
6082 |
14 Aug 12 |
nicklas |
417 |
</tr> |
6082 |
14 Aug 12 |
nicklas |
418 |
</table> |
6082 |
14 Aug 12 |
nicklas |
419 |
</div> |
5657 |
16 Jun 11 |
nicklas |
420 |
</td> |
5915 |
16 Dec 11 |
nicklas |
421 |
<td></td> |
5657 |
16 Jun 11 |
nicklas |
422 |
</tr> |
6082 |
14 Aug 12 |
nicklas |
423 |
<% |
6082 |
14 Aug 12 |
nicklas |
424 |
} |
6082 |
14 Aug 12 |
nicklas |
425 |
if (bioAssay == null || !bioAssay.isRoot()) |
6082 |
14 Aug 12 |
nicklas |
426 |
{ |
6082 |
14 Aug 12 |
nicklas |
427 |
%> |
6082 |
14 Aug 12 |
nicklas |
428 |
<tr id="parentBioAssaySection"> |
6082 |
14 Aug 12 |
nicklas |
429 |
<th class="subprompt">- bioassays</th> |
5657 |
16 Jun 11 |
nicklas |
430 |
<td> |
6082 |
14 Aug 12 |
nicklas |
431 |
<div class="selectionlist"> |
6082 |
14 Aug 12 |
nicklas |
432 |
<table> |
6082 |
14 Aug 12 |
nicklas |
433 |
<tr> |
6082 |
14 Aug 12 |
nicklas |
434 |
<td> |
6314 |
02 Sep 13 |
nicklas |
435 |
<select name="parents" id="parents" |
6314 |
02 Sep 13 |
nicklas |
436 |
class="auto-init" |
6314 |
02 Sep 13 |
nicklas |
437 |
data-auto-init="link-container" |
6314 |
02 Sep 13 |
nicklas |
438 |
data-initial-items="[<%=HTML.encodeTags(jsonParents.toJSONString()) %>]" |
6314 |
02 Sep 13 |
nicklas |
439 |
data-initial-action="<%=bioAssay == null ? 1 : 0 %>" |
6314 |
02 Sep 13 |
nicklas |
440 |
size="4" multiple> |
6082 |
14 Aug 12 |
nicklas |
441 |
</select> |
6082 |
14 Aug 12 |
nicklas |
442 |
</td> |
6082 |
14 Aug 12 |
nicklas |
443 |
<td> |
6082 |
14 Aug 12 |
nicklas |
444 |
<td style="vertical-align: top;"> |
6082 |
14 Aug 12 |
nicklas |
445 |
<base:buttongroup vertical="true"> |
6082 |
14 Aug 12 |
nicklas |
446 |
<base:button |
6314 |
02 Sep 13 |
nicklas |
447 |
id="btnAddParents" |
6082 |
14 Aug 12 |
nicklas |
448 |
subclass="leftaligned" |
6082 |
14 Aug 12 |
nicklas |
449 |
style="width: 12em;" |
6082 |
14 Aug 12 |
nicklas |
450 |
title="Add bioassays…" |
6082 |
14 Aug 12 |
nicklas |
451 |
tooltip="Add parent derived bioassays" |
6082 |
14 Aug 12 |
nicklas |
452 |
/> |
6082 |
14 Aug 12 |
nicklas |
453 |
<base:button |
6314 |
02 Sep 13 |
nicklas |
454 |
subclass="leftaligned auto-init" |
6314 |
02 Sep 13 |
nicklas |
455 |
data-auto-init="remove-link" |
6314 |
02 Sep 13 |
nicklas |
456 |
data-list-id="parents" |
6082 |
14 Aug 12 |
nicklas |
457 |
style="width: 12em;" |
6082 |
14 Aug 12 |
nicklas |
458 |
title="Remove" |
6082 |
14 Aug 12 |
nicklas |
459 |
tooltip="Remove the selected derived bioassays" |
6082 |
14 Aug 12 |
nicklas |
460 |
/> |
6082 |
14 Aug 12 |
nicklas |
461 |
</base:buttongroup> |
6082 |
14 Aug 12 |
nicklas |
462 |
</td> |
6082 |
14 Aug 12 |
nicklas |
463 |
</tr> |
6082 |
14 Aug 12 |
nicklas |
464 |
</table> |
6082 |
14 Aug 12 |
nicklas |
465 |
</div> |
6082 |
14 Aug 12 |
nicklas |
466 |
|
5657 |
16 Jun 11 |
nicklas |
467 |
</td> |
5915 |
16 Dec 11 |
nicklas |
468 |
<td></td> |
5657 |
16 Jun 11 |
nicklas |
469 |
</tr> |
5657 |
16 Jun 11 |
nicklas |
470 |
<% |
5657 |
16 Jun 11 |
nicklas |
471 |
} |
5657 |
16 Jun 11 |
nicklas |
472 |
%> |
5657 |
16 Jun 11 |
nicklas |
473 |
<tr> |
5915 |
16 Dec 11 |
nicklas |
474 |
<th>Extract</th> |
5685 |
04 Aug 11 |
nicklas |
475 |
<td> |
6094 |
30 Aug 12 |
nicklas |
476 |
<base:select |
6094 |
30 Aug 12 |
nicklas |
477 |
id="extract_id" |
6094 |
30 Aug 12 |
nicklas |
478 |
clazz="selectionlist" |
6094 |
30 Aug 12 |
nicklas |
479 |
required="false" |
6094 |
30 Aug 12 |
nicklas |
480 |
current="<%=currentExtract%>" |
6094 |
30 Aug 12 |
nicklas |
481 |
denied="<%=!readCurrentExtract%>" |
6094 |
30 Aug 12 |
nicklas |
482 |
newitem="<%=bioAssay == null%>" |
6094 |
30 Aug 12 |
nicklas |
483 |
/> |
5685 |
04 Aug 11 |
nicklas |
484 |
</td> |
5915 |
16 Dec 11 |
nicklas |
485 |
<td></td> |
5685 |
04 Aug 11 |
nicklas |
486 |
</tr> |
5685 |
04 Aug 11 |
nicklas |
487 |
<tr> |
5915 |
16 Dec 11 |
nicklas |
488 |
<th>Protocol</th> |
5657 |
16 Jun 11 |
nicklas |
489 |
<td> |
5657 |
16 Jun 11 |
nicklas |
490 |
<base:select |
5657 |
16 Jun 11 |
nicklas |
491 |
id="protocol_id" |
5657 |
16 Jun 11 |
nicklas |
492 |
clazz="selectionlist" |
5657 |
16 Jun 11 |
nicklas |
493 |
required="false" |
5657 |
16 Jun 11 |
nicklas |
494 |
current="<%=currentProtocol%>" |
5657 |
16 Jun 11 |
nicklas |
495 |
denied="<%=!readCurrentProtocol%>" |
5657 |
16 Jun 11 |
nicklas |
496 |
recent="<%=recentProtocols%>" |
5687 |
09 Aug 11 |
nicklas |
497 |
defaultitems="<%=defaultProtocols%>" |
5685 |
04 Aug 11 |
nicklas |
498 |
newitem="<%=bioAssay == null%>" |
5657 |
16 Jun 11 |
nicklas |
499 |
/> |
5657 |
16 Jun 11 |
nicklas |
500 |
</td> |
5915 |
16 Dec 11 |
nicklas |
501 |
<td></td> |
5657 |
16 Jun 11 |
nicklas |
502 |
</tr> |
5657 |
16 Jun 11 |
nicklas |
503 |
<tr> |
6996 |
03 Nov 15 |
nicklas |
504 |
<th>Kit</th> |
6996 |
03 Nov 15 |
nicklas |
505 |
<td> |
6996 |
03 Nov 15 |
nicklas |
506 |
<base:select |
6996 |
03 Nov 15 |
nicklas |
507 |
id="kit_id" |
6996 |
03 Nov 15 |
nicklas |
508 |
clazz="selectionlist" |
6996 |
03 Nov 15 |
nicklas |
509 |
required="false" |
6996 |
03 Nov 15 |
nicklas |
510 |
current="<%=currentKit%>" |
6996 |
03 Nov 15 |
nicklas |
511 |
denied="<%=!readCurrentKit%>" |
6996 |
03 Nov 15 |
nicklas |
512 |
recent="<%=recentKits%>" |
6996 |
03 Nov 15 |
nicklas |
513 |
newitem="<%=bioAssay == null%>" |
6996 |
03 Nov 15 |
nicklas |
514 |
/> |
6996 |
03 Nov 15 |
nicklas |
515 |
</td> |
6996 |
03 Nov 15 |
nicklas |
516 |
<td></td> |
6996 |
03 Nov 15 |
nicklas |
517 |
</tr> |
6996 |
03 Nov 15 |
nicklas |
518 |
<tr> |
5915 |
16 Dec 11 |
nicklas |
519 |
<th>Hardware</th> |
5657 |
16 Jun 11 |
nicklas |
520 |
<td> |
5657 |
16 Jun 11 |
nicklas |
521 |
<base:select |
5657 |
16 Jun 11 |
nicklas |
522 |
id="hardware_id" |
5657 |
16 Jun 11 |
nicklas |
523 |
clazz="selectionlist" |
5657 |
16 Jun 11 |
nicklas |
524 |
required="false" |
5657 |
16 Jun 11 |
nicklas |
525 |
current="<%=currentHardware%>" |
5657 |
16 Jun 11 |
nicklas |
526 |
denied="<%=!readCurrentHardware%>" |
5657 |
16 Jun 11 |
nicklas |
527 |
recent="<%=recentHardware%>" |
5687 |
09 Aug 11 |
nicklas |
528 |
defaultitems="<%=defaultHardware%>" |
5685 |
04 Aug 11 |
nicklas |
529 |
newitem="<%=bioAssay == null%>" |
5657 |
16 Jun 11 |
nicklas |
530 |
/> |
5657 |
16 Jun 11 |
nicklas |
531 |
</td> |
5915 |
16 Dec 11 |
nicklas |
532 |
<td></td> |
5657 |
16 Jun 11 |
nicklas |
533 |
</tr> |
5657 |
16 Jun 11 |
nicklas |
534 |
<tr> |
5915 |
16 Dec 11 |
nicklas |
535 |
<th>Software</th> |
5657 |
16 Jun 11 |
nicklas |
536 |
<td> |
5657 |
16 Jun 11 |
nicklas |
537 |
<base:select |
5657 |
16 Jun 11 |
nicklas |
538 |
id="software_id" |
5657 |
16 Jun 11 |
nicklas |
539 |
clazz="selectionlist" |
5657 |
16 Jun 11 |
nicklas |
540 |
required="false" |
5657 |
16 Jun 11 |
nicklas |
541 |
current="<%=currentSoftware%>" |
5657 |
16 Jun 11 |
nicklas |
542 |
denied="<%=!readCurrentSoftware%>" |
5657 |
16 Jun 11 |
nicklas |
543 |
recent="<%=recentSoftware%>" |
5687 |
09 Aug 11 |
nicklas |
544 |
defaultitems="<%=defaultSoftware%>" |
5685 |
04 Aug 11 |
nicklas |
545 |
newitem="<%=bioAssay == null%>" |
5657 |
16 Jun 11 |
nicklas |
546 |
/> |
5657 |
16 Jun 11 |
nicklas |
547 |
</td> |
5915 |
16 Dec 11 |
nicklas |
548 |
<td></td> |
5657 |
16 Jun 11 |
nicklas |
549 |
</tr> |
5657 |
16 Jun 11 |
nicklas |
550 |
|
5915 |
16 Dec 11 |
nicklas |
551 |
<tr class="dynamic"> |
5915 |
16 Dec 11 |
nicklas |
552 |
<th>Description</th> |
5915 |
16 Dec 11 |
nicklas |
553 |
<td> |
6217 |
14 Dec 12 |
nicklas |
554 |
<textarea class="text" rows="6" name="description" id="description" |
5685 |
04 Aug 11 |
nicklas |
555 |
><%=HTML.encodeTags(bioAssay == null ? cc.getPropertyValue("description") : bioAssay.getDescription())%></textarea> |
5657 |
16 Jun 11 |
nicklas |
556 |
</td> |
5915 |
16 Dec 11 |
nicklas |
557 |
<td style="width: 20px;"> |
6215 |
13 Dec 12 |
nicklas |
558 |
<base:zoom textarea="description" title="Description" /> |
5915 |
16 Dec 11 |
nicklas |
559 |
</td> |
5657 |
16 Jun 11 |
nicklas |
560 |
</tr> |
5657 |
16 Jun 11 |
nicklas |
561 |
</table> |
5657 |
16 Jun 11 |
nicklas |
562 |
</t:tab> |
5657 |
16 Jun 11 |
nicklas |
563 |
|
6314 |
02 Sep 13 |
nicklas |
564 |
<t:tab id="datafiles" title="Data files" helpid="datafiles.edit"> |
6256 |
25 Mar 13 |
nicklas |
565 |
<jsp:include page="../../common/datafiles/select_frameset.jsp"> |
6256 |
25 Mar 13 |
nicklas |
566 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6256 |
25 Mar 13 |
nicklas |
567 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6256 |
25 Mar 13 |
nicklas |
568 |
<jsp:param name="ID" value="<%=ID%>" /> |
6256 |
25 Mar 13 |
nicklas |
569 |
</jsp:include> |
6256 |
25 Mar 13 |
nicklas |
570 |
</t:tab> |
5657 |
16 Jun 11 |
nicklas |
571 |
|
6314 |
02 Sep 13 |
nicklas |
572 |
<t:tab id="annotations" title="Annotations & parameters" helpid="annotations.edit"> |
6254 |
22 Mar 13 |
nicklas |
573 |
<jsp:include page="../../common/annotations/annotate_frameset.jsp"> |
6254 |
22 Mar 13 |
nicklas |
574 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6254 |
22 Mar 13 |
nicklas |
575 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6254 |
22 Mar 13 |
nicklas |
576 |
<jsp:param name="ID" value="<%=ID%>" /> |
6254 |
22 Mar 13 |
nicklas |
577 |
</jsp:include> |
6254 |
22 Mar 13 |
nicklas |
578 |
</t:tab> |
5657 |
16 Jun 11 |
nicklas |
579 |
</t:tabcontrol> |
5915 |
16 Dec 11 |
nicklas |
580 |
</form> |
5657 |
16 Jun 11 |
nicklas |
581 |
|
5915 |
16 Dec 11 |
nicklas |
582 |
<div class="legend"> |
5946 |
03 Feb 12 |
nicklas |
583 |
<base:icon image="required.png" />= required information |
5915 |
16 Dec 11 |
nicklas |
584 |
<%if (bioAssay == null) {%><br> |
5967 |
16 Feb 12 |
nicklas |
585 |
<base:icon image="unchangeable.png" />= can't be changed later |
5915 |
16 Dec 11 |
nicklas |
586 |
<%}%> |
5915 |
16 Dec 11 |
nicklas |
587 |
</div> |
5915 |
16 Dec 11 |
nicklas |
588 |
|
5915 |
16 Dec 11 |
nicklas |
589 |
<base:buttongroup subclass="dialogbuttons"> |
6314 |
02 Sep 13 |
nicklas |
590 |
<base:button id="btnSave" title="Save" /> |
6314 |
02 Sep 13 |
nicklas |
591 |
<base:button id="close" title="Cancel" /> |
5915 |
16 Dec 11 |
nicklas |
592 |
</base:buttongroup> |
5915 |
16 Dec 11 |
nicklas |
593 |
|
5657 |
16 Jun 11 |
nicklas |
594 |
</base:body> |
5657 |
16 Jun 11 |
nicklas |
595 |
</base:page> |
5657 |
16 Jun 11 |
nicklas |
596 |
<% |
5657 |
16 Jun 11 |
nicklas |
597 |
} |
5657 |
16 Jun 11 |
nicklas |
598 |
finally |
5657 |
16 Jun 11 |
nicklas |
599 |
{ |
5657 |
16 Jun 11 |
nicklas |
600 |
if (dc != null) dc.close(); |
5657 |
16 Jun 11 |
nicklas |
601 |
} |
5657 |
16 Jun 11 |
nicklas |
602 |
%> |