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