2097 |
21 Mar 06 |
nicklas |
1 |
<%-- $Id$ |
2097 |
21 Mar 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 Nicklas Nordborg |
2097 |
21 Mar 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/ |
2097 |
21 Mar 06 |
nicklas |
8 |
|
2097 |
21 Mar 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
2097 |
21 Mar 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 |
2097 |
21 Mar 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
2097 |
21 Mar 06 |
nicklas |
13 |
|
2097 |
21 Mar 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
2097 |
21 Mar 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2097 |
21 Mar 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2097 |
21 Mar 06 |
nicklas |
17 |
GNU General Public License for more details. |
2097 |
21 Mar 06 |
nicklas |
18 |
|
2097 |
21 Mar 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/>. |
2097 |
21 Mar 06 |
nicklas |
21 |
------------------------------------------------------------------ |
2097 |
21 Mar 06 |
nicklas |
22 |
|
2097 |
21 Mar 06 |
nicklas |
23 |
|
2097 |
21 Mar 06 |
nicklas |
24 |
@author Nicklas |
2097 |
21 Mar 06 |
nicklas |
25 |
@version 2.0 |
2097 |
21 Mar 06 |
nicklas |
26 |
--%> |
5426 |
24 Sep 10 |
nicklas |
27 |
<%@ page pageEncoding="UTF-8" session="false" |
2097 |
21 Mar 06 |
nicklas |
28 |
import="net.sf.basedb.core.SessionControl" |
2097 |
21 Mar 06 |
nicklas |
29 |
import="net.sf.basedb.core.DbControl" |
2097 |
21 Mar 06 |
nicklas |
30 |
import="net.sf.basedb.core.Item" |
2097 |
21 Mar 06 |
nicklas |
31 |
import="net.sf.basedb.core.ItemContext" |
2097 |
21 Mar 06 |
nicklas |
32 |
import="net.sf.basedb.core.Permission" |
2097 |
21 Mar 06 |
nicklas |
33 |
import="net.sf.basedb.core.Experiment" |
2097 |
21 Mar 06 |
nicklas |
34 |
import="net.sf.basedb.core.BioAssaySet" |
2097 |
21 Mar 06 |
nicklas |
35 |
import="net.sf.basedb.core.ItemQuery" |
2097 |
21 Mar 06 |
nicklas |
36 |
import="net.sf.basedb.core.ItemResultList" |
2097 |
21 Mar 06 |
nicklas |
37 |
import="net.sf.basedb.core.Include" |
2097 |
21 Mar 06 |
nicklas |
38 |
import="net.sf.basedb.core.query.Orders" |
2097 |
21 Mar 06 |
nicklas |
39 |
import="net.sf.basedb.core.query.Hql" |
2097 |
21 Mar 06 |
nicklas |
40 |
import="net.sf.basedb.core.PermissionDeniedException" |
2097 |
21 Mar 06 |
nicklas |
41 |
import="net.sf.basedb.core.BaseException" |
4910 |
29 Apr 09 |
nicklas |
42 |
import="net.sf.basedb.core.IntensityTransform" |
2097 |
21 Mar 06 |
nicklas |
43 |
import="net.sf.basedb.clients.web.Base" |
2097 |
21 Mar 06 |
nicklas |
44 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
45 |
import="net.sf.basedb.util.Values" |
5503 |
18 Nov 10 |
nicklas |
46 |
import="net.sf.basedb.core.plugin.GuiContext" |
5503 |
18 Nov 10 |
nicklas |
47 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5503 |
18 Nov 10 |
nicklas |
48 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5503 |
18 Nov 10 |
nicklas |
49 |
import="net.sf.basedb.clients.web.extensions.edit.EditUtil" |
7604 |
25 Feb 19 |
nicklas |
50 |
import="net.sf.basedb.clients.web.extensions.tabcontrol.TabAction" |
5503 |
18 Nov 10 |
nicklas |
51 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
2097 |
21 Mar 06 |
nicklas |
52 |
import="java.util.Date" |
2097 |
21 Mar 06 |
nicklas |
53 |
%> |
2097 |
21 Mar 06 |
nicklas |
54 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2097 |
21 Mar 06 |
nicklas |
55 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
6143 |
20 Sep 12 |
nicklas |
56 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
2097 |
21 Mar 06 |
nicklas |
57 |
<% |
2097 |
21 Mar 06 |
nicklas |
58 |
final Item itemType = Item.BIOASSAYSET; |
2097 |
21 Mar 06 |
nicklas |
59 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
2097 |
21 Mar 06 |
nicklas |
60 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
2097 |
21 Mar 06 |
nicklas |
61 |
final int itemId = cc.getId(); |
2097 |
21 Mar 06 |
nicklas |
62 |
final String ID = sc.getId(); |
2097 |
21 Mar 06 |
nicklas |
63 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
64 |
final DbControl dc = sc.newDbControl(":Edit "+itemType); |
2097 |
21 Mar 06 |
nicklas |
65 |
try |
2097 |
21 Mar 06 |
nicklas |
66 |
{ |
2097 |
21 Mar 06 |
nicklas |
67 |
BioAssaySet bioAssaySet = BioAssaySet.getById(dc, itemId); |
6315 |
06 Sep 13 |
nicklas |
68 |
bioAssaySet.checkPermission(Permission.WRITE); |
6315 |
06 Sep 13 |
nicklas |
69 |
|
2097 |
21 Mar 06 |
nicklas |
70 |
cc.setObject("item", bioAssaySet); |
2097 |
21 Mar 06 |
nicklas |
71 |
String title = "Edit bioassay set -- " + HTML.encodeTags(bioAssaySet.getName()); |
6217 |
14 Dec 12 |
nicklas |
72 |
|
5503 |
18 Nov 10 |
nicklas |
73 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), bioAssaySet); |
7604 |
25 Feb 19 |
nicklas |
74 |
ExtensionsInvoker<TabAction> invoker = EditUtil.useEditExtensions(jspContext); |
2097 |
21 Mar 06 |
nicklas |
75 |
%> |
6315 |
06 Sep 13 |
nicklas |
76 |
<base:page type="popup" title="<%=title%>" id="edit-page"> |
6315 |
06 Sep 13 |
nicklas |
77 |
<base:head scripts="tabcontrol-2.js,~bioassaysets.js" styles="tabcontrol.css"> |
5503 |
18 Nov 10 |
nicklas |
78 |
<ext:scripts context="<%=jspContext%>" /> |
5503 |
18 Nov 10 |
nicklas |
79 |
<ext:stylesheets context="<%=jspContext%>" /> |
2097 |
21 Mar 06 |
nicklas |
80 |
</base:head> |
6315 |
06 Sep 13 |
nicklas |
81 |
<base:body> |
5923 |
11 Jan 12 |
nicklas |
82 |
<h1><%=title%> <base:help tabcontrol="settings" /></h1> |
6162 |
10 Oct 12 |
nicklas |
83 |
<form action="index.jsp?ID=<%=ID%>" method="post" name="bioAssaySet"> |
2097 |
21 Mar 06 |
nicklas |
84 |
<input type="hidden" name="cmd" value="UpdateItem"> |
2097 |
21 Mar 06 |
nicklas |
85 |
|
5923 |
11 Jan 12 |
nicklas |
86 |
<t:tabcontrol id="settings" |
5923 |
11 Jan 12 |
nicklas |
87 |
subclass="content dialogtabcontrol" |
6254 |
22 Mar 13 |
nicklas |
88 |
position="bottom" remember="<%=bioAssaySet != null%>" |
5503 |
18 Nov 10 |
nicklas |
89 |
extensions="<%=invoker%>"> |
6315 |
06 Sep 13 |
nicklas |
90 |
<t:tab id="info" title="Bioassay set" helpid="bioassayset.edit"> |
5923 |
11 Jan 12 |
nicklas |
91 |
<table class="fullform input100"> |
2097 |
21 Mar 06 |
nicklas |
92 |
<tr> |
5923 |
11 Jan 12 |
nicklas |
93 |
<th>Name</th> |
6315 |
06 Sep 13 |
nicklas |
94 |
<td><input class="text required auto-init" |
6315 |
06 Sep 13 |
nicklas |
95 |
data-auto-init="focus" |
6315 |
06 Sep 13 |
nicklas |
96 |
type="text" name="name" |
6315 |
06 Sep 13 |
nicklas |
97 |
value="<%=HTML.encodeTags(bioAssaySet.getName())%>" |
5923 |
11 Jan 12 |
nicklas |
98 |
maxlength="<%=BioAssaySet.MAX_NAME_LENGTH%>"></td> |
5923 |
11 Jan 12 |
nicklas |
99 |
<td></td> |
2097 |
21 Mar 06 |
nicklas |
100 |
</tr> |
4910 |
29 Apr 09 |
nicklas |
101 |
<tr> |
5923 |
11 Jan 12 |
nicklas |
102 |
<th>Spot intensity<br>transformation</th> |
4910 |
29 Apr 09 |
nicklas |
103 |
<td> |
4910 |
29 Apr 09 |
nicklas |
104 |
<select name="intensityTransform"> |
4910 |
29 Apr 09 |
nicklas |
105 |
<% |
4910 |
29 Apr 09 |
nicklas |
106 |
IntensityTransform transform = bioAssaySet.getIntensityTransform(); |
4910 |
29 Apr 09 |
nicklas |
107 |
for (IntensityTransform t : IntensityTransform.values()) |
4910 |
29 Apr 09 |
nicklas |
108 |
{ |
4910 |
29 Apr 09 |
nicklas |
109 |
String selected = transform == t ? "selected" : ""; |
4910 |
29 Apr 09 |
nicklas |
110 |
%> |
4910 |
29 Apr 09 |
nicklas |
111 |
<option value="<%=t.name()%>" <%=selected%>><%=t.toString()%> |
4910 |
29 Apr 09 |
nicklas |
112 |
<% |
4910 |
29 Apr 09 |
nicklas |
113 |
} |
4910 |
29 Apr 09 |
nicklas |
114 |
%> |
4910 |
29 Apr 09 |
nicklas |
115 |
</select> |
4910 |
29 Apr 09 |
nicklas |
116 |
</td> |
5923 |
11 Jan 12 |
nicklas |
117 |
<td></td> |
4910 |
29 Apr 09 |
nicklas |
118 |
</tr> |
5923 |
11 Jan 12 |
nicklas |
119 |
<tr class="dynamic"> |
5923 |
11 Jan 12 |
nicklas |
120 |
<th>Description</th> |
5923 |
11 Jan 12 |
nicklas |
121 |
<td> |
6217 |
14 Dec 12 |
nicklas |
122 |
<textarea class="text" rows="6" name="description" id="description" |
2097 |
21 Mar 06 |
nicklas |
123 |
><%=HTML.encodeTags(bioAssaySet == null ? cc.getPropertyValue("description") : bioAssaySet.getDescription())%></textarea> |
2097 |
21 Mar 06 |
nicklas |
124 |
</td> |
5923 |
11 Jan 12 |
nicklas |
125 |
<td style="width: 20px;"> |
6215 |
13 Dec 12 |
nicklas |
126 |
<base:zoom textarea="description" title="Description" /> |
5923 |
11 Jan 12 |
nicklas |
127 |
</td> |
2097 |
21 Mar 06 |
nicklas |
128 |
</tr> |
2097 |
21 Mar 06 |
nicklas |
129 |
</table> |
2892 |
10 Nov 06 |
nicklas |
130 |
</t:tab> |
6315 |
06 Sep 13 |
nicklas |
131 |
<t:tab id="annotations" title="Annotations" helpid="annotations.edit"> |
6254 |
22 Mar 13 |
nicklas |
132 |
<jsp:include page="../../../common/annotations/annotate_frameset.jsp"> |
6254 |
22 Mar 13 |
nicklas |
133 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6254 |
22 Mar 13 |
nicklas |
134 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6254 |
22 Mar 13 |
nicklas |
135 |
<jsp:param name="ID" value="<%=ID%>" /> |
6254 |
22 Mar 13 |
nicklas |
136 |
</jsp:include> |
6254 |
22 Mar 13 |
nicklas |
137 |
</t:tab> |
2097 |
21 Mar 06 |
nicklas |
138 |
</t:tabcontrol> |
5923 |
11 Jan 12 |
nicklas |
139 |
</form> |
5923 |
11 Jan 12 |
nicklas |
140 |
|
5923 |
11 Jan 12 |
nicklas |
141 |
<div class="legend"> |
5946 |
03 Feb 12 |
nicklas |
142 |
<base:icon image="required.png" />= required information |
5923 |
11 Jan 12 |
nicklas |
143 |
</div> |
2097 |
21 Mar 06 |
nicklas |
144 |
|
5923 |
11 Jan 12 |
nicklas |
145 |
<base:buttongroup subclass="dialogbuttons"> |
6315 |
06 Sep 13 |
nicklas |
146 |
<base:button id="btnSave" title="Save" /> |
6315 |
06 Sep 13 |
nicklas |
147 |
<base:button id="close" title="Cancel" /> |
5923 |
11 Jan 12 |
nicklas |
148 |
</base:buttongroup> |
2097 |
21 Mar 06 |
nicklas |
149 |
</base:body> |
2097 |
21 Mar 06 |
nicklas |
150 |
</base:page> |
2097 |
21 Mar 06 |
nicklas |
151 |
<% |
2097 |
21 Mar 06 |
nicklas |
152 |
} |
2097 |
21 Mar 06 |
nicklas |
153 |
finally |
2097 |
21 Mar 06 |
nicklas |
154 |
{ |
2097 |
21 Mar 06 |
nicklas |
155 |
if (dc != null) dc.close(); |
2097 |
21 Mar 06 |
nicklas |
156 |
} |
2097 |
21 Mar 06 |
nicklas |
157 |
%> |