1847 |
26 Jan 06 |
nicklas |
1 |
<%-- $Id$ |
1847 |
26 Jan 06 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Martin Svensson |
1847 |
26 Jan 06 |
nicklas |
5 |
|
2304 |
22 May 06 |
jari |
6 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
7 |
Available at http://base.thep.lu.se/ |
1847 |
26 Jan 06 |
nicklas |
8 |
|
1847 |
26 Jan 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
1847 |
26 Jan 06 |
nicklas |
10 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
11 |
as published by the Free Software Foundation; either version 3 |
1847 |
26 Jan 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
1847 |
26 Jan 06 |
nicklas |
13 |
|
1847 |
26 Jan 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
1847 |
26 Jan 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1847 |
26 Jan 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1847 |
26 Jan 06 |
nicklas |
17 |
GNU General Public License for more details. |
1847 |
26 Jan 06 |
nicklas |
18 |
|
1847 |
26 Jan 06 |
nicklas |
19 |
You should have received a copy of the GNU General Public License |
4511 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
1847 |
26 Jan 06 |
nicklas |
21 |
------------------------------------------------------------------ |
1847 |
26 Jan 06 |
nicklas |
22 |
|
1847 |
26 Jan 06 |
nicklas |
23 |
@author Nicklas |
1847 |
26 Jan 06 |
nicklas |
24 |
@version 2.0 |
1847 |
26 Jan 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
1847 |
26 Jan 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
1847 |
26 Jan 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
1847 |
26 Jan 06 |
nicklas |
29 |
import="net.sf.basedb.core.SystemItems" |
3547 |
03 Jul 07 |
martin |
30 |
import="net.sf.basedb.core.Group" |
1847 |
26 Jan 06 |
nicklas |
31 |
import="net.sf.basedb.core.Item" |
1847 |
26 Jan 06 |
nicklas |
32 |
import="net.sf.basedb.core.ItemContext" |
1847 |
26 Jan 06 |
nicklas |
33 |
import="net.sf.basedb.core.Permission" |
1847 |
26 Jan 06 |
nicklas |
34 |
import="net.sf.basedb.core.AnnotationType" |
1847 |
26 Jan 06 |
nicklas |
35 |
import="net.sf.basedb.core.AnnotationSet" |
1847 |
26 Jan 06 |
nicklas |
36 |
import="net.sf.basedb.core.Plate" |
1847 |
26 Jan 06 |
nicklas |
37 |
import="net.sf.basedb.core.PlateType" |
1847 |
26 Jan 06 |
nicklas |
38 |
import="net.sf.basedb.core.PlateGeometry" |
1847 |
26 Jan 06 |
nicklas |
39 |
import="net.sf.basedb.core.PlateMapping" |
1847 |
26 Jan 06 |
nicklas |
40 |
import="net.sf.basedb.core.User" |
1847 |
26 Jan 06 |
nicklas |
41 |
import="net.sf.basedb.core.ItemQuery" |
1847 |
26 Jan 06 |
nicklas |
42 |
import="net.sf.basedb.core.Include" |
3547 |
03 Jul 07 |
martin |
43 |
import="net.sf.basedb.core.ItemResultIterator" |
1847 |
26 Jan 06 |
nicklas |
44 |
import="net.sf.basedb.core.ItemResultList" |
3547 |
03 Jul 07 |
martin |
45 |
import="net.sf.basedb.core.MultiPermissions" |
1847 |
26 Jan 06 |
nicklas |
46 |
import="net.sf.basedb.core.PermissionDeniedException" |
1847 |
26 Jan 06 |
nicklas |
47 |
import="net.sf.basedb.core.PluginDefinition" |
1847 |
26 Jan 06 |
nicklas |
48 |
import="net.sf.basedb.core.plugin.GuiContext" |
1847 |
26 Jan 06 |
nicklas |
49 |
import="net.sf.basedb.core.plugin.Plugin" |
3547 |
03 Jul 07 |
martin |
50 |
import="net.sf.basedb.core.Project" |
1847 |
26 Jan 06 |
nicklas |
51 |
import="net.sf.basedb.core.query.Orders" |
1847 |
26 Jan 06 |
nicklas |
52 |
import="net.sf.basedb.core.query.Hql" |
1847 |
26 Jan 06 |
nicklas |
53 |
import="net.sf.basedb.clients.web.Base" |
5062 |
19 Aug 09 |
nicklas |
54 |
import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
2386 |
15 Jun 06 |
martin |
55 |
import="net.sf.basedb.clients.web.PermissionUtil" |
1847 |
26 Jan 06 |
nicklas |
56 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
57 |
import="net.sf.basedb.util.Values" |
4698 |
10 Dec 08 |
nicklas |
58 |
import="net.sf.basedb.util.formatter.Formatter" |
4698 |
10 Dec 08 |
nicklas |
59 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4884 |
03 Apr 09 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4884 |
03 Apr 09 |
nicklas |
61 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4884 |
03 Apr 09 |
nicklas |
62 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
63 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4884 |
03 Apr 09 |
nicklas |
64 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4884 |
03 Apr 09 |
nicklas |
65 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
3547 |
03 Jul 07 |
martin |
66 |
import="java.util.Collections" |
1847 |
26 Jan 06 |
nicklas |
67 |
import="java.util.Date" |
1847 |
26 Jan 06 |
nicklas |
68 |
import="java.util.Map" |
1847 |
26 Jan 06 |
nicklas |
69 |
import="java.util.Set" |
1847 |
26 Jan 06 |
nicklas |
70 |
import="java.util.List" |
1847 |
26 Jan 06 |
nicklas |
71 |
%> |
1847 |
26 Jan 06 |
nicklas |
72 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1847 |
26 Jan 06 |
nicklas |
73 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
1847 |
26 Jan 06 |
nicklas |
74 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
1862 |
30 Jan 06 |
nicklas |
75 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4884 |
03 Apr 09 |
nicklas |
76 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
1847 |
26 Jan 06 |
nicklas |
77 |
<%! |
1847 |
26 Jan 06 |
nicklas |
78 |
private static final Item itemType = Item.PLATE; |
1847 |
26 Jan 06 |
nicklas |
79 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
1847 |
26 Jan 06 |
nicklas |
80 |
%> |
1847 |
26 Jan 06 |
nicklas |
81 |
<% |
1847 |
26 Jan 06 |
nicklas |
82 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1847 |
26 Jan 06 |
nicklas |
83 |
final String ID = sc.getId(); |
1847 |
26 Jan 06 |
nicklas |
84 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
1847 |
26 Jan 06 |
nicklas |
85 |
final int itemId = cc.getId(); |
1862 |
30 Jan 06 |
nicklas |
86 |
final String tab = Values.getString(request.getParameter("tab"), "properties"); |
1847 |
26 Jan 06 |
nicklas |
87 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
88 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
1847 |
26 Jan 06 |
nicklas |
89 |
try |
1847 |
26 Jan 06 |
nicklas |
90 |
{ |
4698 |
10 Dec 08 |
nicklas |
91 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
1847 |
26 Jan 06 |
nicklas |
92 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
1847 |
26 Jan 06 |
nicklas |
93 |
|
1847 |
26 Jan 06 |
nicklas |
94 |
String title = null; |
1847 |
26 Jan 06 |
nicklas |
95 |
Plate plate = Plate.getById(dc, itemId); |
1847 |
26 Jan 06 |
nicklas |
96 |
|
1847 |
26 Jan 06 |
nicklas |
97 |
PlateMapping currentPlateMapping = null; |
1847 |
26 Jan 06 |
nicklas |
98 |
try |
1847 |
26 Jan 06 |
nicklas |
99 |
{ |
1847 |
26 Jan 06 |
nicklas |
100 |
currentPlateMapping = plate.getPlateMapping(); |
1847 |
26 Jan 06 |
nicklas |
101 |
} |
1847 |
26 Jan 06 |
nicklas |
102 |
catch (PermissionDeniedException ex) |
2446 |
29 Jun 06 |
nicklas |
103 |
{} |
2446 |
29 Jun 06 |
nicklas |
104 |
|
2446 |
29 Jun 06 |
nicklas |
105 |
final boolean writePermission = plate.hasPermission(Permission.WRITE); |
2446 |
29 Jun 06 |
nicklas |
106 |
final boolean deletePermission = plate.hasPermission(Permission.DELETE); |
2446 |
29 Jun 06 |
nicklas |
107 |
final boolean sharePermission = plate.hasPermission(Permission.SET_PERMISSION); |
2919 |
15 Nov 06 |
nicklas |
108 |
final boolean setOwnerPermission = plate.hasPermission(Permission.SET_OWNER); |
4003 |
26 Nov 07 |
nicklas |
109 |
final boolean isRemoved = plate.isRemoved(); |
4003 |
26 Nov 07 |
nicklas |
110 |
final boolean isUsed = isRemoved && plate.isUsed(); |
4003 |
26 Nov 07 |
nicklas |
111 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
2919 |
15 Nov 06 |
nicklas |
112 |
final boolean isOwner = plate.isOwner(); |
4884 |
03 Apr 09 |
nicklas |
113 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, plate); |
7604 |
25 Feb 19 |
nicklas |
114 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
1847 |
26 Jan 06 |
nicklas |
115 |
%> |
6307 |
15 Aug 13 |
nicklas |
116 |
<base:page title="<%=title%>" id="view-page"> |
6307 |
15 Aug 13 |
nicklas |
117 |
<base:head scripts="tabcontrol-2.js,table.js,~plates.js" styles="toolbar.css,table.css,headertabcontrol.css,path.css"> |
4884 |
03 Apr 09 |
nicklas |
118 |
<ext:scripts context="<%=jspContext%>" /> |
4884 |
03 Apr 09 |
nicklas |
119 |
<ext:stylesheets context="<%=jspContext%>" /> |
1847 |
26 Jan 06 |
nicklas |
120 |
</base:head> |
1847 |
26 Jan 06 |
nicklas |
121 |
<base:body> |
5943 |
01 Feb 12 |
nicklas |
122 |
<p:path><p:pathelement |
5943 |
01 Feb 12 |
nicklas |
123 |
title="Plates" href="<%="index.jsp?ID="+ID%>" |
5943 |
01 Feb 12 |
nicklas |
124 |
/><p:pathelement title="<%=HTML.encodeTags(plate.getName())%>" |
5943 |
01 Feb 12 |
nicklas |
125 |
/></p:path> |
6307 |
15 Aug 13 |
nicklas |
126 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
1862 |
30 Jan 06 |
nicklas |
127 |
|
5943 |
01 Feb 12 |
nicklas |
128 |
<t:tabcontrol |
5943 |
01 Feb 12 |
nicklas |
129 |
id="main" |
5943 |
01 Feb 12 |
nicklas |
130 |
subclass="content mastertabcontrol" |
6307 |
15 Aug 13 |
nicklas |
131 |
active="<%=tab%>"> |
1862 |
30 Jan 06 |
nicklas |
132 |
<t:tab id="properties" title="Properties"> |
5943 |
01 Feb 12 |
nicklas |
133 |
<div> |
5943 |
01 Feb 12 |
nicklas |
134 |
<table class="fullform bottomborder"> |
5943 |
01 Feb 12 |
nicklas |
135 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
136 |
<th class="itemstatus"> |
4003 |
26 Nov 07 |
nicklas |
137 |
<base:icon |
5946 |
03 Feb 12 |
nicklas |
138 |
image="shared.png" |
5943 |
01 Feb 12 |
nicklas |
139 |
visible="<%=plate.isShared()%>" |
5943 |
01 Feb 12 |
nicklas |
140 |
tooltip="This item is shared to other users, groups and/or projects" |
5943 |
01 Feb 12 |
nicklas |
141 |
/> |
5943 |
01 Feb 12 |
nicklas |
142 |
<base:icon |
6307 |
15 Aug 13 |
nicklas |
143 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
144 |
image="deleted.png" |
5943 |
01 Feb 12 |
nicklas |
145 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5943 |
01 Feb 12 |
nicklas |
146 |
enabled="<%=deletePermanentlyPermission %>" |
5943 |
01 Feb 12 |
nicklas |
147 |
visible="<%=isRemoved%>" |
5943 |
01 Feb 12 |
nicklas |
148 |
/> |
6307 |
15 Aug 13 |
nicklas |
149 |
<base:icon |
6307 |
15 Aug 13 |
nicklas |
150 |
id="btnUsingItems" |
6307 |
15 Aug 13 |
nicklas |
151 |
image="used.png" |
5943 |
01 Feb 12 |
nicklas |
152 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5943 |
01 Feb 12 |
nicklas |
153 |
visible="<%=isRemoved && isUsed%>" /> |
5943 |
01 Feb 12 |
nicklas |
154 |
</th> |
5943 |
01 Feb 12 |
nicklas |
155 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
156 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5943 |
01 Feb 12 |
nicklas |
157 |
<tbl:button |
6307 |
15 Aug 13 |
nicklas |
158 |
id="btnEdit" |
5943 |
01 Feb 12 |
nicklas |
159 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
160 |
image="edit.png" |
5943 |
01 Feb 12 |
nicklas |
161 |
title="Edit…" |
5943 |
01 Feb 12 |
nicklas |
162 |
tooltip="<%=writePermission ? "Edit this plate" : "You do not have permission to edit this plate"%>" |
5943 |
01 Feb 12 |
nicklas |
163 |
/> |
5943 |
01 Feb 12 |
nicklas |
164 |
<tbl:button |
6307 |
15 Aug 13 |
nicklas |
165 |
id="btnDelete" |
5943 |
01 Feb 12 |
nicklas |
166 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
167 |
image="delete.png" |
5943 |
01 Feb 12 |
nicklas |
168 |
title="Delete" |
5943 |
01 Feb 12 |
nicklas |
169 |
visible="<%=!plate.isRemoved()%>" |
5943 |
01 Feb 12 |
nicklas |
170 |
tooltip="<%=deletePermission ? "Delete this plate" : "You do not have permission to delete this plate"%>" |
5943 |
01 Feb 12 |
nicklas |
171 |
/> |
5943 |
01 Feb 12 |
nicklas |
172 |
<tbl:button |
6307 |
15 Aug 13 |
nicklas |
173 |
id="btnRestore" |
5943 |
01 Feb 12 |
nicklas |
174 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
175 |
image="restore.png" |
5943 |
01 Feb 12 |
nicklas |
176 |
title="Restore" |
5943 |
01 Feb 12 |
nicklas |
177 |
visible="<%=plate.isRemoved()%>" |
5943 |
01 Feb 12 |
nicklas |
178 |
tooltip="<%=writePermission ? "Restore this plate" : "You do not have permission to restore this plate"%>" |
5943 |
01 Feb 12 |
nicklas |
179 |
/> |
5943 |
01 Feb 12 |
nicklas |
180 |
<tbl:button |
6307 |
15 Aug 13 |
nicklas |
181 |
id="btnShare" |
5943 |
01 Feb 12 |
nicklas |
182 |
disabled="<%=!sharePermission%>" |
5945 |
02 Feb 12 |
nicklas |
183 |
image="share.png" |
5943 |
01 Feb 12 |
nicklas |
184 |
title="Share…" |
5943 |
01 Feb 12 |
nicklas |
185 |
tooltip="<%=sharePermission ? "Share this plate to other user, groups and projects" : "You do not have permission to share this plate"%>" |
5943 |
01 Feb 12 |
nicklas |
186 |
/> |
5943 |
01 Feb 12 |
nicklas |
187 |
<tbl:button |
6307 |
15 Aug 13 |
nicklas |
188 |
id="btnSetOwner" |
5943 |
01 Feb 12 |
nicklas |
189 |
disabled="<%=!setOwnerPermission%>" |
5943 |
01 Feb 12 |
nicklas |
190 |
image="take_ownership.png" |
5943 |
01 Feb 12 |
nicklas |
191 |
title="Set owner…" |
5943 |
01 Feb 12 |
nicklas |
192 |
tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
5943 |
01 Feb 12 |
nicklas |
193 |
/> |
5943 |
01 Feb 12 |
nicklas |
194 |
<tbl:button |
6307 |
15 Aug 13 |
nicklas |
195 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
196 |
image="import.png" |
6307 |
15 Aug 13 |
nicklas |
197 |
data-plugin-type="IMPORT" |
5943 |
01 Feb 12 |
nicklas |
198 |
title="Import…" |
5943 |
01 Feb 12 |
nicklas |
199 |
tooltip="Import data" |
5943 |
01 Feb 12 |
nicklas |
200 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5943 |
01 Feb 12 |
nicklas |
201 |
/> |
5943 |
01 Feb 12 |
nicklas |
202 |
<tbl:button |
6307 |
15 Aug 13 |
nicklas |
203 |
id="btnExport" |
6307 |
15 Aug 13 |
nicklas |
204 |
image="export.png" |
6307 |
15 Aug 13 |
nicklas |
205 |
data-plugin-type="EXPORT" |
5943 |
01 Feb 12 |
nicklas |
206 |
title="Export…" |
5943 |
01 Feb 12 |
nicklas |
207 |
tooltip="Export data" |
5943 |
01 Feb 12 |
nicklas |
208 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5943 |
01 Feb 12 |
nicklas |
209 |
/> |
5943 |
01 Feb 12 |
nicklas |
210 |
<tbl:button |
6307 |
15 Aug 13 |
nicklas |
211 |
id="btnRunPlugin" |
6307 |
15 Aug 13 |
nicklas |
212 |
image="runplugin.png" |
6307 |
15 Aug 13 |
nicklas |
213 |
data-plugin-type="OTHER" |
5943 |
01 Feb 12 |
nicklas |
214 |
title="Run plugin…" |
5943 |
01 Feb 12 |
nicklas |
215 |
tooltip="Run a plugin" |
5943 |
01 Feb 12 |
nicklas |
216 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5943 |
01 Feb 12 |
nicklas |
217 |
/> |
5943 |
01 Feb 12 |
nicklas |
218 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
219 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5943 |
01 Feb 12 |
nicklas |
220 |
<tbl:button |
5943 |
01 Feb 12 |
nicklas |
221 |
image="help.png" |
6307 |
15 Aug 13 |
nicklas |
222 |
subclass="auto-init" |
6307 |
15 Aug 13 |
nicklas |
223 |
data-auto-init="help" |
6307 |
15 Aug 13 |
nicklas |
224 |
data-help-id="plate.view.properties" |
5943 |
01 Feb 12 |
nicklas |
225 |
title="Help…" |
5943 |
01 Feb 12 |
nicklas |
226 |
tooltip="Get help about this page" |
5943 |
01 Feb 12 |
nicklas |
227 |
/> |
5943 |
01 Feb 12 |
nicklas |
228 |
</tbl:toolbar> |
5943 |
01 Feb 12 |
nicklas |
229 |
</td> |
5943 |
01 Feb 12 |
nicklas |
230 |
</tr> |
1847 |
26 Jan 06 |
nicklas |
231 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
232 |
<th>Name</th> |
1847 |
26 Jan 06 |
nicklas |
233 |
<td><%=HTML.encodeTags(plate.getName())%></td> |
1847 |
26 Jan 06 |
nicklas |
234 |
</tr> |
1847 |
26 Jan 06 |
nicklas |
235 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
236 |
<th>Registered</th> |
4698 |
10 Dec 08 |
nicklas |
237 |
<td><%=dateFormatter.format(plate.getEntryDate())%></td> |
4698 |
10 Dec 08 |
nicklas |
238 |
</tr> |
4698 |
10 Dec 08 |
nicklas |
239 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
240 |
<th>Barcode</th> |
1847 |
26 Jan 06 |
nicklas |
241 |
<td><%=HTML.encodeTags(plate.getBarcode())%></td> |
1847 |
26 Jan 06 |
nicklas |
242 |
</tr> |
1847 |
26 Jan 06 |
nicklas |
243 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
244 |
<th>Destroyed</th> |
1847 |
26 Jan 06 |
nicklas |
245 |
<td><%=plate.isDestroyed() ? "yes" : "no"%></td> |
1847 |
26 Jan 06 |
nicklas |
246 |
</tr> |
1847 |
26 Jan 06 |
nicklas |
247 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
248 |
<th>Type</th> |
2446 |
29 Jun 06 |
nicklas |
249 |
<td><base:propertyvalue item="<%=plate%>" property="plateType" /></td> |
1847 |
26 Jan 06 |
nicklas |
250 |
</tr> |
1847 |
26 Jan 06 |
nicklas |
251 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
252 |
<th>Geometry</th> |
2446 |
29 Jun 06 |
nicklas |
253 |
<td><base:propertyvalue item="<%=plate%>" property="plateType.plateGeometry" /></td> |
1847 |
26 Jan 06 |
nicklas |
254 |
</tr> |
5943 |
01 Feb 12 |
nicklas |
255 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
256 |
<th>Merge mapping</th> |
1948 |
09 Feb 06 |
nicklas |
257 |
<td><% |
1948 |
09 Feb 06 |
nicklas |
258 |
if (currentPlateMapping != null && currentPlateMapping.getImage() != null) |
1948 |
09 Feb 06 |
nicklas |
259 |
{ |
1948 |
09 Feb 06 |
nicklas |
260 |
%> |
1948 |
09 Feb 06 |
nicklas |
261 |
<img id="mappingImage" src="../../images/platemappings/<%=currentPlateMapping.getImage()%>" align="right"> |
1948 |
09 Feb 06 |
nicklas |
262 |
<% |
1948 |
09 Feb 06 |
nicklas |
263 |
} |
1948 |
09 Feb 06 |
nicklas |
264 |
%> |
2446 |
29 Jun 06 |
nicklas |
265 |
<base:propertyvalue item="<%=plate%>" property="plateMapping" /> |
1948 |
09 Feb 06 |
nicklas |
266 |
</td> |
1847 |
26 Jan 06 |
nicklas |
267 |
</tr> |
1847 |
26 Jan 06 |
nicklas |
268 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
269 |
<th>Owner</th> |
2446 |
29 Jun 06 |
nicklas |
270 |
<td><base:propertyvalue item="<%=plate%>" property="owner" /></td> |
1847 |
26 Jan 06 |
nicklas |
271 |
</tr> |
1847 |
26 Jan 06 |
nicklas |
272 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
273 |
<th>Permissions</th> |
5943 |
01 Feb 12 |
nicklas |
274 |
<td><%=PermissionUtil.getFullPermissionNames(plate)%></td> |
5943 |
01 Feb 12 |
nicklas |
275 |
</tr> |
5943 |
01 Feb 12 |
nicklas |
276 |
<tr> |
5943 |
01 Feb 12 |
nicklas |
277 |
<th>Description</th> |
1847 |
26 Jan 06 |
nicklas |
278 |
<td><%=HTML.niceFormat(plate.getDescription())%></td> |
1847 |
26 Jan 06 |
nicklas |
279 |
</tr> |
1847 |
26 Jan 06 |
nicklas |
280 |
</table> |
5943 |
01 Feb 12 |
nicklas |
281 |
</div> |
1948 |
09 Feb 06 |
nicklas |
282 |
<% |
1948 |
09 Feb 06 |
nicklas |
283 |
ItemQuery<Plate> parentPlatesQuery = plate.getParentPlates(); |
3888 |
29 Oct 07 |
nicklas |
284 |
parentPlatesQuery.include(Include.ALL); |
1948 |
09 Feb 06 |
nicklas |
285 |
parentPlatesQuery.order(Orders.asc(Hql.property("name"))); |
1948 |
09 Feb 06 |
nicklas |
286 |
ItemResultList<Plate> parentPlates = parentPlatesQuery.list(dc); |
5943 |
01 Feb 12 |
nicklas |
287 |
%> |
5943 |
01 Feb 12 |
nicklas |
288 |
<base:section |
5943 |
01 Feb 12 |
nicklas |
289 |
id="parents" |
5943 |
01 Feb 12 |
nicklas |
290 |
title="<%="Parent plates (" + parentPlates.size() + ")"%>" |
5943 |
01 Feb 12 |
nicklas |
291 |
context="<%=cc%>" |
5943 |
01 Feb 12 |
nicklas |
292 |
> |
1948 |
09 Feb 06 |
nicklas |
293 |
<% |
5943 |
01 Feb 12 |
nicklas |
294 |
if (parentPlates.size() == 0) |
5943 |
01 Feb 12 |
nicklas |
295 |
{ |
5943 |
01 Feb 12 |
nicklas |
296 |
%> |
5943 |
01 Feb 12 |
nicklas |
297 |
<div class="messagecontainer note"> |
5943 |
01 Feb 12 |
nicklas |
298 |
This plate doesn't have any parents (or, you don't have permission to view them). |
5943 |
01 Feb 12 |
nicklas |
299 |
</div> |
5943 |
01 Feb 12 |
nicklas |
300 |
<% |
5943 |
01 Feb 12 |
nicklas |
301 |
} |
5943 |
01 Feb 12 |
nicklas |
302 |
else |
5943 |
01 Feb 12 |
nicklas |
303 |
{ |
5943 |
01 Feb 12 |
nicklas |
304 |
%> |
5044 |
11 Aug 09 |
martin |
305 |
<tbl:table |
5044 |
11 Aug 09 |
martin |
306 |
id="parentplates" |
5044 |
11 Aug 09 |
martin |
307 |
columns="all" |
5044 |
11 Aug 09 |
martin |
308 |
> |
5044 |
11 Aug 09 |
martin |
309 |
<tbl:columndef |
5044 |
11 Aug 09 |
martin |
310 |
id="name" |
5044 |
11 Aug 09 |
martin |
311 |
title="Name" |
5044 |
11 Aug 09 |
martin |
312 |
/> |
5044 |
11 Aug 09 |
martin |
313 |
<tbl:columndef |
5044 |
11 Aug 09 |
martin |
314 |
id="index" |
5044 |
11 Aug 09 |
martin |
315 |
title="Index" |
5044 |
11 Aug 09 |
martin |
316 |
/> |
5044 |
11 Aug 09 |
martin |
317 |
<tbl:columndef |
5044 |
11 Aug 09 |
martin |
318 |
id="description" |
5044 |
11 Aug 09 |
martin |
319 |
title="Description" |
5044 |
11 Aug 09 |
martin |
320 |
/> |
5044 |
11 Aug 09 |
martin |
321 |
<tbl:data> |
5943 |
01 Feb 12 |
nicklas |
322 |
<tbl:headers> |
5943 |
01 Feb 12 |
nicklas |
323 |
<tbl:headerrow> |
5943 |
01 Feb 12 |
nicklas |
324 |
<tbl:columnheaders /> |
5943 |
01 Feb 12 |
nicklas |
325 |
</tbl:headerrow> |
5943 |
01 Feb 12 |
nicklas |
326 |
</tbl:headers> |
5044 |
11 Aug 09 |
martin |
327 |
<tbl:rows> |
5044 |
11 Aug 09 |
martin |
328 |
<% |
5044 |
11 Aug 09 |
martin |
329 |
for (Plate item : parentPlates) |
5044 |
11 Aug 09 |
martin |
330 |
{ |
5044 |
11 Aug 09 |
martin |
331 |
%> |
5044 |
11 Aug 09 |
martin |
332 |
<tbl:row> |
5044 |
11 Aug 09 |
martin |
333 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
334 |
image="deleted.png" |
5044 |
11 Aug 09 |
martin |
335 |
tooltip="This item has been scheduled for deletion" |
5044 |
11 Aug 09 |
martin |
336 |
visible="<%=item.isRemoved()%>" |
5044 |
11 Aug 09 |
martin |
337 |
/><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> |
5044 |
11 Aug 09 |
martin |
338 |
<tbl:cell column="index"><%=plate.getSourceIndex(item)+1%></tbl:cell> |
5044 |
11 Aug 09 |
martin |
339 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
5044 |
11 Aug 09 |
martin |
340 |
</tbl:row> |
5044 |
11 Aug 09 |
martin |
341 |
<% |
5044 |
11 Aug 09 |
martin |
342 |
} |
1948 |
09 Feb 06 |
nicklas |
343 |
%> |
5044 |
11 Aug 09 |
martin |
344 |
</tbl:rows> |
5044 |
11 Aug 09 |
martin |
345 |
</tbl:data> |
5044 |
11 Aug 09 |
martin |
346 |
</tbl:table> |
5943 |
01 Feb 12 |
nicklas |
347 |
<% |
5943 |
01 Feb 12 |
nicklas |
348 |
} |
5943 |
01 Feb 12 |
nicklas |
349 |
%> |
5943 |
01 Feb 12 |
nicklas |
350 |
</base:section> |
2446 |
29 Jun 06 |
nicklas |
351 |
<% |
2446 |
29 Jun 06 |
nicklas |
352 |
ItemQuery<Plate> childPlatesQuery = plate.getChildPlates(); |
3888 |
29 Oct 07 |
nicklas |
353 |
childPlatesQuery.include(Include.ALL); |
2446 |
29 Jun 06 |
nicklas |
354 |
childPlatesQuery.order(Orders.asc(Hql.property("name"))); |
2446 |
29 Jun 06 |
nicklas |
355 |
ItemResultList<Plate> childPlates = childPlatesQuery.list(dc); |
5943 |
01 Feb 12 |
nicklas |
356 |
%> |
5943 |
01 Feb 12 |
nicklas |
357 |
<base:section |
5943 |
01 Feb 12 |
nicklas |
358 |
id="children" |
5943 |
01 Feb 12 |
nicklas |
359 |
title="<%="Child plates (" + childPlates.size() + ")"%>" |
5943 |
01 Feb 12 |
nicklas |
360 |
context="<%=cc%>" |
5943 |
01 Feb 12 |
nicklas |
361 |
> |
2446 |
29 Jun 06 |
nicklas |
362 |
<% |
5943 |
01 Feb 12 |
nicklas |
363 |
if (childPlates.size() == 0) |
5943 |
01 Feb 12 |
nicklas |
364 |
{ |
5943 |
01 Feb 12 |
nicklas |
365 |
%> |
5943 |
01 Feb 12 |
nicklas |
366 |
<div class="messagecontainer note"> |
5943 |
01 Feb 12 |
nicklas |
367 |
This plate doesn't have any children (or, you don't have permission to view them). |
5943 |
01 Feb 12 |
nicklas |
368 |
</div> |
5943 |
01 Feb 12 |
nicklas |
369 |
<% |
5943 |
01 Feb 12 |
nicklas |
370 |
} |
5943 |
01 Feb 12 |
nicklas |
371 |
else |
5943 |
01 Feb 12 |
nicklas |
372 |
{ |
5943 |
01 Feb 12 |
nicklas |
373 |
%> |
5044 |
11 Aug 09 |
martin |
374 |
<tbl:table |
5044 |
11 Aug 09 |
martin |
375 |
id="childplates" |
5044 |
11 Aug 09 |
martin |
376 |
columns="all" |
5044 |
11 Aug 09 |
martin |
377 |
> |
3547 |
03 Jul 07 |
martin |
378 |
<tbl:columndef |
3547 |
03 Jul 07 |
martin |
379 |
id="name" |
3547 |
03 Jul 07 |
martin |
380 |
title="Name" |
3547 |
03 Jul 07 |
martin |
381 |
/> |
5044 |
11 Aug 09 |
martin |
382 |
<tbl:columndef |
5044 |
11 Aug 09 |
martin |
383 |
id="mapping" |
5044 |
11 Aug 09 |
martin |
384 |
title="Mapping" |
5044 |
11 Aug 09 |
martin |
385 |
/> |
3547 |
03 Jul 07 |
martin |
386 |
<tbl:columndef |
5044 |
11 Aug 09 |
martin |
387 |
id="index" |
5044 |
11 Aug 09 |
martin |
388 |
title="Index" |
3547 |
03 Jul 07 |
martin |
389 |
/> |
5044 |
11 Aug 09 |
martin |
390 |
<tbl:columndef |
5044 |
11 Aug 09 |
martin |
391 |
id="description" |
5044 |
11 Aug 09 |
martin |
392 |
title="Description" |
5044 |
11 Aug 09 |
martin |
393 |
/> |
3547 |
03 Jul 07 |
martin |
394 |
<tbl:data> |
5943 |
01 Feb 12 |
nicklas |
395 |
<tbl:headers> |
5943 |
01 Feb 12 |
nicklas |
396 |
<tbl:headerrow> |
5943 |
01 Feb 12 |
nicklas |
397 |
<tbl:columnheaders /> |
5943 |
01 Feb 12 |
nicklas |
398 |
</tbl:headerrow> |
5943 |
01 Feb 12 |
nicklas |
399 |
</tbl:headers> |
3547 |
03 Jul 07 |
martin |
400 |
<tbl:rows> |
3547 |
03 Jul 07 |
martin |
401 |
<% |
5044 |
11 Aug 09 |
martin |
402 |
for (Plate item : childPlates) |
3547 |
03 Jul 07 |
martin |
403 |
{ |
5044 |
11 Aug 09 |
martin |
404 |
%> |
3547 |
03 Jul 07 |
martin |
405 |
<tbl:row> |
3888 |
29 Oct 07 |
nicklas |
406 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
407 |
image="deleted.png" |
5044 |
11 Aug 09 |
martin |
408 |
tooltip="This item has been scheduled for deletion" |
5044 |
11 Aug 09 |
martin |
409 |
visible="<%=item.isRemoved()%>" |
5044 |
11 Aug 09 |
martin |
410 |
/><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> |
5044 |
11 Aug 09 |
martin |
411 |
<tbl:cell column="mapping"><base:propertyvalue item="<%=item%>" property="plateMapping" /></tbl:cell> |
5044 |
11 Aug 09 |
martin |
412 |
<tbl:cell column="index"><%=item.getSourceIndex(plate) + 1%></tbl:cell> |
5044 |
11 Aug 09 |
martin |
413 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
3547 |
03 Jul 07 |
martin |
414 |
</tbl:row> |
3547 |
03 Jul 07 |
martin |
415 |
<% |
3547 |
03 Jul 07 |
martin |
416 |
} |
3547 |
03 Jul 07 |
martin |
417 |
%> |
3547 |
03 Jul 07 |
martin |
418 |
</tbl:rows> |
3547 |
03 Jul 07 |
martin |
419 |
</tbl:data> |
5044 |
11 Aug 09 |
martin |
420 |
</tbl:table> |
5943 |
01 Feb 12 |
nicklas |
421 |
<% |
5943 |
01 Feb 12 |
nicklas |
422 |
} |
5943 |
01 Feb 12 |
nicklas |
423 |
%> |
5943 |
01 Feb 12 |
nicklas |
424 |
</base:section> |
5499 |
17 Nov 10 |
nicklas |
425 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5499 |
17 Nov 10 |
nicklas |
426 |
<jsp:param name="ID" value="<%=ID%>" /> |
5499 |
17 Nov 10 |
nicklas |
427 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5499 |
17 Nov 10 |
nicklas |
428 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5499 |
17 Nov 10 |
nicklas |
429 |
<jsp:param name="title" value="Other items related to this plate" /> |
5499 |
17 Nov 10 |
nicklas |
430 |
</jsp:include> |
5935 |
26 Jan 12 |
nicklas |
431 |
<jsp:include page="../../common/share/list_share.jsp"> |
5935 |
26 Jan 12 |
nicklas |
432 |
<jsp:param name="ID" value="<%=ID%>" /> |
5935 |
26 Jan 12 |
nicklas |
433 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5935 |
26 Jan 12 |
nicklas |
434 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5935 |
26 Jan 12 |
nicklas |
435 |
<jsp:param name="title" value="Shared to" /> |
5935 |
26 Jan 12 |
nicklas |
436 |
</jsp:include> |
1862 |
30 Jan 06 |
nicklas |
437 |
</t:tab> |
1847 |
26 Jan 06 |
nicklas |
438 |
|
5935 |
26 Jan 12 |
nicklas |
439 |
<t:tab id="annotations" title="Annotations" |
6307 |
15 Aug 13 |
nicklas |
440 |
tooltip="View annotation values" clazz="white"> |
6255 |
22 Mar 13 |
nicklas |
441 |
<jsp:include page="../../common/annotations/list_frameset.jsp"> |
1862 |
30 Jan 06 |
nicklas |
442 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
1862 |
30 Jan 06 |
nicklas |
443 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
1862 |
30 Jan 06 |
nicklas |
444 |
<jsp:param name="ID" value="<%=ID%>" /> |
1862 |
30 Jan 06 |
nicklas |
445 |
</jsp:include> |
1862 |
30 Jan 06 |
nicklas |
446 |
</t:tab> |
5935 |
26 Jan 12 |
nicklas |
447 |
|
1862 |
30 Jan 06 |
nicklas |
448 |
<t:tab id="events" title="Events" /> |
1862 |
30 Jan 06 |
nicklas |
449 |
<t:tab id="wells" title="Wells" /> |
7166 |
07 Jun 16 |
nicklas |
450 |
<t:tab id="history" title="History" |
7166 |
07 Jun 16 |
nicklas |
451 |
tooltip="Displays a log with the history of this item" |
6307 |
15 Aug 13 |
nicklas |
452 |
visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
6244 |
25 Feb 13 |
nicklas |
453 |
<jsp:include page="../../common/history/frameset.jsp"> |
6244 |
25 Feb 13 |
nicklas |
454 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6244 |
25 Feb 13 |
nicklas |
455 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6244 |
25 Feb 13 |
nicklas |
456 |
<jsp:param name="ID" value="<%=ID%>" /> |
6244 |
25 Feb 13 |
nicklas |
457 |
</jsp:include> |
5062 |
19 Aug 09 |
nicklas |
458 |
</t:tab> |
5943 |
01 Feb 12 |
nicklas |
459 |
</t:tabcontrol> |
1847 |
26 Jan 06 |
nicklas |
460 |
|
1847 |
26 Jan 06 |
nicklas |
461 |
</base:body> |
1847 |
26 Jan 06 |
nicklas |
462 |
</base:page> |
1847 |
26 Jan 06 |
nicklas |
463 |
<% |
1847 |
26 Jan 06 |
nicklas |
464 |
} |
1847 |
26 Jan 06 |
nicklas |
465 |
finally |
1847 |
26 Jan 06 |
nicklas |
466 |
{ |
1847 |
26 Jan 06 |
nicklas |
467 |
if (dc != null) dc.close(); |
1847 |
26 Jan 06 |
nicklas |
468 |
} |
1847 |
26 Jan 06 |
nicklas |
469 |
|
1847 |
26 Jan 06 |
nicklas |
470 |
%> |