1980 |
14 Feb 06 |
nicklas |
1 |
<%-- $Id$ |
1980 |
14 Feb 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 |
1980 |
14 Feb 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/ |
1980 |
14 Feb 06 |
nicklas |
8 |
|
1980 |
14 Feb 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
1980 |
14 Feb 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 |
1980 |
14 Feb 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
1980 |
14 Feb 06 |
nicklas |
13 |
|
1980 |
14 Feb 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
1980 |
14 Feb 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1980 |
14 Feb 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1980 |
14 Feb 06 |
nicklas |
17 |
GNU General Public License for more details. |
1980 |
14 Feb 06 |
nicklas |
18 |
|
1980 |
14 Feb 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/>. |
1980 |
14 Feb 06 |
nicklas |
21 |
------------------------------------------------------------------ |
1980 |
14 Feb 06 |
nicklas |
22 |
|
1980 |
14 Feb 06 |
nicklas |
23 |
@author Nicklas |
1980 |
14 Feb 06 |
nicklas |
24 |
@version 2.0 |
1980 |
14 Feb 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
1980 |
14 Feb 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
1980 |
14 Feb 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
1980 |
14 Feb 06 |
nicklas |
29 |
import="net.sf.basedb.core.SystemItems" |
1980 |
14 Feb 06 |
nicklas |
30 |
import="net.sf.basedb.core.Item" |
2515 |
14 Aug 06 |
nicklas |
31 |
import="net.sf.basedb.core.Include" |
1980 |
14 Feb 06 |
nicklas |
32 |
import="net.sf.basedb.core.ItemContext" |
1980 |
14 Feb 06 |
nicklas |
33 |
import="net.sf.basedb.core.Permission" |
1980 |
14 Feb 06 |
nicklas |
34 |
import="net.sf.basedb.core.AnnotationType" |
2515 |
14 Aug 06 |
nicklas |
35 |
import="net.sf.basedb.core.AnnotationTypeCategory" |
1980 |
14 Feb 06 |
nicklas |
36 |
import="net.sf.basedb.core.User" |
2942 |
22 Nov 06 |
nicklas |
37 |
import="net.sf.basedb.core.Type" |
2515 |
14 Aug 06 |
nicklas |
38 |
import="net.sf.basedb.core.ItemQuery" |
2515 |
14 Aug 06 |
nicklas |
39 |
import="net.sf.basedb.core.ItemResultList" |
3547 |
03 Jul 07 |
martin |
40 |
import="net.sf.basedb.core.MultiPermissions" |
3547 |
03 Jul 07 |
martin |
41 |
import="net.sf.basedb.core.Group" |
3547 |
03 Jul 07 |
martin |
42 |
import="net.sf.basedb.core.Project" |
1980 |
14 Feb 06 |
nicklas |
43 |
import="net.sf.basedb.core.PermissionDeniedException" |
1980 |
14 Feb 06 |
nicklas |
44 |
import="net.sf.basedb.core.PluginDefinition" |
1980 |
14 Feb 06 |
nicklas |
45 |
import="net.sf.basedb.core.plugin.GuiContext" |
1980 |
14 Feb 06 |
nicklas |
46 |
import="net.sf.basedb.core.plugin.Plugin" |
2515 |
14 Aug 06 |
nicklas |
47 |
import="net.sf.basedb.core.query.Orders" |
2515 |
14 Aug 06 |
nicklas |
48 |
import="net.sf.basedb.core.query.Hql" |
1980 |
14 Feb 06 |
nicklas |
49 |
import="net.sf.basedb.clients.web.Base" |
5070 |
20 Aug 09 |
nicklas |
50 |
import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
2386 |
15 Jun 06 |
martin |
51 |
import="net.sf.basedb.clients.web.PermissionUtil" |
1980 |
14 Feb 06 |
nicklas |
52 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
53 |
import="net.sf.basedb.util.Values" |
2942 |
22 Nov 06 |
nicklas |
54 |
import="net.sf.basedb.util.formatter.Formatter" |
2942 |
22 Nov 06 |
nicklas |
55 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4886 |
03 Apr 09 |
nicklas |
56 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4886 |
03 Apr 09 |
nicklas |
57 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4886 |
03 Apr 09 |
nicklas |
58 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
59 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4886 |
03 Apr 09 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4886 |
03 Apr 09 |
nicklas |
61 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
1980 |
14 Feb 06 |
nicklas |
62 |
import="java.util.Map" |
3547 |
03 Jul 07 |
martin |
63 |
import="java.util.Collections" |
2942 |
22 Nov 06 |
nicklas |
64 |
import="java.util.Date" |
3547 |
03 Jul 07 |
martin |
65 |
import="java.util.Set" |
5423 |
23 Sep 10 |
nicklas |
66 |
import="java.util.List" |
1980 |
14 Feb 06 |
nicklas |
67 |
%> |
1980 |
14 Feb 06 |
nicklas |
68 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1980 |
14 Feb 06 |
nicklas |
69 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
1980 |
14 Feb 06 |
nicklas |
70 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
1980 |
14 Feb 06 |
nicklas |
71 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4886 |
03 Apr 09 |
nicklas |
72 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
1980 |
14 Feb 06 |
nicklas |
73 |
<%! |
1980 |
14 Feb 06 |
nicklas |
74 |
private static final Item itemType = Item.ANNOTATIONTYPE; |
1980 |
14 Feb 06 |
nicklas |
75 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
1980 |
14 Feb 06 |
nicklas |
76 |
%> |
1980 |
14 Feb 06 |
nicklas |
77 |
<% |
1980 |
14 Feb 06 |
nicklas |
78 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1980 |
14 Feb 06 |
nicklas |
79 |
final String ID = sc.getId(); |
1980 |
14 Feb 06 |
nicklas |
80 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
1980 |
14 Feb 06 |
nicklas |
81 |
final int itemId = cc.getId(); |
6289 |
05 Jun 13 |
nicklas |
82 |
final String tab = Values.getString(request.getParameter("tab")); |
1980 |
14 Feb 06 |
nicklas |
83 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
84 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
1980 |
14 Feb 06 |
nicklas |
85 |
try |
1980 |
14 Feb 06 |
nicklas |
86 |
{ |
1980 |
14 Feb 06 |
nicklas |
87 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
1980 |
14 Feb 06 |
nicklas |
88 |
|
1980 |
14 Feb 06 |
nicklas |
89 |
String title = null; |
1980 |
14 Feb 06 |
nicklas |
90 |
AnnotationType annotationType = AnnotationType.getById(dc, itemId); |
1980 |
14 Feb 06 |
nicklas |
91 |
|
1980 |
14 Feb 06 |
nicklas |
92 |
final boolean writePermission = annotationType.hasPermission(Permission.WRITE); |
1980 |
14 Feb 06 |
nicklas |
93 |
final boolean deletePermission = annotationType.hasPermission(Permission.DELETE); |
1980 |
14 Feb 06 |
nicklas |
94 |
final boolean sharePermission = annotationType.hasPermission(Permission.SET_PERMISSION); |
2921 |
15 Nov 06 |
nicklas |
95 |
final boolean setOwnerPermission = annotationType.hasPermission(Permission.SET_OWNER); |
2921 |
15 Nov 06 |
nicklas |
96 |
final boolean isOwner = annotationType.isOwner(); |
4003 |
26 Nov 07 |
nicklas |
97 |
final boolean isRemoved = annotationType.isRemoved(); |
4003 |
26 Nov 07 |
nicklas |
98 |
final boolean isUsed = isRemoved && annotationType.isUsed(); |
4003 |
26 Nov 07 |
nicklas |
99 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
7604 |
25 Feb 19 |
nicklas |
100 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
4886 |
03 Apr 09 |
nicklas |
101 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, annotationType); |
7604 |
25 Feb 19 |
nicklas |
102 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
7104 |
09 Mar 16 |
nicklas |
103 |
String valueTypeInfo = ""; |
7104 |
09 Mar 16 |
nicklas |
104 |
if (annotationType.getValueType().isNumerical()) |
7104 |
09 Mar 16 |
nicklas |
105 |
{ |
7104 |
09 Mar 16 |
nicklas |
106 |
String minValue = annotationType.getOption("minValue"); |
7104 |
09 Mar 16 |
nicklas |
107 |
String maxValue = annotationType.getOption("maxValue"); |
7104 |
09 Mar 16 |
nicklas |
108 |
if (minValue != null && maxValue != null) |
7104 |
09 Mar 16 |
nicklas |
109 |
{ |
7104 |
09 Mar 16 |
nicklas |
110 |
valueTypeInfo = " (" + minValue + "-" + maxValue + ")"; |
7104 |
09 Mar 16 |
nicklas |
111 |
} |
7104 |
09 Mar 16 |
nicklas |
112 |
else if (minValue != null) |
7104 |
09 Mar 16 |
nicklas |
113 |
{ |
7104 |
09 Mar 16 |
nicklas |
114 |
valueTypeInfo = " (>= "+minValue + ")"; |
7104 |
09 Mar 16 |
nicklas |
115 |
} |
7104 |
09 Mar 16 |
nicklas |
116 |
else if (maxValue != null) |
7104 |
09 Mar 16 |
nicklas |
117 |
{ |
7104 |
09 Mar 16 |
nicklas |
118 |
valueTypeInfo = " (<= "+maxValue + ")"; |
7104 |
09 Mar 16 |
nicklas |
119 |
} |
7104 |
09 Mar 16 |
nicklas |
120 |
} |
1980 |
14 Feb 06 |
nicklas |
121 |
%> |
6289 |
05 Jun 13 |
nicklas |
122 |
<base:page title="<%=title%>" id="view-page"> |
6289 |
05 Jun 13 |
nicklas |
123 |
<base:head scripts="tabcontrol-2.js,table.js,~annotationtypes.js" styles="toolbar.css,table.css,headertabcontrol.css,path.css"> |
4886 |
03 Apr 09 |
nicklas |
124 |
<ext:scripts context="<%=jspContext%>" /> |
4886 |
03 Apr 09 |
nicklas |
125 |
<ext:stylesheets context="<%=jspContext%>" /> |
1980 |
14 Feb 06 |
nicklas |
126 |
</base:head> |
1980 |
14 Feb 06 |
nicklas |
127 |
<base:body> |
5941 |
01 Feb 12 |
nicklas |
128 |
<p:path><p:pathelement |
5941 |
01 Feb 12 |
nicklas |
129 |
title="Annotation types" href="<%="index.jsp?ID="+ID%>" |
5941 |
01 Feb 12 |
nicklas |
130 |
/><p:pathelement title="<%=HTML.encodeTags(annotationType.getName())%>" |
5941 |
01 Feb 12 |
nicklas |
131 |
/></p:path> |
6289 |
05 Jun 13 |
nicklas |
132 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
1980 |
14 Feb 06 |
nicklas |
133 |
|
5941 |
01 Feb 12 |
nicklas |
134 |
<t:tabcontrol |
5941 |
01 Feb 12 |
nicklas |
135 |
id="main" |
5941 |
01 Feb 12 |
nicklas |
136 |
subclass="content mastertabcontrol" |
6244 |
25 Feb 13 |
nicklas |
137 |
active="<%=tab%>"> |
1980 |
14 Feb 06 |
nicklas |
138 |
<t:tab id="properties" title="Properties"> |
5941 |
01 Feb 12 |
nicklas |
139 |
<div> |
5941 |
01 Feb 12 |
nicklas |
140 |
<table class="fullform bottomborder"> |
5941 |
01 Feb 12 |
nicklas |
141 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
142 |
<th class="itemstatus"> |
4003 |
26 Nov 07 |
nicklas |
143 |
<base:icon |
5946 |
03 Feb 12 |
nicklas |
144 |
image="shared.png" |
5941 |
01 Feb 12 |
nicklas |
145 |
visible="<%=annotationType.isShared()%>" |
5941 |
01 Feb 12 |
nicklas |
146 |
tooltip="This item is shared to other users, groups and/or projects" |
5941 |
01 Feb 12 |
nicklas |
147 |
/> |
5941 |
01 Feb 12 |
nicklas |
148 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
149 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
150 |
image="deleted.png" |
5941 |
01 Feb 12 |
nicklas |
151 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5941 |
01 Feb 12 |
nicklas |
152 |
enabled="<%=deletePermanentlyPermission %>" |
5941 |
01 Feb 12 |
nicklas |
153 |
visible="<%=isRemoved%>" |
5941 |
01 Feb 12 |
nicklas |
154 |
/> |
6289 |
05 Jun 13 |
nicklas |
155 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
156 |
id="btnUsingItems" |
6289 |
05 Jun 13 |
nicklas |
157 |
image="used.png" |
5941 |
01 Feb 12 |
nicklas |
158 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5941 |
01 Feb 12 |
nicklas |
159 |
visible="<%=isRemoved && isUsed%>" /> |
5941 |
01 Feb 12 |
nicklas |
160 |
</th> |
5941 |
01 Feb 12 |
nicklas |
161 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
162 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5941 |
01 Feb 12 |
nicklas |
163 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
164 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
165 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
166 |
image="edit.png" |
5941 |
01 Feb 12 |
nicklas |
167 |
title="Edit…" |
5941 |
01 Feb 12 |
nicklas |
168 |
tooltip="<%=writePermission ? "Edit this annotation type" : "You do not have permission to edit this annotation type"%>" |
5941 |
01 Feb 12 |
nicklas |
169 |
/> |
5941 |
01 Feb 12 |
nicklas |
170 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
171 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
172 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
173 |
image="delete.png" |
5941 |
01 Feb 12 |
nicklas |
174 |
title="Delete" |
5941 |
01 Feb 12 |
nicklas |
175 |
visible="<%=!annotationType.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
176 |
tooltip="<%=deletePermission ? "Delete this annotation type" : "You do not have permission to delete this annotation type"%>" |
5941 |
01 Feb 12 |
nicklas |
177 |
/> |
5941 |
01 Feb 12 |
nicklas |
178 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
179 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
180 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
181 |
image="restore.png" |
5941 |
01 Feb 12 |
nicklas |
182 |
title="Restore" |
5941 |
01 Feb 12 |
nicklas |
183 |
visible="<%=annotationType.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
184 |
tooltip="<%=writePermission ? "Restore this annotation type" : "You do not have permission to restore this annotation type"%>" |
5941 |
01 Feb 12 |
nicklas |
185 |
/> |
5941 |
01 Feb 12 |
nicklas |
186 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
187 |
id="btnShare" |
5942 |
01 Feb 12 |
nicklas |
188 |
disabled="<%=!sharePermission%>" |
5945 |
02 Feb 12 |
nicklas |
189 |
image="share.png" |
5941 |
01 Feb 12 |
nicklas |
190 |
title="Share…" |
5941 |
01 Feb 12 |
nicklas |
191 |
tooltip="<%=sharePermission ? "Share this annotation type to other user, groups and projects" : "You do not have permission to share this annotation type"%>" |
5941 |
01 Feb 12 |
nicklas |
192 |
/> |
5941 |
01 Feb 12 |
nicklas |
193 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
194 |
id="btnSetOwner" |
5942 |
01 Feb 12 |
nicklas |
195 |
disabled="<%=!setOwnerPermission%>" |
5941 |
01 Feb 12 |
nicklas |
196 |
image="take_ownership.png" |
5941 |
01 Feb 12 |
nicklas |
197 |
title="Set ownership…" |
5941 |
01 Feb 12 |
nicklas |
198 |
tooltip="<%=setOwnerPermission ? "Set owner of this item" : "You do not have permission to change ownership of this item"%>" |
5941 |
01 Feb 12 |
nicklas |
199 |
/> |
5941 |
01 Feb 12 |
nicklas |
200 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
201 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
202 |
image="import.png" |
6289 |
05 Jun 13 |
nicklas |
203 |
data-plugin-type="IMPORT" |
5941 |
01 Feb 12 |
nicklas |
204 |
title="Import…" |
5941 |
01 Feb 12 |
nicklas |
205 |
tooltip="Import data" |
5941 |
01 Feb 12 |
nicklas |
206 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
207 |
/> |
5941 |
01 Feb 12 |
nicklas |
208 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
209 |
id="btnExport" |
6289 |
05 Jun 13 |
nicklas |
210 |
image="export.png" |
6289 |
05 Jun 13 |
nicklas |
211 |
data-plugin-type="EXPORT" |
5941 |
01 Feb 12 |
nicklas |
212 |
title="Export…" |
5941 |
01 Feb 12 |
nicklas |
213 |
tooltip="Export data" |
5941 |
01 Feb 12 |
nicklas |
214 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
215 |
/> |
5941 |
01 Feb 12 |
nicklas |
216 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
217 |
id="btnRunPlugin" |
6289 |
05 Jun 13 |
nicklas |
218 |
image="runplugin.png" |
6289 |
05 Jun 13 |
nicklas |
219 |
data-plugin-type="OTHER" |
5941 |
01 Feb 12 |
nicklas |
220 |
title="Run plugin…" |
5941 |
01 Feb 12 |
nicklas |
221 |
tooltip="Run a plugin" |
5941 |
01 Feb 12 |
nicklas |
222 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5941 |
01 Feb 12 |
nicklas |
223 |
/> |
5941 |
01 Feb 12 |
nicklas |
224 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
225 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5941 |
01 Feb 12 |
nicklas |
226 |
<tbl:button |
5941 |
01 Feb 12 |
nicklas |
227 |
image="help.png" |
6289 |
05 Jun 13 |
nicklas |
228 |
subclass="auto-init" |
6289 |
05 Jun 13 |
nicklas |
229 |
data-auto-init="help" |
6289 |
05 Jun 13 |
nicklas |
230 |
data-help-id="annotationtype.view.properties" |
5941 |
01 Feb 12 |
nicklas |
231 |
title="Help…" |
5941 |
01 Feb 12 |
nicklas |
232 |
tooltip="Get help about this page" |
5941 |
01 Feb 12 |
nicklas |
233 |
/> |
5941 |
01 Feb 12 |
nicklas |
234 |
</tbl:toolbar> |
5941 |
01 Feb 12 |
nicklas |
235 |
</td> |
5941 |
01 Feb 12 |
nicklas |
236 |
</tr> |
1980 |
14 Feb 06 |
nicklas |
237 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
238 |
<th>Name</th> |
1980 |
14 Feb 06 |
nicklas |
239 |
<td><%=HTML.encodeTags(annotationType.getName())%></td> |
1980 |
14 Feb 06 |
nicklas |
240 |
</tr> |
1980 |
14 Feb 06 |
nicklas |
241 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
242 |
<th>Registered</th> |
4698 |
10 Dec 08 |
nicklas |
243 |
<td><%=dateFormatter.format(annotationType.getEntryDate())%></td> |
4698 |
10 Dec 08 |
nicklas |
244 |
</tr> |
4698 |
10 Dec 08 |
nicklas |
245 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
246 |
<th>External ID</th> |
2933 |
17 Nov 06 |
nicklas |
247 |
<td><%=HTML.encodeTags(annotationType.getExternalId())%></td> |
2933 |
17 Nov 06 |
nicklas |
248 |
</tr> |
2933 |
17 Nov 06 |
nicklas |
249 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
250 |
<th>Value type</th> |
7104 |
09 Mar 16 |
nicklas |
251 |
<td><%=annotationType.getValueType()%><%=valueTypeInfo%></td> |
1980 |
14 Feb 06 |
nicklas |
252 |
</tr> |
1980 |
14 Feb 06 |
nicklas |
253 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
254 |
<th>Default unit</th> |
5941 |
01 Feb 12 |
nicklas |
255 |
<td> |
5941 |
01 Feb 12 |
nicklas |
256 |
<% |
5941 |
01 Feb 12 |
nicklas |
257 |
if (annotationType.supportUnits()) |
5941 |
01 Feb 12 |
nicklas |
258 |
{ |
5941 |
01 Feb 12 |
nicklas |
259 |
%> |
5941 |
01 Feb 12 |
nicklas |
260 |
<base:propertyvalue item="<%=annotationType%>" property="quantity" /> |
5941 |
01 Feb 12 |
nicklas |
261 |
› |
5941 |
01 Feb 12 |
nicklas |
262 |
<base:propertyvalue item="<%=annotationType%>" property="defaultUnit" /> |
5941 |
01 Feb 12 |
nicklas |
263 |
<% |
5941 |
01 Feb 12 |
nicklas |
264 |
} |
5941 |
01 Feb 12 |
nicklas |
265 |
else |
5941 |
01 Feb 12 |
nicklas |
266 |
{ |
5941 |
01 Feb 12 |
nicklas |
267 |
%> |
5941 |
01 Feb 12 |
nicklas |
268 |
<i>- none -</i> |
5941 |
01 Feb 12 |
nicklas |
269 |
<% |
5941 |
01 Feb 12 |
nicklas |
270 |
} |
5941 |
01 Feb 12 |
nicklas |
271 |
%> |
4544 |
25 Sep 08 |
nicklas |
272 |
</td> |
4544 |
25 Sep 08 |
nicklas |
273 |
</tr> |
4544 |
25 Sep 08 |
nicklas |
274 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
275 |
<th>Enumeration</th> |
1980 |
14 Feb 06 |
nicklas |
276 |
<td><%=annotationType.isEnumeration() ? |
7605 |
26 Feb 19 |
nicklas |
277 |
HTML.encodeTags(Values.getString(annotationType.getValues(), ", ", true, |
7605 |
26 Feb 19 |
nicklas |
278 |
FormatterFactory.getTypeFormatter(sc, annotationType.getValueType()))) : "no"%></td> |
1980 |
14 Feb 06 |
nicklas |
279 |
</tr> |
1980 |
14 Feb 06 |
nicklas |
280 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
281 |
<th>Default value</th> |
1980 |
14 Feb 06 |
nicklas |
282 |
<td><%=HTML.encodeTags(annotationType.getDefaultValue())%></td> |
1980 |
14 Feb 06 |
nicklas |
283 |
</tr> |
1980 |
14 Feb 06 |
nicklas |
284 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
285 |
<th>Multiplicity</th> |
1980 |
14 Feb 06 |
nicklas |
286 |
<td><%=annotationType.getMultiplicity() == 0 ? "<i>- unlimited -</i>" : annotationType.getMultiplicity()%></td> |
1980 |
14 Feb 06 |
nicklas |
287 |
</tr> |
1980 |
14 Feb 06 |
nicklas |
288 |
<tr> |
7616 |
04 Mar 19 |
nicklas |
289 |
<th>Is identifier</th> |
7616 |
04 Mar 19 |
nicklas |
290 |
<td><%=annotationType.isIdentifier() ? "yes" : "no"%></td> |
7616 |
04 Mar 19 |
nicklas |
291 |
</tr> |
7616 |
04 Mar 19 |
nicklas |
292 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
293 |
<th>Required by MIAME</th> |
1980 |
14 Feb 06 |
nicklas |
294 |
<td><%=annotationType.isRequiredForMiame() ? "yes" : "no"%></td> |
1980 |
14 Feb 06 |
nicklas |
295 |
</tr> |
1980 |
14 Feb 06 |
nicklas |
296 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
297 |
<th>Protocol parameter</th> |
2875 |
08 Nov 06 |
nicklas |
298 |
<td><%=annotationType.isProtocolParameter() ? "yes" : "no"%></td> |
2875 |
08 Nov 06 |
nicklas |
299 |
</tr> |
2875 |
08 Nov 06 |
nicklas |
300 |
<tr> |
7166 |
07 Jun 16 |
nicklas |
301 |
<th>Disable history log</th> |
6358 |
27 Nov 13 |
nicklas |
302 |
<td><%=annotationType.getDisableLogOfValues() ? "yes" : "no"%></td> |
6358 |
27 Nov 13 |
nicklas |
303 |
</tr> |
6358 |
27 Nov 13 |
nicklas |
304 |
<tr> |
6728 |
13 Feb 15 |
nicklas |
305 |
<th>Disable inheritance</th> |
6728 |
13 Feb 15 |
nicklas |
306 |
<td><%=annotationType.getDisableInheritance() ? "yes" : "no"%></td> |
6728 |
13 Feb 15 |
nicklas |
307 |
</tr> |
6728 |
13 Feb 15 |
nicklas |
308 |
<tr> |
7244 |
01 Dec 16 |
nicklas |
309 |
<th>Project annotations</th> |
7244 |
01 Dec 16 |
nicklas |
310 |
<td><%=annotationType.getProjectAnnotations() ? "yes" : "no"%></td> |
7244 |
01 Dec 16 |
nicklas |
311 |
</tr> |
7244 |
01 Dec 16 |
nicklas |
312 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
313 |
<th>Items</th> |
1980 |
14 Feb 06 |
nicklas |
314 |
<td><%=Values.getString(annotationType.getEnabledItems(), ", ", true)%></td> |
1980 |
14 Feb 06 |
nicklas |
315 |
</tr> |
1980 |
14 Feb 06 |
nicklas |
316 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
317 |
<th>Owner</th> |
2443 |
28 Jun 06 |
nicklas |
318 |
<td><base:propertyvalue item="<%=annotationType%>" property="owner" /></td> |
1980 |
14 Feb 06 |
nicklas |
319 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
320 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
321 |
<th>Permissions</th> |
5941 |
01 Feb 12 |
nicklas |
322 |
<td><%=PermissionUtil.getFullPermissionNames(annotationType)%></td> |
5941 |
01 Feb 12 |
nicklas |
323 |
</tr> |
5905 |
12 Dec 11 |
nicklas |
324 |
<tr > |
5941 |
01 Feb 12 |
nicklas |
325 |
<th>Description</th> |
1980 |
14 Feb 06 |
nicklas |
326 |
<td><%=HTML.niceFormat(annotationType.getDescription())%></td> |
1980 |
14 Feb 06 |
nicklas |
327 |
</tr> |
1980 |
14 Feb 06 |
nicklas |
328 |
</table> |
5941 |
01 Feb 12 |
nicklas |
329 |
</div> |
2515 |
14 Aug 06 |
nicklas |
330 |
<% |
2515 |
14 Aug 06 |
nicklas |
331 |
ItemQuery<AnnotationTypeCategory> categoryQuery = |
2515 |
14 Aug 06 |
nicklas |
332 |
annotationType.getCategories(); |
3890 |
30 Oct 07 |
nicklas |
333 |
categoryQuery.include(Include.ALL); |
2515 |
14 Aug 06 |
nicklas |
334 |
categoryQuery.order(Orders.asc(Hql.property("name"))); |
2515 |
14 Aug 06 |
nicklas |
335 |
ItemResultList<AnnotationTypeCategory> categories = categoryQuery.list(dc); |
5941 |
01 Feb 12 |
nicklas |
336 |
%> |
5941 |
01 Feb 12 |
nicklas |
337 |
<base:section |
5941 |
01 Feb 12 |
nicklas |
338 |
id="categories" |
5941 |
01 Feb 12 |
nicklas |
339 |
title="<%="Categories (" + categories.size() + ")"%>" |
5941 |
01 Feb 12 |
nicklas |
340 |
context="<%=cc%>" |
5941 |
01 Feb 12 |
nicklas |
341 |
> |
2515 |
14 Aug 06 |
nicklas |
342 |
<% |
5941 |
01 Feb 12 |
nicklas |
343 |
if (categories.size() == 0) |
5941 |
01 Feb 12 |
nicklas |
344 |
{ |
5941 |
01 Feb 12 |
nicklas |
345 |
%> |
5941 |
01 Feb 12 |
nicklas |
346 |
<div class="messagecontainer note"> |
5941 |
01 Feb 12 |
nicklas |
347 |
This annotation type isn't a member of any category (or, you don't have permission to view them). |
5941 |
01 Feb 12 |
nicklas |
348 |
</div> |
5941 |
01 Feb 12 |
nicklas |
349 |
<% |
5941 |
01 Feb 12 |
nicklas |
350 |
} |
5941 |
01 Feb 12 |
nicklas |
351 |
else |
5941 |
01 Feb 12 |
nicklas |
352 |
{ |
5941 |
01 Feb 12 |
nicklas |
353 |
%> |
5042 |
11 Aug 09 |
martin |
354 |
<tbl:table |
5042 |
11 Aug 09 |
martin |
355 |
id="members" |
5042 |
11 Aug 09 |
martin |
356 |
columns="all" |
5042 |
11 Aug 09 |
martin |
357 |
> |
3547 |
03 Jul 07 |
martin |
358 |
<tbl:columndef |
3547 |
03 Jul 07 |
martin |
359 |
id="name" |
3547 |
03 Jul 07 |
martin |
360 |
title="Name" |
3547 |
03 Jul 07 |
martin |
361 |
/> |
3547 |
03 Jul 07 |
martin |
362 |
<tbl:columndef |
5042 |
11 Aug 09 |
martin |
363 |
id="description" |
5042 |
11 Aug 09 |
martin |
364 |
title="Description" |
3547 |
03 Jul 07 |
martin |
365 |
/> |
3547 |
03 Jul 07 |
martin |
366 |
<tbl:data> |
5941 |
01 Feb 12 |
nicklas |
367 |
<tbl:headers> |
5941 |
01 Feb 12 |
nicklas |
368 |
<tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
369 |
<tbl:columnheaders /> |
5941 |
01 Feb 12 |
nicklas |
370 |
</tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
371 |
</tbl:headers> |
3547 |
03 Jul 07 |
martin |
372 |
<tbl:rows> |
3547 |
03 Jul 07 |
martin |
373 |
<% |
5042 |
11 Aug 09 |
martin |
374 |
for (AnnotationTypeCategory category : categories) |
3547 |
03 Jul 07 |
martin |
375 |
{ |
5042 |
11 Aug 09 |
martin |
376 |
%> |
3547 |
03 Jul 07 |
martin |
377 |
<tbl:row> |
3890 |
30 Oct 07 |
nicklas |
378 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
379 |
image="deleted.png" |
5042 |
11 Aug 09 |
martin |
380 |
tooltip="This item has been scheduled for deletion" |
5042 |
11 Aug 09 |
martin |
381 |
visible="<%=category.isRemoved()%>" |
5042 |
11 Aug 09 |
martin |
382 |
/><%=Base.getLinkedName(ID, category, false, true)%></tbl:cell> |
5042 |
11 Aug 09 |
martin |
383 |
<tbl:cell column="description"><%=HTML.encodeTags(category.getDescription())%></tbl:cell> |
3547 |
03 Jul 07 |
martin |
384 |
</tbl:row> |
3547 |
03 Jul 07 |
martin |
385 |
<% |
3547 |
03 Jul 07 |
martin |
386 |
} |
3547 |
03 Jul 07 |
martin |
387 |
%> |
3547 |
03 Jul 07 |
martin |
388 |
</tbl:rows> |
3547 |
03 Jul 07 |
martin |
389 |
</tbl:data> |
5042 |
11 Aug 09 |
martin |
390 |
</tbl:table> |
5941 |
01 Feb 12 |
nicklas |
391 |
<% |
5941 |
01 Feb 12 |
nicklas |
392 |
} |
5941 |
01 Feb 12 |
nicklas |
393 |
%> |
5941 |
01 Feb 12 |
nicklas |
394 |
</base:section> |
5511 |
19 Nov 10 |
nicklas |
395 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5511 |
19 Nov 10 |
nicklas |
396 |
<jsp:param name="ID" value="<%=ID%>" /> |
5511 |
19 Nov 10 |
nicklas |
397 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5511 |
19 Nov 10 |
nicklas |
398 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5511 |
19 Nov 10 |
nicklas |
399 |
<jsp:param name="title" value="Other items related to this annotation type" /> |
5511 |
19 Nov 10 |
nicklas |
400 |
</jsp:include> |
5941 |
01 Feb 12 |
nicklas |
401 |
<jsp:include page="../../common/share/list_share.jsp"> |
5941 |
01 Feb 12 |
nicklas |
402 |
<jsp:param name="ID" value="<%=ID%>" /> |
5941 |
01 Feb 12 |
nicklas |
403 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5941 |
01 Feb 12 |
nicklas |
404 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5941 |
01 Feb 12 |
nicklas |
405 |
<jsp:param name="title" value="Shared to" /> |
5941 |
01 Feb 12 |
nicklas |
406 |
</jsp:include> |
1980 |
14 Feb 06 |
nicklas |
407 |
</t:tab> |
7166 |
07 Jun 16 |
nicklas |
408 |
<t:tab id="history" title="History" |
7166 |
07 Jun 16 |
nicklas |
409 |
tooltip="Displays a log with the history of this item" |
6289 |
05 Jun 13 |
nicklas |
410 |
visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
6244 |
25 Feb 13 |
nicklas |
411 |
<jsp:include page="../../common/history/frameset.jsp"> |
6244 |
25 Feb 13 |
nicklas |
412 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6244 |
25 Feb 13 |
nicklas |
413 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6244 |
25 Feb 13 |
nicklas |
414 |
<jsp:param name="ID" value="<%=ID%>" /> |
6244 |
25 Feb 13 |
nicklas |
415 |
</jsp:include> |
5070 |
20 Aug 09 |
nicklas |
416 |
</t:tab> |
1980 |
14 Feb 06 |
nicklas |
417 |
</t:tabcontrol> |
1980 |
14 Feb 06 |
nicklas |
418 |
|
1980 |
14 Feb 06 |
nicklas |
419 |
</base:body> |
1980 |
14 Feb 06 |
nicklas |
420 |
</base:page> |
1980 |
14 Feb 06 |
nicklas |
421 |
<% |
1980 |
14 Feb 06 |
nicklas |
422 |
} |
1980 |
14 Feb 06 |
nicklas |
423 |
finally |
1980 |
14 Feb 06 |
nicklas |
424 |
{ |
1980 |
14 Feb 06 |
nicklas |
425 |
if (dc != null) dc.close(); |
1980 |
14 Feb 06 |
nicklas |
426 |
} |
1980 |
14 Feb 06 |
nicklas |
427 |
|
1980 |
14 Feb 06 |
nicklas |
428 |
%> |