1866 |
30 Jan 06 |
nicklas |
1 |
<%-- $Id$ |
1866 |
30 Jan 06 |
nicklas |
2 |
------------------------------------------------------------------ |
4889 |
06 Apr 09 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Martin Svensson |
1866 |
30 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/ |
1866 |
30 Jan 06 |
nicklas |
8 |
|
1866 |
30 Jan 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
1866 |
30 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 |
1866 |
30 Jan 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
1866 |
30 Jan 06 |
nicklas |
13 |
|
1866 |
30 Jan 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
1866 |
30 Jan 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1866 |
30 Jan 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1866 |
30 Jan 06 |
nicklas |
17 |
GNU General Public License for more details. |
1866 |
30 Jan 06 |
nicklas |
18 |
|
1866 |
30 Jan 06 |
nicklas |
19 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
1866 |
30 Jan 06 |
nicklas |
21 |
------------------------------------------------------------------ |
1866 |
30 Jan 06 |
nicklas |
22 |
|
1866 |
30 Jan 06 |
nicklas |
23 |
@author Nicklas |
1866 |
30 Jan 06 |
nicklas |
24 |
@version 2.0 |
1866 |
30 Jan 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
1866 |
30 Jan 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
1866 |
30 Jan 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
1866 |
30 Jan 06 |
nicklas |
29 |
import="net.sf.basedb.core.SystemItems" |
3547 |
03 Jul 07 |
martin |
30 |
import="net.sf.basedb.core.Group" |
1866 |
30 Jan 06 |
nicklas |
31 |
import="net.sf.basedb.core.Item" |
1866 |
30 Jan 06 |
nicklas |
32 |
import="net.sf.basedb.core.ItemContext" |
3547 |
03 Jul 07 |
martin |
33 |
import="net.sf.basedb.core.Nameable" |
1866 |
30 Jan 06 |
nicklas |
34 |
import="net.sf.basedb.core.Permission" |
3547 |
03 Jul 07 |
martin |
35 |
import="net.sf.basedb.core.MultiPermissions" |
1866 |
30 Jan 06 |
nicklas |
36 |
import="net.sf.basedb.core.BioSource" |
2404 |
21 Jun 06 |
nicklas |
37 |
import="net.sf.basedb.core.Sample" |
1866 |
30 Jan 06 |
nicklas |
38 |
import="net.sf.basedb.core.User" |
2404 |
21 Jun 06 |
nicklas |
39 |
import="net.sf.basedb.core.Include" |
1866 |
30 Jan 06 |
nicklas |
40 |
import="net.sf.basedb.core.ItemQuery" |
1866 |
30 Jan 06 |
nicklas |
41 |
import="net.sf.basedb.core.ItemResultList" |
1866 |
30 Jan 06 |
nicklas |
42 |
import="net.sf.basedb.core.PermissionDeniedException" |
1866 |
30 Jan 06 |
nicklas |
43 |
import="net.sf.basedb.core.PluginDefinition" |
1866 |
30 Jan 06 |
nicklas |
44 |
import="net.sf.basedb.core.plugin.GuiContext" |
3547 |
03 Jul 07 |
martin |
45 |
import="net.sf.basedb.core.Project" |
2404 |
21 Jun 06 |
nicklas |
46 |
import="net.sf.basedb.core.query.Orders" |
2404 |
21 Jun 06 |
nicklas |
47 |
import="net.sf.basedb.core.query.Hql" |
1866 |
30 Jan 06 |
nicklas |
48 |
import="net.sf.basedb.core.plugin.Plugin" |
3547 |
03 Jul 07 |
martin |
49 |
import="net.sf.basedb.core.SharedItem" |
1866 |
30 Jan 06 |
nicklas |
50 |
import="net.sf.basedb.clients.web.Base" |
5048 |
17 Aug 09 |
nicklas |
51 |
import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
2386 |
15 Jun 06 |
martin |
52 |
import="net.sf.basedb.clients.web.PermissionUtil" |
1866 |
30 Jan 06 |
nicklas |
53 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
54 |
import="net.sf.basedb.util.Values" |
3547 |
03 Jul 07 |
martin |
55 |
import="net.sf.basedb.util.ShareableUtil" |
3547 |
03 Jul 07 |
martin |
56 |
import="net.sf.basedb.clients.web.PermissionUtil" |
4698 |
10 Dec 08 |
nicklas |
57 |
import="net.sf.basedb.util.formatter.Formatter" |
4698 |
10 Dec 08 |
nicklas |
58 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4882 |
03 Apr 09 |
nicklas |
59 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4882 |
03 Apr 09 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4882 |
03 Apr 09 |
nicklas |
61 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
62 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4882 |
03 Apr 09 |
nicklas |
63 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4882 |
03 Apr 09 |
nicklas |
64 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
3547 |
03 Jul 07 |
martin |
65 |
import="java.util.Collections" |
1866 |
30 Jan 06 |
nicklas |
66 |
import="java.util.Date" |
1866 |
30 Jan 06 |
nicklas |
67 |
import="java.util.Map" |
1866 |
30 Jan 06 |
nicklas |
68 |
import="java.util.Set" |
1866 |
30 Jan 06 |
nicklas |
69 |
import="java.util.List" |
1866 |
30 Jan 06 |
nicklas |
70 |
%> |
1866 |
30 Jan 06 |
nicklas |
71 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1866 |
30 Jan 06 |
nicklas |
72 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
1866 |
30 Jan 06 |
nicklas |
73 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
1866 |
30 Jan 06 |
nicklas |
74 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4882 |
03 Apr 09 |
nicklas |
75 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
1866 |
30 Jan 06 |
nicklas |
76 |
<%! |
1866 |
30 Jan 06 |
nicklas |
77 |
private static final Item itemType = Item.BIOSOURCE; |
1866 |
30 Jan 06 |
nicklas |
78 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
1866 |
30 Jan 06 |
nicklas |
79 |
%> |
1866 |
30 Jan 06 |
nicklas |
80 |
<% |
1866 |
30 Jan 06 |
nicklas |
81 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1866 |
30 Jan 06 |
nicklas |
82 |
final String ID = sc.getId(); |
1866 |
30 Jan 06 |
nicklas |
83 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
1866 |
30 Jan 06 |
nicklas |
84 |
final int itemId = cc.getId(); |
6261 |
27 Mar 13 |
nicklas |
85 |
final String tab = Values.getStringOrNull(request.getParameter("tab")); |
1866 |
30 Jan 06 |
nicklas |
86 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
87 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
1866 |
30 Jan 06 |
nicklas |
88 |
try |
1866 |
30 Jan 06 |
nicklas |
89 |
{ |
4698 |
10 Dec 08 |
nicklas |
90 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
1866 |
30 Jan 06 |
nicklas |
91 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
1866 |
30 Jan 06 |
nicklas |
92 |
|
1866 |
30 Jan 06 |
nicklas |
93 |
String title = null; |
1866 |
30 Jan 06 |
nicklas |
94 |
BioSource bioSource = BioSource.getById(dc, itemId); |
1866 |
30 Jan 06 |
nicklas |
95 |
|
2404 |
21 Jun 06 |
nicklas |
96 |
final boolean usePermission = bioSource.hasPermission(Permission.USE); |
1866 |
30 Jan 06 |
nicklas |
97 |
final boolean writePermission = bioSource.hasPermission(Permission.WRITE); |
1866 |
30 Jan 06 |
nicklas |
98 |
final boolean deletePermission = bioSource.hasPermission(Permission.DELETE); |
1866 |
30 Jan 06 |
nicklas |
99 |
final boolean sharePermission = bioSource.hasPermission(Permission.SET_PERMISSION); |
2916 |
15 Nov 06 |
nicklas |
100 |
final boolean setOwnerPermission = bioSource.hasPermission(Permission.SET_OWNER); |
4003 |
26 Nov 07 |
nicklas |
101 |
final boolean isRemoved = bioSource.isRemoved(); |
4003 |
26 Nov 07 |
nicklas |
102 |
final boolean isUsed = isRemoved && bioSource.isUsed(); |
4003 |
26 Nov 07 |
nicklas |
103 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
2916 |
15 Nov 06 |
nicklas |
104 |
final boolean isOwner = bioSource.isOwner(); |
4882 |
03 Apr 09 |
nicklas |
105 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, bioSource); |
7604 |
25 Feb 19 |
nicklas |
106 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
1866 |
30 Jan 06 |
nicklas |
107 |
%> |
6244 |
25 Feb 13 |
nicklas |
108 |
<base:page title="<%=title%>" id="view-page"> |
6245 |
25 Feb 13 |
nicklas |
109 |
<base:head scripts="table.js,tabcontrol-2.js,~biosources.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css"> |
4882 |
03 Apr 09 |
nicklas |
110 |
<ext:scripts context="<%=jspContext%>" /> |
4882 |
03 Apr 09 |
nicklas |
111 |
<ext:stylesheets context="<%=jspContext%>" /> |
1866 |
30 Jan 06 |
nicklas |
112 |
</base:head> |
1866 |
30 Jan 06 |
nicklas |
113 |
<base:body> |
5918 |
21 Dec 11 |
nicklas |
114 |
<p:path><p:pathelement |
5918 |
21 Dec 11 |
nicklas |
115 |
title="Biosources" href="<%="index.jsp?ID="+ID%>" /><p:pathelement |
5918 |
21 Dec 11 |
nicklas |
116 |
title="<%=HTML.encodeTags(bioSource.getName())%>" /></p:path> |
6245 |
25 Feb 13 |
nicklas |
117 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
1866 |
30 Jan 06 |
nicklas |
118 |
|
6244 |
25 Feb 13 |
nicklas |
119 |
<t:tabcontrol id="main" subclass="content mastertabcontrol" active="<%=tab%>"> |
1866 |
30 Jan 06 |
nicklas |
120 |
<t:tab id="properties" title="Properties"> |
1866 |
30 Jan 06 |
nicklas |
121 |
|
5918 |
21 Dec 11 |
nicklas |
122 |
<div> |
5918 |
21 Dec 11 |
nicklas |
123 |
<table class="fullform bottomborder"> |
5918 |
21 Dec 11 |
nicklas |
124 |
<tr> |
5918 |
21 Dec 11 |
nicklas |
125 |
<th class="itemstatus"> |
4003 |
26 Nov 07 |
nicklas |
126 |
<base:icon |
5946 |
03 Feb 12 |
nicklas |
127 |
image="shared.png" |
5918 |
21 Dec 11 |
nicklas |
128 |
visible="<%=bioSource.isShared()%>" |
5918 |
21 Dec 11 |
nicklas |
129 |
tooltip="This item is shared to other users, groups and/or projects" |
5918 |
21 Dec 11 |
nicklas |
130 |
/> |
5918 |
21 Dec 11 |
nicklas |
131 |
<base:icon |
6245 |
25 Feb 13 |
nicklas |
132 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
133 |
image="deleted.png" |
5918 |
21 Dec 11 |
nicklas |
134 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5918 |
21 Dec 11 |
nicklas |
135 |
enabled="<%=deletePermanentlyPermission %>" |
5918 |
21 Dec 11 |
nicklas |
136 |
visible="<%=isRemoved%>" |
5918 |
21 Dec 11 |
nicklas |
137 |
/> |
6245 |
25 Feb 13 |
nicklas |
138 |
<base:icon |
6245 |
25 Feb 13 |
nicklas |
139 |
id="btnUsingItems" |
6245 |
25 Feb 13 |
nicklas |
140 |
image="used.png" |
5918 |
21 Dec 11 |
nicklas |
141 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5918 |
21 Dec 11 |
nicklas |
142 |
visible="<%=isRemoved && isUsed%>" /> |
5918 |
21 Dec 11 |
nicklas |
143 |
</th> |
5918 |
21 Dec 11 |
nicklas |
144 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
145 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5935 |
26 Jan 12 |
nicklas |
146 |
<tbl:button |
6245 |
25 Feb 13 |
nicklas |
147 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
148 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
149 |
image="edit.png" |
5935 |
26 Jan 12 |
nicklas |
150 |
title="Edit…" |
5935 |
26 Jan 12 |
nicklas |
151 |
tooltip="<%=writePermission ? "Edit this biosource" : "You do not have permission to edit this biosource"%>" |
5918 |
21 Dec 11 |
nicklas |
152 |
/> |
5935 |
26 Jan 12 |
nicklas |
153 |
<tbl:button |
6245 |
25 Feb 13 |
nicklas |
154 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
155 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
156 |
image="delete.png" |
5935 |
26 Jan 12 |
nicklas |
157 |
title="Delete" |
5935 |
26 Jan 12 |
nicklas |
158 |
visible="<%=!bioSource.isRemoved()%>" |
5935 |
26 Jan 12 |
nicklas |
159 |
tooltip="<%=deletePermission ? "Delete this biosource" : "You do not have permission to delete this biosource"%>" |
5935 |
26 Jan 12 |
nicklas |
160 |
/> |
5935 |
26 Jan 12 |
nicklas |
161 |
<tbl:button |
6245 |
25 Feb 13 |
nicklas |
162 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
163 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
164 |
image="restore.png" |
5935 |
26 Jan 12 |
nicklas |
165 |
title="Restore" |
5935 |
26 Jan 12 |
nicklas |
166 |
visible="<%=bioSource.isRemoved()%>" |
5935 |
26 Jan 12 |
nicklas |
167 |
tooltip="<%=writePermission ? "Restore this biosource" : "You do not have permission to restore this biosource"%>" |
5935 |
26 Jan 12 |
nicklas |
168 |
/> |
5935 |
26 Jan 12 |
nicklas |
169 |
<tbl:button |
6245 |
25 Feb 13 |
nicklas |
170 |
id="btnShare" |
5942 |
01 Feb 12 |
nicklas |
171 |
disabled="<%=!sharePermission%>" |
5945 |
02 Feb 12 |
nicklas |
172 |
image="share.png" |
5935 |
26 Jan 12 |
nicklas |
173 |
title="Share…" |
5935 |
26 Jan 12 |
nicklas |
174 |
tooltip="<%=sharePermission ? "Share this biosource to other user, groups and projects" : "You do not have permission to share this biosource"%>" |
5935 |
26 Jan 12 |
nicklas |
175 |
/> |
5935 |
26 Jan 12 |
nicklas |
176 |
<tbl:button |
6245 |
25 Feb 13 |
nicklas |
177 |
id="btnSetOwner" |
5942 |
01 Feb 12 |
nicklas |
178 |
disabled="<%=!setOwnerPermission%>" |
5935 |
26 Jan 12 |
nicklas |
179 |
image="take_ownership.png" |
5935 |
26 Jan 12 |
nicklas |
180 |
title="Set owner…" |
5935 |
26 Jan 12 |
nicklas |
181 |
tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
5935 |
26 Jan 12 |
nicklas |
182 |
/> |
5935 |
26 Jan 12 |
nicklas |
183 |
<tbl:button |
6245 |
25 Feb 13 |
nicklas |
184 |
id="btnNewSample" |
5935 |
26 Jan 12 |
nicklas |
185 |
image="add.png" |
5935 |
26 Jan 12 |
nicklas |
186 |
title="New sample…" |
5935 |
26 Jan 12 |
nicklas |
187 |
tooltip="Create a new sample from this biosource" |
5935 |
26 Jan 12 |
nicklas |
188 |
visible="<%=sc.hasPermission(Permission.CREATE, Item.SAMPLE) && usePermission%>" |
5935 |
26 Jan 12 |
nicklas |
189 |
/> |
5935 |
26 Jan 12 |
nicklas |
190 |
<tbl:button |
6245 |
25 Feb 13 |
nicklas |
191 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
192 |
image="import.png" |
6245 |
25 Feb 13 |
nicklas |
193 |
data-plugin-type="IMPORT" |
5935 |
26 Jan 12 |
nicklas |
194 |
title="Import…" |
5935 |
26 Jan 12 |
nicklas |
195 |
tooltip="Import data" |
5935 |
26 Jan 12 |
nicklas |
196 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5935 |
26 Jan 12 |
nicklas |
197 |
/> |
5935 |
26 Jan 12 |
nicklas |
198 |
<tbl:button |
6245 |
25 Feb 13 |
nicklas |
199 |
id="btnExport" |
6245 |
25 Feb 13 |
nicklas |
200 |
image="export.png" |
6245 |
25 Feb 13 |
nicklas |
201 |
data-plugin-type="EXPORT" |
5935 |
26 Jan 12 |
nicklas |
202 |
title="Export…" |
5935 |
26 Jan 12 |
nicklas |
203 |
tooltip="Export data" |
5935 |
26 Jan 12 |
nicklas |
204 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5935 |
26 Jan 12 |
nicklas |
205 |
/> |
5935 |
26 Jan 12 |
nicklas |
206 |
<tbl:button |
6245 |
25 Feb 13 |
nicklas |
207 |
id="btnRunPlugin" |
6245 |
25 Feb 13 |
nicklas |
208 |
image="runplugin.png" |
6245 |
25 Feb 13 |
nicklas |
209 |
data-plugin-type="OTHER" |
5935 |
26 Jan 12 |
nicklas |
210 |
title="Run plugin…" |
5935 |
26 Jan 12 |
nicklas |
211 |
tooltip="Run a plugin" |
5935 |
26 Jan 12 |
nicklas |
212 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5935 |
26 Jan 12 |
nicklas |
213 |
/> |
5935 |
26 Jan 12 |
nicklas |
214 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
215 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5935 |
26 Jan 12 |
nicklas |
216 |
<tbl:button |
5935 |
26 Jan 12 |
nicklas |
217 |
image="help.png" |
6245 |
25 Feb 13 |
nicklas |
218 |
subclass="auto-init" |
6245 |
25 Feb 13 |
nicklas |
219 |
data-auto-init="help" |
6245 |
25 Feb 13 |
nicklas |
220 |
data-help-id="biosource.view.properties" |
5935 |
26 Jan 12 |
nicklas |
221 |
title="Help…" |
5935 |
26 Jan 12 |
nicklas |
222 |
tooltip="Get help about this page" |
5935 |
26 Jan 12 |
nicklas |
223 |
/> |
5935 |
26 Jan 12 |
nicklas |
224 |
</tbl:toolbar> |
5918 |
21 Dec 11 |
nicklas |
225 |
</td> |
5918 |
21 Dec 11 |
nicklas |
226 |
</tr> |
1866 |
30 Jan 06 |
nicklas |
227 |
<tr> |
5918 |
21 Dec 11 |
nicklas |
228 |
<th>Name</th> |
1866 |
30 Jan 06 |
nicklas |
229 |
<td><%=HTML.encodeTags(bioSource.getName())%></td> |
1866 |
30 Jan 06 |
nicklas |
230 |
</tr> |
1866 |
30 Jan 06 |
nicklas |
231 |
<tr> |
5918 |
21 Dec 11 |
nicklas |
232 |
<th>Type</th> |
5643 |
26 May 11 |
nicklas |
233 |
<td><base:propertyvalue item="<%=bioSource%>" property="itemSubtype" /></td> |
5643 |
26 May 11 |
nicklas |
234 |
</tr> |
5643 |
26 May 11 |
nicklas |
235 |
<tr> |
5918 |
21 Dec 11 |
nicklas |
236 |
<th>Registered</th> |
4698 |
10 Dec 08 |
nicklas |
237 |
<td><%=dateFormatter.format(bioSource.getEntryDate())%></td> |
4698 |
10 Dec 08 |
nicklas |
238 |
</tr> |
4698 |
10 Dec 08 |
nicklas |
239 |
<tr> |
5918 |
21 Dec 11 |
nicklas |
240 |
<th>External ID</th> |
1866 |
30 Jan 06 |
nicklas |
241 |
<td><%=HTML.encodeTags(bioSource.getExternalId())%></td> |
1866 |
30 Jan 06 |
nicklas |
242 |
</tr> |
1866 |
30 Jan 06 |
nicklas |
243 |
<tr> |
5918 |
21 Dec 11 |
nicklas |
244 |
<th>Owner</th> |
2414 |
22 Jun 06 |
nicklas |
245 |
<td><base:propertyvalue item="<%=bioSource%>" property="owner" /></td> |
1866 |
30 Jan 06 |
nicklas |
246 |
</tr> |
1866 |
30 Jan 06 |
nicklas |
247 |
<tr> |
5918 |
21 Dec 11 |
nicklas |
248 |
<th>Permissions</th> |
5918 |
21 Dec 11 |
nicklas |
249 |
<td><%=PermissionUtil.getFullPermissionNames(bioSource)%></td> |
5918 |
21 Dec 11 |
nicklas |
250 |
</tr> |
5918 |
21 Dec 11 |
nicklas |
251 |
<tr> |
5918 |
21 Dec 11 |
nicklas |
252 |
<th>Description</th> |
1866 |
30 Jan 06 |
nicklas |
253 |
<td><%=HTML.niceFormat(bioSource.getDescription())%></td> |
1866 |
30 Jan 06 |
nicklas |
254 |
</tr> |
1866 |
30 Jan 06 |
nicklas |
255 |
</table> |
5918 |
21 Dec 11 |
nicklas |
256 |
</div> |
2404 |
21 Jun 06 |
nicklas |
257 |
<% |
2404 |
21 Jun 06 |
nicklas |
258 |
ItemQuery<Sample> sampleQuery = bioSource.getSamples(); |
3888 |
29 Oct 07 |
nicklas |
259 |
sampleQuery.include(Include.ALL); |
2404 |
21 Jun 06 |
nicklas |
260 |
sampleQuery.order(Orders.asc(Hql.property("name"))); |
2404 |
21 Jun 06 |
nicklas |
261 |
ItemResultList<Sample> samples = sampleQuery.list(dc); |
5935 |
26 Jan 12 |
nicklas |
262 |
%> |
5935 |
26 Jan 12 |
nicklas |
263 |
<base:section |
5935 |
26 Jan 12 |
nicklas |
264 |
id="sampleSection" |
5935 |
26 Jan 12 |
nicklas |
265 |
title="<%="Child samples (" + samples.size() + ")"%>" |
5935 |
26 Jan 12 |
nicklas |
266 |
context="<%=cc%>" |
5935 |
26 Jan 12 |
nicklas |
267 |
> |
2404 |
21 Jun 06 |
nicklas |
268 |
<% |
5935 |
26 Jan 12 |
nicklas |
269 |
if (samples.size() == 0) |
5935 |
26 Jan 12 |
nicklas |
270 |
{ |
5935 |
26 Jan 12 |
nicklas |
271 |
%> |
5935 |
26 Jan 12 |
nicklas |
272 |
<div class="messagecontainer note"> |
5935 |
26 Jan 12 |
nicklas |
273 |
No samples have been created from this biosource |
5935 |
26 Jan 12 |
nicklas |
274 |
(or, you don't have permission to view them). |
5935 |
26 Jan 12 |
nicklas |
275 |
</div> |
5935 |
26 Jan 12 |
nicklas |
276 |
<% |
5935 |
26 Jan 12 |
nicklas |
277 |
} |
5935 |
26 Jan 12 |
nicklas |
278 |
else |
5935 |
26 Jan 12 |
nicklas |
279 |
{ |
5935 |
26 Jan 12 |
nicklas |
280 |
%> |
5044 |
11 Aug 09 |
martin |
281 |
<tbl:table |
5044 |
11 Aug 09 |
martin |
282 |
id="samples" |
5935 |
26 Jan 12 |
nicklas |
283 |
|
5044 |
11 Aug 09 |
martin |
284 |
columns="all" |
5044 |
11 Aug 09 |
martin |
285 |
> |
3547 |
03 Jul 07 |
martin |
286 |
<tbl:columndef |
3547 |
03 Jul 07 |
martin |
287 |
id="name" |
3547 |
03 Jul 07 |
martin |
288 |
title="Name" |
3547 |
03 Jul 07 |
martin |
289 |
/> |
3547 |
03 Jul 07 |
martin |
290 |
<tbl:columndef |
5663 |
22 Jun 11 |
nicklas |
291 |
id="type" |
5663 |
22 Jun 11 |
nicklas |
292 |
title="Type" |
5663 |
22 Jun 11 |
nicklas |
293 |
/> |
5663 |
22 Jun 11 |
nicklas |
294 |
<tbl:columndef |
5044 |
11 Aug 09 |
martin |
295 |
id="description" |
5044 |
11 Aug 09 |
martin |
296 |
title="Description" |
3547 |
03 Jul 07 |
martin |
297 |
/> |
3547 |
03 Jul 07 |
martin |
298 |
<tbl:data> |
5949 |
08 Feb 12 |
nicklas |
299 |
<tbl:headers> |
5949 |
08 Feb 12 |
nicklas |
300 |
<tbl:headerrow> |
5949 |
08 Feb 12 |
nicklas |
301 |
<tbl:columnheaders /> |
5949 |
08 Feb 12 |
nicklas |
302 |
</tbl:headerrow> |
5949 |
08 Feb 12 |
nicklas |
303 |
</tbl:headers> |
3547 |
03 Jul 07 |
martin |
304 |
<tbl:rows> |
3547 |
03 Jul 07 |
martin |
305 |
<% |
5044 |
11 Aug 09 |
martin |
306 |
for (Sample item : samples) |
3547 |
03 Jul 07 |
martin |
307 |
{ |
5044 |
11 Aug 09 |
martin |
308 |
%> |
3547 |
03 Jul 07 |
martin |
309 |
<tbl:row> |
3888 |
29 Oct 07 |
nicklas |
310 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
311 |
image="deleted.png" |
5044 |
11 Aug 09 |
martin |
312 |
tooltip="This item has been scheduled for deletion" |
5044 |
11 Aug 09 |
martin |
313 |
visible="<%=item.isRemoved()%>" |
5044 |
11 Aug 09 |
martin |
314 |
/><%=Base.getLinkedName(ID, item, false, true)%></tbl:cell> |
5663 |
22 Jun 11 |
nicklas |
315 |
<tbl:cell column="type"><base:propertyvalue item="<%=item%>" property="itemSubtype" /></tbl:cell> |
5044 |
11 Aug 09 |
martin |
316 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
3547 |
03 Jul 07 |
martin |
317 |
</tbl:row> |
3547 |
03 Jul 07 |
martin |
318 |
<% |
3547 |
03 Jul 07 |
martin |
319 |
} |
3547 |
03 Jul 07 |
martin |
320 |
%> |
3547 |
03 Jul 07 |
martin |
321 |
</tbl:rows> |
3547 |
03 Jul 07 |
martin |
322 |
</tbl:data> |
5044 |
11 Aug 09 |
martin |
323 |
</tbl:table> |
5935 |
26 Jan 12 |
nicklas |
324 |
<% |
5935 |
26 Jan 12 |
nicklas |
325 |
} |
5935 |
26 Jan 12 |
nicklas |
326 |
%> |
5935 |
26 Jan 12 |
nicklas |
327 |
</base:section> |
5496 |
17 Nov 10 |
nicklas |
328 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5496 |
17 Nov 10 |
nicklas |
329 |
<jsp:param name="ID" value="<%=ID%>" /> |
5496 |
17 Nov 10 |
nicklas |
330 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5496 |
17 Nov 10 |
nicklas |
331 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5496 |
17 Nov 10 |
nicklas |
332 |
<jsp:param name="title" value="Other items related to this biosource" /> |
5496 |
17 Nov 10 |
nicklas |
333 |
</jsp:include> |
5044 |
11 Aug 09 |
martin |
334 |
|
7813 |
19 May 20 |
nicklas |
335 |
<jsp:include page="../../common/itemlists/list_membership.jsp"> |
7813 |
19 May 20 |
nicklas |
336 |
<jsp:param name="ID" value="<%=ID%>" /> |
7813 |
19 May 20 |
nicklas |
337 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
7813 |
19 May 20 |
nicklas |
338 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
7813 |
19 May 20 |
nicklas |
339 |
<jsp:param name="title" value="Item lists where this biosource is a member" /> |
7813 |
19 May 20 |
nicklas |
340 |
</jsp:include> |
7813 |
19 May 20 |
nicklas |
341 |
|
5935 |
26 Jan 12 |
nicklas |
342 |
<jsp:include page="../../common/share/list_share.jsp"> |
5935 |
26 Jan 12 |
nicklas |
343 |
<jsp:param name="ID" value="<%=ID%>" /> |
5935 |
26 Jan 12 |
nicklas |
344 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5935 |
26 Jan 12 |
nicklas |
345 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5935 |
26 Jan 12 |
nicklas |
346 |
<jsp:param name="title" value="Shared to" /> |
5935 |
26 Jan 12 |
nicklas |
347 |
</jsp:include> |
1866 |
30 Jan 06 |
nicklas |
348 |
</t:tab> |
1866 |
30 Jan 06 |
nicklas |
349 |
|
5935 |
26 Jan 12 |
nicklas |
350 |
<t:tab id="annotations" title="Annotations" |
5935 |
26 Jan 12 |
nicklas |
351 |
tooltip="View annotation values" clazz="white"> |
6255 |
22 Mar 13 |
nicklas |
352 |
<jsp:include page="../../common/annotations/list_frameset.jsp"> |
1866 |
30 Jan 06 |
nicklas |
353 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
1866 |
30 Jan 06 |
nicklas |
354 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
1866 |
30 Jan 06 |
nicklas |
355 |
<jsp:param name="ID" value="<%=ID%>" /> |
1866 |
30 Jan 06 |
nicklas |
356 |
</jsp:include> |
1866 |
30 Jan 06 |
nicklas |
357 |
</t:tab> |
4746 |
10 Feb 09 |
nicklas |
358 |
<t:tab id="overview" title="Overview" |
6245 |
25 Feb 13 |
nicklas |
359 |
tooltip="Display a tree overview of related items"> |
6242 |
25 Feb 13 |
nicklas |
360 |
<jsp:include page="../../common/overview/overview.jsp"> |
6242 |
25 Feb 13 |
nicklas |
361 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6242 |
25 Feb 13 |
nicklas |
362 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6242 |
25 Feb 13 |
nicklas |
363 |
<jsp:param name="ID" value="<%=ID%>" /> |
6242 |
25 Feb 13 |
nicklas |
364 |
</jsp:include> |
4746 |
10 Feb 09 |
nicklas |
365 |
</t:tab> |
7166 |
07 Jun 16 |
nicklas |
366 |
<t:tab id="history" title="History" |
7166 |
07 Jun 16 |
nicklas |
367 |
tooltip="Displays a log with the history of this item" |
6245 |
25 Feb 13 |
nicklas |
368 |
visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
6244 |
25 Feb 13 |
nicklas |
369 |
<jsp:include page="../../common/history/frameset.jsp"> |
6244 |
25 Feb 13 |
nicklas |
370 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6244 |
25 Feb 13 |
nicklas |
371 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6244 |
25 Feb 13 |
nicklas |
372 |
<jsp:param name="ID" value="<%=ID%>" /> |
6244 |
25 Feb 13 |
nicklas |
373 |
</jsp:include> |
5048 |
17 Aug 09 |
nicklas |
374 |
</t:tab> |
1866 |
30 Jan 06 |
nicklas |
375 |
</t:tabcontrol> |
1866 |
30 Jan 06 |
nicklas |
376 |
</base:body> |
1866 |
30 Jan 06 |
nicklas |
377 |
</base:page> |
1866 |
30 Jan 06 |
nicklas |
378 |
<% |
1866 |
30 Jan 06 |
nicklas |
379 |
} |
1866 |
30 Jan 06 |
nicklas |
380 |
finally |
1866 |
30 Jan 06 |
nicklas |
381 |
{ |
1866 |
30 Jan 06 |
nicklas |
382 |
if (dc != null) dc.close(); |
1866 |
30 Jan 06 |
nicklas |
383 |
} |
1866 |
30 Jan 06 |
nicklas |
384 |
|
1866 |
30 Jan 06 |
nicklas |
385 |
%> |