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