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