1872 |
31 Jan 06 |
nicklas |
1 |
<%-- $Id$ |
1872 |
31 Jan 06 |
nicklas |
2 |
------------------------------------------------------------------ |
4889 |
06 Apr 09 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
1872 |
31 Jan 06 |
nicklas |
4 |
|
2304 |
22 May 06 |
jari |
5 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
6 |
Available at http://base.thep.lu.se/ |
1872 |
31 Jan 06 |
nicklas |
7 |
|
1872 |
31 Jan 06 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
1872 |
31 Jan 06 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
10 |
as published by the Free Software Foundation; either version 3 |
1872 |
31 Jan 06 |
nicklas |
11 |
of the License, or (at your option) any later version. |
1872 |
31 Jan 06 |
nicklas |
12 |
|
1872 |
31 Jan 06 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
1872 |
31 Jan 06 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1872 |
31 Jan 06 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1872 |
31 Jan 06 |
nicklas |
16 |
GNU General Public License for more details. |
1872 |
31 Jan 06 |
nicklas |
17 |
|
1872 |
31 Jan 06 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
1872 |
31 Jan 06 |
nicklas |
20 |
------------------------------------------------------------------ |
1872 |
31 Jan 06 |
nicklas |
21 |
|
1872 |
31 Jan 06 |
nicklas |
22 |
@author Nicklas |
1872 |
31 Jan 06 |
nicklas |
23 |
@version 2.0 |
1872 |
31 Jan 06 |
nicklas |
24 |
--%> |
5426 |
24 Sep 10 |
nicklas |
25 |
<%@ page pageEncoding="UTF-8" session="false" |
1872 |
31 Jan 06 |
nicklas |
26 |
import="net.sf.basedb.core.SessionControl" |
1872 |
31 Jan 06 |
nicklas |
27 |
import="net.sf.basedb.core.DbControl" |
1872 |
31 Jan 06 |
nicklas |
28 |
import="net.sf.basedb.core.SystemItems" |
1872 |
31 Jan 06 |
nicklas |
29 |
import="net.sf.basedb.core.Item" |
1872 |
31 Jan 06 |
nicklas |
30 |
import="net.sf.basedb.core.ItemContext" |
1872 |
31 Jan 06 |
nicklas |
31 |
import="net.sf.basedb.core.Permission" |
1872 |
31 Jan 06 |
nicklas |
32 |
import="net.sf.basedb.core.Plate" |
5663 |
22 Jun 11 |
nicklas |
33 |
import="net.sf.basedb.core.BioMaterial" |
1872 |
31 Jan 06 |
nicklas |
34 |
import="net.sf.basedb.core.BioMaterialEvent" |
5663 |
22 Jun 11 |
nicklas |
35 |
import="net.sf.basedb.core.BioMaterialEventSource" |
5530 |
15 Dec 10 |
nicklas |
36 |
import="net.sf.basedb.core.BioPlateEventParticipant" |
5530 |
15 Dec 10 |
nicklas |
37 |
import="net.sf.basedb.core.BioPlateEvent" |
5530 |
15 Dec 10 |
nicklas |
38 |
import="net.sf.basedb.core.BioPlate" |
1872 |
31 Jan 06 |
nicklas |
39 |
import="net.sf.basedb.core.MeasuredBioMaterial" |
5642 |
26 May 11 |
nicklas |
40 |
import="net.sf.basedb.core.PhysicalBioAssay" |
1872 |
31 Jan 06 |
nicklas |
41 |
import="net.sf.basedb.core.Protocol" |
1872 |
31 Jan 06 |
nicklas |
42 |
import="net.sf.basedb.core.PermissionDeniedException" |
1872 |
31 Jan 06 |
nicklas |
43 |
import="net.sf.basedb.core.ItemQuery" |
5663 |
22 Jun 11 |
nicklas |
44 |
import="net.sf.basedb.core.SpecialQuery" |
1872 |
31 Jan 06 |
nicklas |
45 |
import="net.sf.basedb.core.ItemResultList" |
1872 |
31 Jan 06 |
nicklas |
46 |
import="net.sf.basedb.core.Include" |
1872 |
31 Jan 06 |
nicklas |
47 |
import="net.sf.basedb.core.PluginDefinition" |
1872 |
31 Jan 06 |
nicklas |
48 |
import="net.sf.basedb.core.query.Orders" |
1872 |
31 Jan 06 |
nicklas |
49 |
import="net.sf.basedb.core.query.Hql" |
5663 |
22 Jun 11 |
nicklas |
50 |
import="net.sf.basedb.core.query.ResultList" |
1872 |
31 Jan 06 |
nicklas |
51 |
import="net.sf.basedb.core.plugin.GuiContext" |
1872 |
31 Jan 06 |
nicklas |
52 |
import="net.sf.basedb.core.plugin.Plugin" |
1872 |
31 Jan 06 |
nicklas |
53 |
import="net.sf.basedb.clients.web.Base" |
2386 |
15 Jun 06 |
martin |
54 |
import="net.sf.basedb.clients.web.PermissionUtil" |
1872 |
31 Jan 06 |
nicklas |
55 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
56 |
import="net.sf.basedb.util.Values" |
2942 |
22 Nov 06 |
nicklas |
57 |
import="net.sf.basedb.util.formatter.Formatter" |
6268 |
11 Apr 13 |
nicklas |
58 |
import="net.sf.basedb.util.formatter.NumberFormatter" |
6268 |
11 Apr 13 |
nicklas |
59 |
import="net.sf.basedb.util.formatter.PrefixSuffixFormatter" |
2942 |
22 Nov 06 |
nicklas |
60 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
6268 |
11 Apr 13 |
nicklas |
61 |
import="net.sf.basedb.clients.web.formatter.FormatterSettings" |
4882 |
03 Apr 09 |
nicklas |
62 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4882 |
03 Apr 09 |
nicklas |
63 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4882 |
03 Apr 09 |
nicklas |
64 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
65 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4882 |
03 Apr 09 |
nicklas |
66 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4882 |
03 Apr 09 |
nicklas |
67 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
1872 |
31 Jan 06 |
nicklas |
68 |
import="java.util.Date" |
1872 |
31 Jan 06 |
nicklas |
69 |
import="java.util.Map" |
1872 |
31 Jan 06 |
nicklas |
70 |
import="java.util.Set" |
1872 |
31 Jan 06 |
nicklas |
71 |
%> |
1872 |
31 Jan 06 |
nicklas |
72 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1872 |
31 Jan 06 |
nicklas |
73 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
1872 |
31 Jan 06 |
nicklas |
74 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
1872 |
31 Jan 06 |
nicklas |
75 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4882 |
03 Apr 09 |
nicklas |
76 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
1872 |
31 Jan 06 |
nicklas |
77 |
<%! |
1872 |
31 Jan 06 |
nicklas |
78 |
private static final Item itemType = Item.BIOMATERIALEVENT; |
1872 |
31 Jan 06 |
nicklas |
79 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
1872 |
31 Jan 06 |
nicklas |
80 |
%> |
1872 |
31 Jan 06 |
nicklas |
81 |
<% |
1872 |
31 Jan 06 |
nicklas |
82 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1872 |
31 Jan 06 |
nicklas |
83 |
final String ID = sc.getId(); |
1872 |
31 Jan 06 |
nicklas |
84 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
1872 |
31 Jan 06 |
nicklas |
85 |
final int itemId = cc.getId(); |
1872 |
31 Jan 06 |
nicklas |
86 |
final Item bioMaterialType = Item.valueOf(request.getParameter("biomaterial_type")); |
6261 |
27 Mar 13 |
nicklas |
87 |
final String tab = Values.getStringOrNull(request.getParameter("tab")); |
1872 |
31 Jan 06 |
nicklas |
88 |
final int bioMaterialId = Values.getInt(request.getParameter("biomaterial_id")); |
1872 |
31 Jan 06 |
nicklas |
89 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
90 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
1872 |
31 Jan 06 |
nicklas |
91 |
try |
1872 |
31 Jan 06 |
nicklas |
92 |
{ |
2942 |
22 Nov 06 |
nicklas |
93 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
6268 |
11 Apr 13 |
nicklas |
94 |
Formatter<Number> numberFormatter = FormatterFactory.getNumberFormatter(sc); |
7604 |
25 Feb 19 |
nicklas |
95 |
Formatter<Number> quantityFormatter = new PrefixSuffixFormatter<Number>(null, false, numberFormatter, " µg", false); |
6268 |
11 Apr 13 |
nicklas |
96 |
|
1872 |
31 Jan 06 |
nicklas |
97 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
1872 |
31 Jan 06 |
nicklas |
98 |
|
1872 |
31 Jan 06 |
nicklas |
99 |
String title = null; |
1872 |
31 Jan 06 |
nicklas |
100 |
BioMaterialEvent event = BioMaterialEvent.getById(dc, itemId); |
1872 |
31 Jan 06 |
nicklas |
101 |
MeasuredBioMaterial bioMaterial = (MeasuredBioMaterial)bioMaterialType.getById(dc, bioMaterialId); |
1872 |
31 Jan 06 |
nicklas |
102 |
BioMaterialEvent.Type eventType = event.getEventType(); |
5530 |
15 Dec 10 |
nicklas |
103 |
boolean isPlateEvent = event.isPlateEvent(); |
1872 |
31 Jan 06 |
nicklas |
104 |
|
5530 |
15 Dec 10 |
nicklas |
105 |
BioPlateEventParticipant participant = null; |
5530 |
15 Dec 10 |
nicklas |
106 |
BioPlateEvent plateEvent = null; |
5530 |
15 Dec 10 |
nicklas |
107 |
BioPlate plate = null; |
5530 |
15 Dec 10 |
nicklas |
108 |
if (isPlateEvent) |
5530 |
15 Dec 10 |
nicklas |
109 |
{ |
5530 |
15 Dec 10 |
nicklas |
110 |
try |
5530 |
15 Dec 10 |
nicklas |
111 |
{ |
5530 |
15 Dec 10 |
nicklas |
112 |
participant = event.getBioPlateEventParticipant(); |
5530 |
15 Dec 10 |
nicklas |
113 |
plateEvent = participant.getEvent(); |
5530 |
15 Dec 10 |
nicklas |
114 |
plate = participant.getBioPlate(); |
5530 |
15 Dec 10 |
nicklas |
115 |
} |
5530 |
15 Dec 10 |
nicklas |
116 |
catch (RuntimeException ex) |
5530 |
15 Dec 10 |
nicklas |
117 |
{} |
5530 |
15 Dec 10 |
nicklas |
118 |
} |
5530 |
15 Dec 10 |
nicklas |
119 |
|
1872 |
31 Jan 06 |
nicklas |
120 |
String viewPage = null; |
1872 |
31 Jan 06 |
nicklas |
121 |
String listName = null; |
1872 |
31 Jan 06 |
nicklas |
122 |
if (bioMaterialType == Item.SAMPLE) |
1872 |
31 Jan 06 |
nicklas |
123 |
{ |
1872 |
31 Jan 06 |
nicklas |
124 |
listName = "Samples"; |
1872 |
31 Jan 06 |
nicklas |
125 |
viewPage = "../samples/index.jsp"; |
1872 |
31 Jan 06 |
nicklas |
126 |
} |
1872 |
31 Jan 06 |
nicklas |
127 |
else if (bioMaterialType == Item.EXTRACT) |
1872 |
31 Jan 06 |
nicklas |
128 |
{ |
1872 |
31 Jan 06 |
nicklas |
129 |
listName = "Extracts"; |
1872 |
31 Jan 06 |
nicklas |
130 |
viewPage = "../extracts/index.jsp"; |
1872 |
31 Jan 06 |
nicklas |
131 |
} |
1872 |
31 Jan 06 |
nicklas |
132 |
|
1872 |
31 Jan 06 |
nicklas |
133 |
final boolean writePermission = event.hasPermission(Permission.WRITE) && eventType == BioMaterialEvent.Type.OTHER; |
1872 |
31 Jan 06 |
nicklas |
134 |
final boolean deletePermission = event.hasPermission(Permission.DELETE); |
4882 |
03 Apr 09 |
nicklas |
135 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, event); |
7604 |
25 Feb 19 |
nicklas |
136 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
1872 |
31 Jan 06 |
nicklas |
137 |
%> |
6261 |
27 Mar 13 |
nicklas |
138 |
<base:page title="<%=title%>" id="view-page"> |
6261 |
27 Mar 13 |
nicklas |
139 |
<base:head scripts="table.js,tabcontrol-2.js,~events.js" styles="toolbar.css,table.css,headertabcontrol.css,path.css"> |
4882 |
03 Apr 09 |
nicklas |
140 |
<ext:scripts context="<%=jspContext%>" /> |
4882 |
03 Apr 09 |
nicklas |
141 |
<ext:stylesheets context="<%=jspContext%>" /> |
1872 |
31 Jan 06 |
nicklas |
142 |
</base:head> |
1872 |
31 Jan 06 |
nicklas |
143 |
<base:body> |
5937 |
27 Jan 12 |
nicklas |
144 |
<p:path><p:pathelement |
5937 |
27 Jan 12 |
nicklas |
145 |
title="<%=listName%>" href="<%=viewPage+"?ID="+ID%>" /><p:pathelement |
5937 |
27 Jan 12 |
nicklas |
146 |
title="<%=HTML.encodeTags(bioMaterial.getName())%>" |
6145 |
21 Sep 12 |
nicklas |
147 |
href="<%="index.jsp?ID="+ID+"&biomaterial_id="+bioMaterialId+"&biomaterial_type="+bioMaterialType.name()%>" |
5937 |
27 Jan 12 |
nicklas |
148 |
/><p:pathelement title="Event" /></p:path> |
6261 |
27 Mar 13 |
nicklas |
149 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
1872 |
31 Jan 06 |
nicklas |
150 |
|
5937 |
27 Jan 12 |
nicklas |
151 |
<t:tabcontrol id="main" |
5937 |
27 Jan 12 |
nicklas |
152 |
subclass="content mastertabcontrol" |
6261 |
27 Mar 13 |
nicklas |
153 |
active="<%=tab%>"> |
1872 |
31 Jan 06 |
nicklas |
154 |
<t:tab id="properties" title="Properties"> |
5937 |
27 Jan 12 |
nicklas |
155 |
<div> |
5937 |
27 Jan 12 |
nicklas |
156 |
<table class="fullform bottomborder"> |
5937 |
27 Jan 12 |
nicklas |
157 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
158 |
<th class="itemstatus"></th> |
6145 |
21 Sep 12 |
nicklas |
159 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
160 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5937 |
27 Jan 12 |
nicklas |
161 |
<tbl:button |
6261 |
27 Mar 13 |
nicklas |
162 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
163 |
disabled="<%=!writePermission%>" |
6261 |
27 Mar 13 |
nicklas |
164 |
data-extra-url="<%="&biomaterial_type="+bioMaterialType.name()+"&biomaterial_id="+bioMaterialId%>" |
5945 |
02 Feb 12 |
nicklas |
165 |
image="edit.png" |
5937 |
27 Jan 12 |
nicklas |
166 |
title="Edit…" |
5937 |
27 Jan 12 |
nicklas |
167 |
tooltip="<%=writePermission ? "Edit this event" : "You do not have permission to edit this event"%>" |
5937 |
27 Jan 12 |
nicklas |
168 |
/> |
5937 |
27 Jan 12 |
nicklas |
169 |
<tbl:button |
6261 |
27 Mar 13 |
nicklas |
170 |
id="btnDelete" |
6261 |
27 Mar 13 |
nicklas |
171 |
data-confirm="1" |
6261 |
27 Mar 13 |
nicklas |
172 |
data-extra-url="<%="&biomaterial_type="+bioMaterialType.name()+"&biomaterial_id="+bioMaterialId%>" |
5942 |
01 Feb 12 |
nicklas |
173 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
174 |
image="delete.png" |
5937 |
27 Jan 12 |
nicklas |
175 |
title="Delete" |
5937 |
27 Jan 12 |
nicklas |
176 |
tooltip="<%=deletePermission ? "Delete this event" : "You do not have permission to event this event"%>" |
5937 |
27 Jan 12 |
nicklas |
177 |
/> |
5937 |
27 Jan 12 |
nicklas |
178 |
<tbl:button |
6261 |
27 Mar 13 |
nicklas |
179 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
180 |
image="import.png" |
6261 |
27 Mar 13 |
nicklas |
181 |
data-plugin-type="IMPORT" |
5937 |
27 Jan 12 |
nicklas |
182 |
title="Import…" |
5937 |
27 Jan 12 |
nicklas |
183 |
tooltip="Import data" |
5937 |
27 Jan 12 |
nicklas |
184 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5937 |
27 Jan 12 |
nicklas |
185 |
/> |
5937 |
27 Jan 12 |
nicklas |
186 |
<tbl:button |
6261 |
27 Mar 13 |
nicklas |
187 |
id="btnExport" |
6261 |
27 Mar 13 |
nicklas |
188 |
image="export.png" |
6261 |
27 Mar 13 |
nicklas |
189 |
data-plugin-type="EXPORT" |
5937 |
27 Jan 12 |
nicklas |
190 |
title="Export…" |
5937 |
27 Jan 12 |
nicklas |
191 |
tooltip="Export data" |
5937 |
27 Jan 12 |
nicklas |
192 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5937 |
27 Jan 12 |
nicklas |
193 |
/> |
5937 |
27 Jan 12 |
nicklas |
194 |
<tbl:button |
6261 |
27 Mar 13 |
nicklas |
195 |
id="btnRunPlugin" |
6261 |
27 Mar 13 |
nicklas |
196 |
image="runplugin.png" |
6261 |
27 Mar 13 |
nicklas |
197 |
data-plugin-type="OTHER" |
5937 |
27 Jan 12 |
nicklas |
198 |
title="Run plugin…" |
5937 |
27 Jan 12 |
nicklas |
199 |
tooltip="Run a plugin" |
5937 |
27 Jan 12 |
nicklas |
200 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5937 |
27 Jan 12 |
nicklas |
201 |
/> |
5937 |
27 Jan 12 |
nicklas |
202 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
203 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5937 |
27 Jan 12 |
nicklas |
204 |
</tbl:toolbar> |
5937 |
27 Jan 12 |
nicklas |
205 |
</td> |
5937 |
27 Jan 12 |
nicklas |
206 |
</tr> |
5530 |
15 Dec 10 |
nicklas |
207 |
<% |
5530 |
15 Dec 10 |
nicklas |
208 |
if (isPlateEvent) |
5530 |
15 Dec 10 |
nicklas |
209 |
{ |
5530 |
15 Dec 10 |
nicklas |
210 |
%> |
5530 |
15 Dec 10 |
nicklas |
211 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
212 |
<th>Releated plate event</th> |
5530 |
15 Dec 10 |
nicklas |
213 |
<td><%=Base.getLinkedName(ID, plateEvent, plateEvent == null, true) %></td> |
5530 |
15 Dec 10 |
nicklas |
214 |
</tr> |
5530 |
15 Dec 10 |
nicklas |
215 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
216 |
<th class="subprompt">- bioplate</th> |
5530 |
15 Dec 10 |
nicklas |
217 |
<td><%=Base.getLinkedName(ID, plate, plate == null, true)%> |
5530 |
15 Dec 10 |
nicklas |
218 |
<% |
5530 |
15 Dec 10 |
nicklas |
219 |
if (participant != null) |
5530 |
15 Dec 10 |
nicklas |
220 |
{ |
5530 |
15 Dec 10 |
nicklas |
221 |
%> |
5530 |
15 Dec 10 |
nicklas |
222 |
(<%=HTML.encodeTags(participant.getRole())%>) |
5530 |
15 Dec 10 |
nicklas |
223 |
<% |
5530 |
15 Dec 10 |
nicklas |
224 |
} |
5530 |
15 Dec 10 |
nicklas |
225 |
%> |
5530 |
15 Dec 10 |
nicklas |
226 |
</td> |
5530 |
15 Dec 10 |
nicklas |
227 |
</tr> |
5530 |
15 Dec 10 |
nicklas |
228 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
229 |
<th class="subprompt">- event type</th> |
5530 |
15 Dec 10 |
nicklas |
230 |
<td><% |
5530 |
15 Dec 10 |
nicklas |
231 |
if (plateEvent != null) |
5530 |
15 Dec 10 |
nicklas |
232 |
{ |
5530 |
15 Dec 10 |
nicklas |
233 |
%> |
5530 |
15 Dec 10 |
nicklas |
234 |
<base:propertyvalue item="<%=plateEvent%>" property="eventType" /> |
5530 |
15 Dec 10 |
nicklas |
235 |
<% |
5530 |
15 Dec 10 |
nicklas |
236 |
} |
5530 |
15 Dec 10 |
nicklas |
237 |
%> |
5530 |
15 Dec 10 |
nicklas |
238 |
</td> |
5530 |
15 Dec 10 |
nicklas |
239 |
</tr> |
5530 |
15 Dec 10 |
nicklas |
240 |
<% |
5530 |
15 Dec 10 |
nicklas |
241 |
} |
5530 |
15 Dec 10 |
nicklas |
242 |
%> |
1872 |
31 Jan 06 |
nicklas |
243 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
244 |
<th>Event date</th> |
2942 |
22 Nov 06 |
nicklas |
245 |
<td><%=dateFormatter.format(event.getEventDate())%></td> |
1872 |
31 Jan 06 |
nicklas |
246 |
</tr> |
1872 |
31 Jan 06 |
nicklas |
247 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
248 |
<th>Registration date</th> |
2942 |
22 Nov 06 |
nicklas |
249 |
<td><%=dateFormatter.format(event.getEntryDate())%></td> |
1872 |
31 Jan 06 |
nicklas |
250 |
</tr> |
1872 |
31 Jan 06 |
nicklas |
251 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
252 |
<th>Used quantity</th> |
6268 |
11 Apr 13 |
nicklas |
253 |
<td><%=quantityFormatter.format(event.getUsedQuantity(bioMaterial))%></td> |
1872 |
31 Jan 06 |
nicklas |
254 |
</tr> |
1872 |
31 Jan 06 |
nicklas |
255 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
256 |
<th>Event type</th> |
1872 |
31 Jan 06 |
nicklas |
257 |
<td><%=eventType%></td> |
1872 |
31 Jan 06 |
nicklas |
258 |
</tr> |
1872 |
31 Jan 06 |
nicklas |
259 |
<% |
1872 |
31 Jan 06 |
nicklas |
260 |
if (eventType != BioMaterialEvent.Type.OTHER) |
1872 |
31 Jan 06 |
nicklas |
261 |
{ |
1872 |
31 Jan 06 |
nicklas |
262 |
if (eventType == BioMaterialEvent.Type.CREATION) |
2533 |
16 Aug 06 |
martin |
263 |
{ |
1872 |
31 Jan 06 |
nicklas |
264 |
%> |
1872 |
31 Jan 06 |
nicklas |
265 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
266 |
<th>Product</th> |
5525 |
06 Dec 10 |
nicklas |
267 |
<td><base:propertyvalue item="<%=event%>" property="bioMaterial"/></td> |
1872 |
31 Jan 06 |
nicklas |
268 |
</tr> |
1872 |
31 Jan 06 |
nicklas |
269 |
<% |
1872 |
31 Jan 06 |
nicklas |
270 |
} |
5642 |
26 May 11 |
nicklas |
271 |
else if (eventType == BioMaterialEvent.Type.BIOASSAY) |
2533 |
16 Aug 06 |
martin |
272 |
{ |
1872 |
31 Jan 06 |
nicklas |
273 |
%> |
1872 |
31 Jan 06 |
nicklas |
274 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
275 |
<th>Physical bioassay</th> |
5642 |
26 May 11 |
nicklas |
276 |
<td><base:propertyvalue item="<%=event%>" property="physicalBioAssay"/></td> |
1872 |
31 Jan 06 |
nicklas |
277 |
</tr> |
1872 |
31 Jan 06 |
nicklas |
278 |
<% |
1872 |
31 Jan 06 |
nicklas |
279 |
} |
5663 |
22 Jun 11 |
nicklas |
280 |
SpecialQuery<BioMaterialEventSource> sourcesQuery = event.getEventSources(); |
5663 |
22 Jun 11 |
nicklas |
281 |
sourcesQuery.order(Orders.asc(Hql.property("bioMaterial.name"))); |
5663 |
22 Jun 11 |
nicklas |
282 |
ResultList<BioMaterialEventSource> sources = sourcesQuery.list(dc); |
1872 |
31 Jan 06 |
nicklas |
283 |
%> |
5937 |
27 Jan 12 |
nicklas |
284 |
<tr class="big"> |
5937 |
27 Jan 12 |
nicklas |
285 |
<th>Sources</th> |
1872 |
31 Jan 06 |
nicklas |
286 |
<td> |
1872 |
31 Jan 06 |
nicklas |
287 |
<% |
5663 |
22 Jun 11 |
nicklas |
288 |
for (BioMaterialEventSource evtSrc : sources) |
1872 |
31 Jan 06 |
nicklas |
289 |
{ |
5663 |
22 Jun 11 |
nicklas |
290 |
BioMaterial source = null; |
5663 |
22 Jun 11 |
nicklas |
291 |
Item sourceType = null; |
5663 |
22 Jun 11 |
nicklas |
292 |
try |
5663 |
22 Jun 11 |
nicklas |
293 |
{ |
5663 |
22 Jun 11 |
nicklas |
294 |
source = evtSrc.getBioMaterial(); |
5663 |
22 Jun 11 |
nicklas |
295 |
sourceType = source.getType(); |
5663 |
22 Jun 11 |
nicklas |
296 |
} |
5663 |
22 Jun 11 |
nicklas |
297 |
catch (PermissionDeniedException ex) |
5663 |
22 Jun 11 |
nicklas |
298 |
{} |
1872 |
31 Jan 06 |
nicklas |
299 |
%> |
5663 |
22 Jun 11 |
nicklas |
300 |
<%=Base.getLinkedName(ID, source, source == null, true)%> |
5663 |
22 Jun 11 |
nicklas |
301 |
<%=sourceType != null ? "(" + sourceType + ")" : "" %> |
6268 |
11 Apr 13 |
nicklas |
302 |
<%=quantityFormatter.format(evtSrc.getUsedQuantity())%> |
1872 |
31 Jan 06 |
nicklas |
303 |
<br> |
1872 |
31 Jan 06 |
nicklas |
304 |
<% |
1872 |
31 Jan 06 |
nicklas |
305 |
} |
1872 |
31 Jan 06 |
nicklas |
306 |
%> |
1872 |
31 Jan 06 |
nicklas |
307 |
</td> |
1872 |
31 Jan 06 |
nicklas |
308 |
</tr> |
1872 |
31 Jan 06 |
nicklas |
309 |
<% |
1872 |
31 Jan 06 |
nicklas |
310 |
} |
1872 |
31 Jan 06 |
nicklas |
311 |
%> |
1872 |
31 Jan 06 |
nicklas |
312 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
313 |
<th>Protocol</th> |
2533 |
16 Aug 06 |
martin |
314 |
<td><base:propertyvalue item="<%=event%>" property="protocol"/></td> |
1872 |
31 Jan 06 |
nicklas |
315 |
</tr> |
1872 |
31 Jan 06 |
nicklas |
316 |
<tr> |
6993 |
03 Nov 15 |
nicklas |
317 |
<th>Kit</th> |
6993 |
03 Nov 15 |
nicklas |
318 |
<td><base:propertyvalue item="<%=event%>" property="kit"/></td> |
6993 |
03 Nov 15 |
nicklas |
319 |
</tr> |
6993 |
03 Nov 15 |
nicklas |
320 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
321 |
<th>User</th> |
5530 |
15 Dec 10 |
nicklas |
322 |
<td><base:propertyvalue item="<%=event%>" property="user"/></td> |
5530 |
15 Dec 10 |
nicklas |
323 |
</tr> |
5530 |
15 Dec 10 |
nicklas |
324 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
325 |
<th>Permissions</th> |
5937 |
27 Jan 12 |
nicklas |
326 |
<td><%=PermissionUtil.getFullPermissionNames(event)%></td> |
5937 |
27 Jan 12 |
nicklas |
327 |
</tr> |
5937 |
27 Jan 12 |
nicklas |
328 |
<tr> |
5937 |
27 Jan 12 |
nicklas |
329 |
<th>Comment</th> |
1872 |
31 Jan 06 |
nicklas |
330 |
<td><%=HTML.niceFormat(event.getComment())%></td> |
1872 |
31 Jan 06 |
nicklas |
331 |
</tr> |
1872 |
31 Jan 06 |
nicklas |
332 |
</table> |
6145 |
21 Sep 12 |
nicklas |
333 |
</div> |
5496 |
17 Nov 10 |
nicklas |
334 |
|
5496 |
17 Nov 10 |
nicklas |
335 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5496 |
17 Nov 10 |
nicklas |
336 |
<jsp:param name="ID" value="<%=ID%>" /> |
5496 |
17 Nov 10 |
nicklas |
337 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5496 |
17 Nov 10 |
nicklas |
338 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5496 |
17 Nov 10 |
nicklas |
339 |
<jsp:param name="title" value="Other items related to this event" /> |
5496 |
17 Nov 10 |
nicklas |
340 |
</jsp:include> |
5496 |
17 Nov 10 |
nicklas |
341 |
|
1872 |
31 Jan 06 |
nicklas |
342 |
</t:tab> |
1872 |
31 Jan 06 |
nicklas |
343 |
</t:tabcontrol> |
1872 |
31 Jan 06 |
nicklas |
344 |
|
1872 |
31 Jan 06 |
nicklas |
345 |
</base:body> |
1872 |
31 Jan 06 |
nicklas |
346 |
</base:page> |
1872 |
31 Jan 06 |
nicklas |
347 |
<% |
1872 |
31 Jan 06 |
nicklas |
348 |
} |
1872 |
31 Jan 06 |
nicklas |
349 |
finally |
1872 |
31 Jan 06 |
nicklas |
350 |
{ |
1872 |
31 Jan 06 |
nicklas |
351 |
if (dc != null) dc.close(); |
1872 |
31 Jan 06 |
nicklas |
352 |
} |
1872 |
31 Jan 06 |
nicklas |
353 |
|
1872 |
31 Jan 06 |
nicklas |
354 |
%> |