2210 |
03 May 06 |
nicklas |
1 |
<%-- $Id$ |
2210 |
03 May 06 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg |
2210 |
03 May 06 |
nicklas |
4 |
|
2304 |
22 May 06 |
jari |
5 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
6 |
Available at http://base.thep.lu.se/ |
2210 |
03 May 06 |
nicklas |
7 |
|
2210 |
03 May 06 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
2210 |
03 May 06 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
10 |
as published by the Free Software Foundation; either version 3 |
2210 |
03 May 06 |
nicklas |
11 |
of the License, or (at your option) any later version. |
2210 |
03 May 06 |
nicklas |
12 |
|
2210 |
03 May 06 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
2210 |
03 May 06 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2210 |
03 May 06 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2210 |
03 May 06 |
nicklas |
16 |
GNU General Public License for more details. |
2210 |
03 May 06 |
nicklas |
17 |
|
2210 |
03 May 06 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
4511 |
11 Sep 08 |
jari |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2210 |
03 May 06 |
nicklas |
20 |
------------------------------------------------------------------ |
2210 |
03 May 06 |
nicklas |
21 |
|
2210 |
03 May 06 |
nicklas |
22 |
|
2210 |
03 May 06 |
nicklas |
23 |
@author Nicklas |
2210 |
03 May 06 |
nicklas |
24 |
@version 2.0 |
2210 |
03 May 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
2210 |
03 May 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
2210 |
03 May 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
2210 |
03 May 06 |
nicklas |
29 |
import="net.sf.basedb.core.Item" |
2210 |
03 May 06 |
nicklas |
30 |
import="net.sf.basedb.core.ItemContext" |
2210 |
03 May 06 |
nicklas |
31 |
import="net.sf.basedb.core.Permission" |
2210 |
03 May 06 |
nicklas |
32 |
import="net.sf.basedb.core.Experiment" |
2210 |
03 May 06 |
nicklas |
33 |
import="net.sf.basedb.core.Transformation" |
2210 |
03 May 06 |
nicklas |
34 |
import="net.sf.basedb.core.ItemQuery" |
2210 |
03 May 06 |
nicklas |
35 |
import="net.sf.basedb.core.ItemResultList" |
2210 |
03 May 06 |
nicklas |
36 |
import="net.sf.basedb.core.Include" |
2210 |
03 May 06 |
nicklas |
37 |
import="net.sf.basedb.core.query.Orders" |
2210 |
03 May 06 |
nicklas |
38 |
import="net.sf.basedb.core.query.Hql" |
2210 |
03 May 06 |
nicklas |
39 |
import="net.sf.basedb.core.PermissionDeniedException" |
2210 |
03 May 06 |
nicklas |
40 |
import="net.sf.basedb.core.BaseException" |
2210 |
03 May 06 |
nicklas |
41 |
import="net.sf.basedb.clients.web.Base" |
2210 |
03 May 06 |
nicklas |
42 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
43 |
import="net.sf.basedb.util.Values" |
5503 |
18 Nov 10 |
nicklas |
44 |
import="net.sf.basedb.core.plugin.GuiContext" |
5503 |
18 Nov 10 |
nicklas |
45 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5503 |
18 Nov 10 |
nicklas |
46 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5503 |
18 Nov 10 |
nicklas |
47 |
import="net.sf.basedb.clients.web.extensions.edit.EditUtil" |
7604 |
25 Feb 19 |
nicklas |
48 |
import="net.sf.basedb.clients.web.extensions.tabcontrol.TabAction" |
5503 |
18 Nov 10 |
nicklas |
49 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
2210 |
03 May 06 |
nicklas |
50 |
import="java.util.Date" |
2210 |
03 May 06 |
nicklas |
51 |
%> |
2210 |
03 May 06 |
nicklas |
52 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2210 |
03 May 06 |
nicklas |
53 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
2210 |
03 May 06 |
nicklas |
54 |
<% |
2210 |
03 May 06 |
nicklas |
55 |
final Item itemType = Item.TRANSFORMATION; |
2210 |
03 May 06 |
nicklas |
56 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
2210 |
03 May 06 |
nicklas |
57 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
2210 |
03 May 06 |
nicklas |
58 |
final int itemId = cc.getId(); |
2210 |
03 May 06 |
nicklas |
59 |
final String ID = sc.getId(); |
2210 |
03 May 06 |
nicklas |
60 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
61 |
final DbControl dc = sc.newDbControl(":Edit "+itemType); |
2210 |
03 May 06 |
nicklas |
62 |
try |
2210 |
03 May 06 |
nicklas |
63 |
{ |
2210 |
03 May 06 |
nicklas |
64 |
Transformation transformation = Transformation.getById(dc, itemId); |
6315 |
06 Sep 13 |
nicklas |
65 |
transformation.checkPermission(Permission.WRITE); |
6315 |
06 Sep 13 |
nicklas |
66 |
|
2210 |
03 May 06 |
nicklas |
67 |
cc.setObject("item", transformation); |
2216 |
05 May 06 |
nicklas |
68 |
String title = "Edit transformation -- " + HTML.encodeTags(transformation.getName()); |
6217 |
14 Dec 12 |
nicklas |
69 |
|
5503 |
18 Nov 10 |
nicklas |
70 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), transformation); |
7604 |
25 Feb 19 |
nicklas |
71 |
ExtensionsInvoker<TabAction> invoker = EditUtil.useEditExtensions(jspContext); |
2210 |
03 May 06 |
nicklas |
72 |
%> |
6315 |
06 Sep 13 |
nicklas |
73 |
<base:page type="popup" title="<%=title%>" id="edit-page"> |
6315 |
06 Sep 13 |
nicklas |
74 |
<base:head scripts="tabcontrol-2.js,~transformations.js" styles="tabcontrol.css"> |
5503 |
18 Nov 10 |
nicklas |
75 |
<ext:scripts context="<%=jspContext%>" /> |
5503 |
18 Nov 10 |
nicklas |
76 |
<ext:stylesheets context="<%=jspContext%>" /> |
2210 |
03 May 06 |
nicklas |
77 |
</base:head> |
6315 |
06 Sep 13 |
nicklas |
78 |
<base:body> |
5923 |
11 Jan 12 |
nicklas |
79 |
<h1><%=title%> <base:help tabcontrol="settings" /></h1> |
6162 |
10 Oct 12 |
nicklas |
80 |
<form action="index.jsp?ID=<%=ID%>" method="post" name="transformation"> |
2210 |
03 May 06 |
nicklas |
81 |
<input type="hidden" name="cmd" value="UpdateItem"> |
2210 |
03 May 06 |
nicklas |
82 |
|
5923 |
11 Jan 12 |
nicklas |
83 |
<t:tabcontrol id="settings" |
5923 |
11 Jan 12 |
nicklas |
84 |
subclass="content dialogtabcontrol" |
5503 |
18 Nov 10 |
nicklas |
85 |
position="bottom" remember="<%=transformation != null%>" |
5503 |
18 Nov 10 |
nicklas |
86 |
extensions="<%=invoker%>"> |
6315 |
06 Sep 13 |
nicklas |
87 |
<t:tab id="info" title="Transformation" helpid="transformation.edit"> |
5923 |
11 Jan 12 |
nicklas |
88 |
<table class="fullform input100 smaller"> |
2210 |
03 May 06 |
nicklas |
89 |
<tr> |
5923 |
11 Jan 12 |
nicklas |
90 |
<th>Name</th> |
6315 |
06 Sep 13 |
nicklas |
91 |
<td><input class="text required auto-init" data-auto-init="focus" |
6315 |
06 Sep 13 |
nicklas |
92 |
type="text" name="name" |
6315 |
06 Sep 13 |
nicklas |
93 |
value="<%=HTML.encodeTags(transformation.getName())%>" |
5923 |
11 Jan 12 |
nicklas |
94 |
maxlength="<%=Transformation.MAX_NAME_LENGTH%>"></td> |
5923 |
11 Jan 12 |
nicklas |
95 |
<td></td> |
2210 |
03 May 06 |
nicklas |
96 |
</tr> |
5923 |
11 Jan 12 |
nicklas |
97 |
<tr class="dynamic"> |
5923 |
11 Jan 12 |
nicklas |
98 |
<th>Description</th> |
5923 |
11 Jan 12 |
nicklas |
99 |
<td> |
6217 |
14 Dec 12 |
nicklas |
100 |
<textarea class="text" rows="6" name="description" id="description" |
6315 |
06 Sep 13 |
nicklas |
101 |
><%=HTML.encodeTags(transformation.getDescription())%></textarea> |
2210 |
03 May 06 |
nicklas |
102 |
</td> |
5923 |
11 Jan 12 |
nicklas |
103 |
<td style="width: 20px;"> |
6215 |
13 Dec 12 |
nicklas |
104 |
<base:zoom textarea="description" title="Description" /> |
5923 |
11 Jan 12 |
nicklas |
105 |
</td> |
2210 |
03 May 06 |
nicklas |
106 |
</tr> |
2210 |
03 May 06 |
nicklas |
107 |
</table> |
2210 |
03 May 06 |
nicklas |
108 |
</t:tab> |
2210 |
03 May 06 |
nicklas |
109 |
</t:tabcontrol> |
5923 |
11 Jan 12 |
nicklas |
110 |
</form> |
5923 |
11 Jan 12 |
nicklas |
111 |
|
5923 |
11 Jan 12 |
nicklas |
112 |
<div class="legend"> |
5946 |
03 Feb 12 |
nicklas |
113 |
<base:icon image="required.png" />= required information |
5923 |
11 Jan 12 |
nicklas |
114 |
</div> |
2210 |
03 May 06 |
nicklas |
115 |
|
5923 |
11 Jan 12 |
nicklas |
116 |
<base:buttongroup subclass="dialogbuttons"> |
6315 |
06 Sep 13 |
nicklas |
117 |
<base:button id="btnSave" title="Save" /> |
6315 |
06 Sep 13 |
nicklas |
118 |
<base:button id="close" title="Cancel" /> |
5923 |
11 Jan 12 |
nicklas |
119 |
</base:buttongroup> |
2210 |
03 May 06 |
nicklas |
120 |
</base:body> |
2210 |
03 May 06 |
nicklas |
121 |
</base:page> |
2210 |
03 May 06 |
nicklas |
122 |
<% |
2210 |
03 May 06 |
nicklas |
123 |
} |
2210 |
03 May 06 |
nicklas |
124 |
finally |
2210 |
03 May 06 |
nicklas |
125 |
{ |
2210 |
03 May 06 |
nicklas |
126 |
if (dc != null) dc.close(); |
2210 |
03 May 06 |
nicklas |
127 |
} |
2210 |
03 May 06 |
nicklas |
128 |
%> |