1713 |
14 Dec 05 |
nicklas |
1 |
<%-- $Id$ |
1713 |
14 Dec 05 |
nicklas |
2 |
------------------------------------------------------------------ |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2005 Nicklas Nordborg |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
1713 |
14 Dec 05 |
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/ |
1713 |
14 Dec 05 |
nicklas |
8 |
|
1713 |
14 Dec 05 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
1713 |
14 Dec 05 |
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 |
1713 |
14 Dec 05 |
nicklas |
12 |
of the License, or (at your option) any later version. |
1713 |
14 Dec 05 |
nicklas |
13 |
|
1713 |
14 Dec 05 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
1713 |
14 Dec 05 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1713 |
14 Dec 05 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1713 |
14 Dec 05 |
nicklas |
17 |
GNU General Public License for more details. |
1713 |
14 Dec 05 |
nicklas |
18 |
|
1713 |
14 Dec 05 |
nicklas |
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/>. |
1713 |
14 Dec 05 |
nicklas |
21 |
------------------------------------------------------------------ |
1713 |
14 Dec 05 |
nicklas |
22 |
|
1713 |
14 Dec 05 |
nicklas |
23 |
@author Nicklas |
1713 |
14 Dec 05 |
nicklas |
24 |
@version 2.0 |
1713 |
14 Dec 05 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
1713 |
14 Dec 05 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
1713 |
14 Dec 05 |
nicklas |
28 |
import="net.sf.basedb.core.Item" |
1726 |
19 Dec 05 |
nicklas |
29 |
import="net.sf.basedb.core.Permission" |
1713 |
14 Dec 05 |
nicklas |
30 |
import="net.sf.basedb.core.ItemContext" |
1713 |
14 Dec 05 |
nicklas |
31 |
import="net.sf.basedb.clients.web.Base" |
1713 |
14 Dec 05 |
nicklas |
32 |
import="net.sf.basedb.clients.web.util.HTML" |
1713 |
14 Dec 05 |
nicklas |
33 |
%> |
1713 |
14 Dec 05 |
nicklas |
34 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1713 |
14 Dec 05 |
nicklas |
35 |
<% |
1713 |
14 Dec 05 |
nicklas |
36 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1713 |
14 Dec 05 |
nicklas |
37 |
final String ID = sc.getId(); |
1713 |
14 Dec 05 |
nicklas |
38 |
final Item itemType = Item.valueOf(request.getParameter("item_type")); |
1933 |
07 Feb 06 |
nicklas |
39 |
final String subContext = request.getParameter("subcontext"); |
1933 |
07 Feb 06 |
nicklas |
40 |
final ItemContext current = sc.getCurrentContext(itemType, subContext); |
1713 |
14 Dec 05 |
nicklas |
41 |
final String name = ItemContext.DEFAULT_NAME.equals(current.getName()) ? null : current.getName(); |
1713 |
14 Dec 05 |
nicklas |
42 |
%> |
1713 |
14 Dec 05 |
nicklas |
43 |
<base:page type="popup" title="Save preset as..."> |
6181 |
22 Oct 12 |
nicklas |
44 |
<base:head scripts="~saveas.js" /> |
6181 |
22 Oct 12 |
nicklas |
45 |
<base:body> |
5907 |
13 Dec 11 |
nicklas |
46 |
<h1>Save preset as... <base:help helpid="contexts.saveas" /></h1> |
6162 |
10 Oct 12 |
nicklas |
47 |
<form name="preset" action="index.jsp" method="post"> |
1713 |
14 Dec 05 |
nicklas |
48 |
<input type=hidden name="ID" value="<%=ID%>"> |
1713 |
14 Dec 05 |
nicklas |
49 |
<input type=hidden name="cmd" value="SaveCurrentContext"> |
1713 |
14 Dec 05 |
nicklas |
50 |
<input type=hidden name="item_type" value="<%=itemType.name()%>"> |
1933 |
07 Feb 06 |
nicklas |
51 |
<input type=hidden name="subcontext" value="<%=subContext%>"> |
1713 |
14 Dec 05 |
nicklas |
52 |
|
5907 |
13 Dec 11 |
nicklas |
53 |
<div class="content bottomborder"> |
5915 |
16 Dec 11 |
nicklas |
54 |
<table class="fullform input100"> |
1713 |
14 Dec 05 |
nicklas |
55 |
<tr> |
5907 |
13 Dec 11 |
nicklas |
56 |
<th>For item</th> |
1933 |
07 Feb 06 |
nicklas |
57 |
<td><%=itemType%><%="".equals(subContext) ? "" : " ("+subContext+")"%></td> |
1933 |
07 Feb 06 |
nicklas |
58 |
</tr> |
1933 |
07 Feb 06 |
nicklas |
59 |
<tr> |
5907 |
13 Dec 11 |
nicklas |
60 |
<th>Name</th> |
6181 |
22 Oct 12 |
nicklas |
61 |
<td><input class="text required auto-init" data-auto-init="focus" type="text" name="name" value="<%=HTML.encodeTags(name)%>" size="40" maxlength="40"></td> |
1713 |
14 Dec 05 |
nicklas |
62 |
</tr> |
1713 |
14 Dec 05 |
nicklas |
63 |
<tr> |
5907 |
13 Dec 11 |
nicklas |
64 |
<th><label for="overwrite">Overwrite existing</label></th> |
5812 |
17 Oct 11 |
nicklas |
65 |
<td><input type="checkbox" name="overwrite" id="overwrite" value="1" <%=name == null ? "" : "checked"%>></td> |
1713 |
14 Dec 05 |
nicklas |
66 |
</tr> |
1726 |
19 Dec 05 |
nicklas |
67 |
<% |
1726 |
19 Dec 05 |
nicklas |
68 |
if (sc.hasSystemPermission(Permission.SHARE_TO_EVERYONE)) |
1726 |
19 Dec 05 |
nicklas |
69 |
{ |
1726 |
19 Dec 05 |
nicklas |
70 |
%> |
1726 |
19 Dec 05 |
nicklas |
71 |
<tr> |
5907 |
13 Dec 11 |
nicklas |
72 |
<th><label for="public">Public</label></th> |
5812 |
17 Oct 11 |
nicklas |
73 |
<td><input type="checkbox" name="public" id="public" value="1"></td> |
1726 |
19 Dec 05 |
nicklas |
74 |
</tr> |
1726 |
19 Dec 05 |
nicklas |
75 |
<% |
1726 |
19 Dec 05 |
nicklas |
76 |
} |
1726 |
19 Dec 05 |
nicklas |
77 |
%> |
5907 |
13 Dec 11 |
nicklas |
78 |
<tr class="dynamic"> |
5907 |
13 Dec 11 |
nicklas |
79 |
<th></th> |
5971 |
17 Feb 12 |
nicklas |
80 |
<td></td> |
1713 |
14 Dec 05 |
nicklas |
81 |
</tr> |
1713 |
14 Dec 05 |
nicklas |
82 |
</table> |
5907 |
13 Dec 11 |
nicklas |
83 |
|
1713 |
14 Dec 05 |
nicklas |
84 |
</div> |
1713 |
14 Dec 05 |
nicklas |
85 |
</form> |
5971 |
17 Feb 12 |
nicklas |
86 |
|
5971 |
17 Feb 12 |
nicklas |
87 |
<div class="legend"> |
5971 |
17 Feb 12 |
nicklas |
88 |
<base:icon image="required.png" />= required information |
5971 |
17 Feb 12 |
nicklas |
89 |
</div> |
1713 |
14 Dec 05 |
nicklas |
90 |
|
5907 |
13 Dec 11 |
nicklas |
91 |
<base:buttongroup subclass="dialogbuttons"> |
6181 |
22 Oct 12 |
nicklas |
92 |
<base:button id="btnSave" title="Ok" /> |
6181 |
22 Oct 12 |
nicklas |
93 |
<base:button id="close" title="Cancel" /> |
5907 |
13 Dec 11 |
nicklas |
94 |
</base:buttongroup> |
1713 |
14 Dec 05 |
nicklas |
95 |
|
1713 |
14 Dec 05 |
nicklas |
96 |
</base:body> |
1713 |
14 Dec 05 |
nicklas |
97 |
</base:page> |