3793 |
27 Sep 07 |
nicklas |
1 |
<%-- $Id$ |
3793 |
27 Sep 07 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
3793 |
27 Sep 07 |
nicklas |
4 |
|
3793 |
27 Sep 07 |
nicklas |
5 |
This file is part of BASE - BioArray Software Environment. |
3793 |
27 Sep 07 |
nicklas |
6 |
Available at http://base.thep.lu.se/ |
3793 |
27 Sep 07 |
nicklas |
7 |
|
3793 |
27 Sep 07 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
3793 |
27 Sep 07 |
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 |
3793 |
27 Sep 07 |
nicklas |
11 |
of the License, or (at your option) any later version. |
3793 |
27 Sep 07 |
nicklas |
12 |
|
3793 |
27 Sep 07 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
3793 |
27 Sep 07 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
3793 |
27 Sep 07 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3793 |
27 Sep 07 |
nicklas |
16 |
GNU General Public License for more details. |
3793 |
27 Sep 07 |
nicklas |
17 |
|
3793 |
27 Sep 07 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
3793 |
27 Sep 07 |
nicklas |
20 |
------------------------------------------------------------------ |
3793 |
27 Sep 07 |
nicklas |
21 |
|
3793 |
27 Sep 07 |
nicklas |
22 |
@author Nicklas |
3793 |
27 Sep 07 |
nicklas |
23 |
@version 2.0 |
3793 |
27 Sep 07 |
nicklas |
24 |
--%> |
5426 |
24 Sep 10 |
nicklas |
25 |
<%@ page pageEncoding="UTF-8" session="false" |
3793 |
27 Sep 07 |
nicklas |
26 |
import="net.sf.basedb.core.SessionControl" |
3793 |
27 Sep 07 |
nicklas |
27 |
import="net.sf.basedb.core.DbControl" |
3793 |
27 Sep 07 |
nicklas |
28 |
import="net.sf.basedb.core.SystemItems" |
3793 |
27 Sep 07 |
nicklas |
29 |
import="net.sf.basedb.core.Item" |
3793 |
27 Sep 07 |
nicklas |
30 |
import="net.sf.basedb.core.ItemContext" |
3890 |
30 Oct 07 |
nicklas |
31 |
import="net.sf.basedb.core.Include" |
3793 |
27 Sep 07 |
nicklas |
32 |
import="net.sf.basedb.core.Permission" |
3793 |
27 Sep 07 |
nicklas |
33 |
import="net.sf.basedb.core.Platform" |
3793 |
27 Sep 07 |
nicklas |
34 |
import="net.sf.basedb.core.PlatformVariant" |
4886 |
03 Apr 09 |
nicklas |
35 |
import="net.sf.basedb.core.PlatformFileType" |
3800 |
28 Sep 07 |
nicklas |
36 |
import="net.sf.basedb.core.DataFileType" |
3793 |
27 Sep 07 |
nicklas |
37 |
import="net.sf.basedb.core.RawDataType" |
8026 |
15 Dec 21 |
nicklas |
38 |
import="net.sf.basedb.core.Project" |
3793 |
27 Sep 07 |
nicklas |
39 |
import="net.sf.basedb.core.ItemQuery" |
3793 |
27 Sep 07 |
nicklas |
40 |
import="net.sf.basedb.core.ItemResultList" |
3793 |
27 Sep 07 |
nicklas |
41 |
import="net.sf.basedb.core.PermissionDeniedException" |
3793 |
27 Sep 07 |
nicklas |
42 |
import="net.sf.basedb.core.PluginDefinition" |
3793 |
27 Sep 07 |
nicklas |
43 |
import="net.sf.basedb.core.plugin.GuiContext" |
3793 |
27 Sep 07 |
nicklas |
44 |
import="net.sf.basedb.core.plugin.Plugin" |
3793 |
27 Sep 07 |
nicklas |
45 |
import="net.sf.basedb.core.query.Orders" |
3793 |
27 Sep 07 |
nicklas |
46 |
import="net.sf.basedb.core.query.Hql" |
3793 |
27 Sep 07 |
nicklas |
47 |
import="net.sf.basedb.clients.web.Base" |
3793 |
27 Sep 07 |
nicklas |
48 |
import="net.sf.basedb.clients.web.PermissionUtil" |
3793 |
27 Sep 07 |
nicklas |
49 |
import="net.sf.basedb.clients.web.util.HTML" |
3793 |
27 Sep 07 |
nicklas |
50 |
import="net.sf.basedb.util.formatter.Formatter" |
3793 |
27 Sep 07 |
nicklas |
51 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4886 |
03 Apr 09 |
nicklas |
52 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4886 |
03 Apr 09 |
nicklas |
53 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4886 |
03 Apr 09 |
nicklas |
54 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
55 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4886 |
03 Apr 09 |
nicklas |
56 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4886 |
03 Apr 09 |
nicklas |
57 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
3793 |
27 Sep 07 |
nicklas |
58 |
import="net.sf.basedb.util.Values" |
3793 |
27 Sep 07 |
nicklas |
59 |
import="java.util.Map" |
3793 |
27 Sep 07 |
nicklas |
60 |
import="java.util.Date" |
3793 |
27 Sep 07 |
nicklas |
61 |
%> |
3793 |
27 Sep 07 |
nicklas |
62 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
3793 |
27 Sep 07 |
nicklas |
63 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
3793 |
27 Sep 07 |
nicklas |
64 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
3793 |
27 Sep 07 |
nicklas |
65 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4886 |
03 Apr 09 |
nicklas |
66 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
3793 |
27 Sep 07 |
nicklas |
67 |
<%! |
3793 |
27 Sep 07 |
nicklas |
68 |
private static final Item itemType = Item.PLATFORM; |
3793 |
27 Sep 07 |
nicklas |
69 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
3793 |
27 Sep 07 |
nicklas |
70 |
%> |
3793 |
27 Sep 07 |
nicklas |
71 |
<% |
3793 |
27 Sep 07 |
nicklas |
72 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
3793 |
27 Sep 07 |
nicklas |
73 |
final String ID = sc.getId(); |
3793 |
27 Sep 07 |
nicklas |
74 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
3793 |
27 Sep 07 |
nicklas |
75 |
final int itemId = cc.getId(); |
6289 |
05 Jun 13 |
nicklas |
76 |
final String tab = Values.getStringOrNull(request.getParameter("tab")); |
3793 |
27 Sep 07 |
nicklas |
77 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
78 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
3793 |
27 Sep 07 |
nicklas |
79 |
try |
3793 |
27 Sep 07 |
nicklas |
80 |
{ |
3793 |
27 Sep 07 |
nicklas |
81 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
3793 |
27 Sep 07 |
nicklas |
82 |
|
3793 |
27 Sep 07 |
nicklas |
83 |
String title = null; |
3793 |
27 Sep 07 |
nicklas |
84 |
Platform platform = Platform.getById(dc, itemId); |
8026 |
15 Dec 21 |
nicklas |
85 |
Project activeProject = Project.getActive(dc); |
3793 |
27 Sep 07 |
nicklas |
86 |
|
3793 |
27 Sep 07 |
nicklas |
87 |
final boolean writePermission = platform.hasPermission(Permission.WRITE); |
3793 |
27 Sep 07 |
nicklas |
88 |
final boolean deletePermission = platform.hasPermission(Permission.DELETE); |
4003 |
26 Nov 07 |
nicklas |
89 |
final boolean isRemoved = platform.isRemoved(); |
4003 |
26 Nov 07 |
nicklas |
90 |
final boolean isUsed = isRemoved && platform.isUsed(); |
4003 |
26 Nov 07 |
nicklas |
91 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
4886 |
03 Apr 09 |
nicklas |
92 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, platform); |
7604 |
25 Feb 19 |
nicklas |
93 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
3793 |
27 Sep 07 |
nicklas |
94 |
%> |
6289 |
05 Jun 13 |
nicklas |
95 |
<base:page title="<%=title%>" id="view-page"> |
6289 |
05 Jun 13 |
nicklas |
96 |
<base:head scripts="tabcontrol-2.js,table.js,~platforms.js" styles="toolbar.css,headertabcontrol.css,path.css,table.css"> |
4886 |
03 Apr 09 |
nicklas |
97 |
<ext:scripts context="<%=jspContext%>" /> |
4886 |
03 Apr 09 |
nicklas |
98 |
<ext:stylesheets context="<%=jspContext%>" /> |
3793 |
27 Sep 07 |
nicklas |
99 |
</base:head> |
3793 |
27 Sep 07 |
nicklas |
100 |
<base:body> |
5941 |
01 Feb 12 |
nicklas |
101 |
<p:path><p:pathelement |
5941 |
01 Feb 12 |
nicklas |
102 |
title="Platforms" href="<%="index.jsp?ID="+ID%>" |
5941 |
01 Feb 12 |
nicklas |
103 |
/><p:pathelement title="<%=HTML.encodeTags(platform.getName())%>" |
5941 |
01 Feb 12 |
nicklas |
104 |
/></p:path> |
6289 |
05 Jun 13 |
nicklas |
105 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
3793 |
27 Sep 07 |
nicklas |
106 |
|
5941 |
01 Feb 12 |
nicklas |
107 |
<t:tabcontrol |
5941 |
01 Feb 12 |
nicklas |
108 |
id="main" |
5941 |
01 Feb 12 |
nicklas |
109 |
subclass="content mastertabcontrol" |
6289 |
05 Jun 13 |
nicklas |
110 |
active="<%=tab%>"> |
3793 |
27 Sep 07 |
nicklas |
111 |
<t:tab id="properties" title="Properties"> |
5941 |
01 Feb 12 |
nicklas |
112 |
<div> |
5941 |
01 Feb 12 |
nicklas |
113 |
<table class="fullform bottomborder"> |
5941 |
01 Feb 12 |
nicklas |
114 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
115 |
<th class="itemstatus"> |
8026 |
15 Dec 21 |
nicklas |
116 |
<base:icon |
8026 |
15 Dec 21 |
nicklas |
117 |
image="star.png" |
8026 |
15 Dec 21 |
nicklas |
118 |
tooltip="This is a default item for the current project" |
8026 |
15 Dec 21 |
nicklas |
119 |
visible="<%=activeProject != null && activeProject.isDefaultItem(platform)%>" |
8026 |
15 Dec 21 |
nicklas |
120 |
/> |
4003 |
26 Nov 07 |
nicklas |
121 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
122 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
123 |
image="deleted.png" |
5941 |
01 Feb 12 |
nicklas |
124 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5941 |
01 Feb 12 |
nicklas |
125 |
enabled="<%=deletePermanentlyPermission %>" |
5941 |
01 Feb 12 |
nicklas |
126 |
visible="<%=isRemoved%>" |
5941 |
01 Feb 12 |
nicklas |
127 |
/> |
6289 |
05 Jun 13 |
nicklas |
128 |
<base:icon |
6289 |
05 Jun 13 |
nicklas |
129 |
id="btnUsingItems" |
6289 |
05 Jun 13 |
nicklas |
130 |
image="used.png" |
5941 |
01 Feb 12 |
nicklas |
131 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5941 |
01 Feb 12 |
nicklas |
132 |
visible="<%=isRemoved && isUsed%>" /> |
5941 |
01 Feb 12 |
nicklas |
133 |
</th> |
5941 |
01 Feb 12 |
nicklas |
134 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
135 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5941 |
01 Feb 12 |
nicklas |
136 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
137 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
138 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
139 |
image="edit.png" |
5941 |
01 Feb 12 |
nicklas |
140 |
title="Edit…" |
5941 |
01 Feb 12 |
nicklas |
141 |
tooltip="<%=writePermission ? "Edit this platform" : "You do not have permission to edit this platform"%>" |
5941 |
01 Feb 12 |
nicklas |
142 |
/> |
5941 |
01 Feb 12 |
nicklas |
143 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
144 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
145 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
146 |
image="delete.png" |
5941 |
01 Feb 12 |
nicklas |
147 |
title="Delete" |
5941 |
01 Feb 12 |
nicklas |
148 |
visible="<%=!platform.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
149 |
tooltip="<%=deletePermission ? "Delete this platform" : "You do not have permission to delete this platform"%>" |
5941 |
01 Feb 12 |
nicklas |
150 |
/> |
5941 |
01 Feb 12 |
nicklas |
151 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
152 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
153 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
154 |
image="restore.png" |
5941 |
01 Feb 12 |
nicklas |
155 |
title="Restore" |
5941 |
01 Feb 12 |
nicklas |
156 |
visible="<%=platform.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
157 |
tooltip="<%=writePermission ? "Restore this platform" : "You do not have permission to restore this platform"%>" |
5941 |
01 Feb 12 |
nicklas |
158 |
/> |
5941 |
01 Feb 12 |
nicklas |
159 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
160 |
id="btnNewVariant" |
5941 |
01 Feb 12 |
nicklas |
161 |
image="add.png" |
5941 |
01 Feb 12 |
nicklas |
162 |
title="New variant…" |
5941 |
01 Feb 12 |
nicklas |
163 |
tooltip="Create a new variant of this platform" |
5941 |
01 Feb 12 |
nicklas |
164 |
visible="<%=writePermission%>" |
5941 |
01 Feb 12 |
nicklas |
165 |
/> |
5941 |
01 Feb 12 |
nicklas |
166 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
167 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
168 |
image="import.png" |
6289 |
05 Jun 13 |
nicklas |
169 |
data-plugin-type="IMPORT" |
5941 |
01 Feb 12 |
nicklas |
170 |
title="Import…" |
5941 |
01 Feb 12 |
nicklas |
171 |
tooltip="Import data" |
5941 |
01 Feb 12 |
nicklas |
172 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
173 |
/> |
5941 |
01 Feb 12 |
nicklas |
174 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
175 |
id="btnExport" |
6289 |
05 Jun 13 |
nicklas |
176 |
image="export.png" |
6289 |
05 Jun 13 |
nicklas |
177 |
data-plugin-type="EXPORT" |
5941 |
01 Feb 12 |
nicklas |
178 |
title="Export…" |
5941 |
01 Feb 12 |
nicklas |
179 |
tooltip="Export data" |
5941 |
01 Feb 12 |
nicklas |
180 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
181 |
/> |
5941 |
01 Feb 12 |
nicklas |
182 |
<tbl:button |
6289 |
05 Jun 13 |
nicklas |
183 |
id="btnRunPlugin" |
6289 |
05 Jun 13 |
nicklas |
184 |
image="runplugin.png" |
6289 |
05 Jun 13 |
nicklas |
185 |
data-plugin-type="OTHER" |
5941 |
01 Feb 12 |
nicklas |
186 |
title="Run plugin…" |
5941 |
01 Feb 12 |
nicklas |
187 |
tooltip="Run a plugin" |
5941 |
01 Feb 12 |
nicklas |
188 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5941 |
01 Feb 12 |
nicklas |
189 |
/> |
5941 |
01 Feb 12 |
nicklas |
190 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
191 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5941 |
01 Feb 12 |
nicklas |
192 |
<tbl:button |
5941 |
01 Feb 12 |
nicklas |
193 |
image="help.png" |
6289 |
05 Jun 13 |
nicklas |
194 |
subclass="auto-init" |
6289 |
05 Jun 13 |
nicklas |
195 |
data-auto-init="help" |
6289 |
05 Jun 13 |
nicklas |
196 |
data-help-id="platform.view.properties" |
5941 |
01 Feb 12 |
nicklas |
197 |
title="Help…" |
5941 |
01 Feb 12 |
nicklas |
198 |
tooltip="Get help about this page" |
5941 |
01 Feb 12 |
nicklas |
199 |
/> |
5941 |
01 Feb 12 |
nicklas |
200 |
</tbl:toolbar> |
5941 |
01 Feb 12 |
nicklas |
201 |
</td> |
5941 |
01 Feb 12 |
nicklas |
202 |
</tr> |
3793 |
27 Sep 07 |
nicklas |
203 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
204 |
<th>Name</th> |
3793 |
27 Sep 07 |
nicklas |
205 |
<td><%=HTML.encodeTags(platform.getName())%></td> |
3793 |
27 Sep 07 |
nicklas |
206 |
</tr> |
3793 |
27 Sep 07 |
nicklas |
207 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
208 |
<th>External ID</th> |
3798 |
28 Sep 07 |
nicklas |
209 |
<td><%=HTML.encodeTags(platform.getExternalId())%></td> |
3793 |
27 Sep 07 |
nicklas |
210 |
</tr> |
3793 |
27 Sep 07 |
nicklas |
211 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
212 |
<th>File-only</th> |
3793 |
27 Sep 07 |
nicklas |
213 |
<td><%=platform.isFileOnly() ? "yes" : "no"%></td> |
3793 |
27 Sep 07 |
nicklas |
214 |
</tr> |
3793 |
27 Sep 07 |
nicklas |
215 |
<% |
3793 |
27 Sep 07 |
nicklas |
216 |
RawDataType rdt = platform.getRawDataType(); |
3793 |
27 Sep 07 |
nicklas |
217 |
if (!platform.isFileOnly()) |
3793 |
27 Sep 07 |
nicklas |
218 |
{ |
3793 |
27 Sep 07 |
nicklas |
219 |
%> |
3793 |
27 Sep 07 |
nicklas |
220 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
221 |
<th class="subprompt">raw data type</th> |
3793 |
27 Sep 07 |
nicklas |
222 |
<td><%=rdt == null ? "<i>- any -</i>" : rdt.getName()%></td> |
3793 |
27 Sep 07 |
nicklas |
223 |
</tr> |
3793 |
27 Sep 07 |
nicklas |
224 |
<% |
3793 |
27 Sep 07 |
nicklas |
225 |
} |
3793 |
27 Sep 07 |
nicklas |
226 |
else |
3793 |
27 Sep 07 |
nicklas |
227 |
{ |
3793 |
27 Sep 07 |
nicklas |
228 |
%> |
3793 |
27 Sep 07 |
nicklas |
229 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
230 |
<th class="subprompt">- channels</th> |
3793 |
27 Sep 07 |
nicklas |
231 |
<td><%=rdt.getChannels()%></td> |
3793 |
27 Sep 07 |
nicklas |
232 |
</tr> |
3793 |
27 Sep 07 |
nicklas |
233 |
<% |
3793 |
27 Sep 07 |
nicklas |
234 |
} |
3793 |
27 Sep 07 |
nicklas |
235 |
%> |
5941 |
01 Feb 12 |
nicklas |
236 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
237 |
<th>Permissions</th> |
5941 |
01 Feb 12 |
nicklas |
238 |
<td><%=PermissionUtil.getFullPermissionNames(platform)%></td> |
5941 |
01 Feb 12 |
nicklas |
239 |
</tr> |
5905 |
12 Dec 11 |
nicklas |
240 |
<tr > |
5941 |
01 Feb 12 |
nicklas |
241 |
<th>Description</th> |
3793 |
27 Sep 07 |
nicklas |
242 |
<td><%=HTML.niceFormat(platform.getDescription())%></td> |
3793 |
27 Sep 07 |
nicklas |
243 |
</tr> |
3793 |
27 Sep 07 |
nicklas |
244 |
</table> |
5941 |
01 Feb 12 |
nicklas |
245 |
</div> |
3793 |
27 Sep 07 |
nicklas |
246 |
|
3800 |
28 Sep 07 |
nicklas |
247 |
<% |
3800 |
28 Sep 07 |
nicklas |
248 |
ItemQuery<PlatformFileType> fileTypeQuery = platform.getFileTypes(null, false); |
3890 |
30 Oct 07 |
nicklas |
249 |
fileTypeQuery.include(Include.ALL); |
3800 |
28 Sep 07 |
nicklas |
250 |
fileTypeQuery.join(Hql.leftJoin("variant", "var")); |
3800 |
28 Sep 07 |
nicklas |
251 |
fileTypeQuery.order(Orders.asc(Hql.property("var", "name"))); |
3800 |
28 Sep 07 |
nicklas |
252 |
fileTypeQuery.order(Orders.asc(Hql.property("dataFileType.name"))); |
3800 |
28 Sep 07 |
nicklas |
253 |
ItemResultList<PlatformFileType> fileTypes = fileTypeQuery.list(dc); |
5941 |
01 Feb 12 |
nicklas |
254 |
%> |
5941 |
01 Feb 12 |
nicklas |
255 |
<base:section |
5941 |
01 Feb 12 |
nicklas |
256 |
id="dataFileTypes" |
5941 |
01 Feb 12 |
nicklas |
257 |
title="<%="Data file types (" + fileTypes.size() + ")"%>" |
5941 |
01 Feb 12 |
nicklas |
258 |
context="<%=cc%>" |
5941 |
01 Feb 12 |
nicklas |
259 |
> |
3800 |
28 Sep 07 |
nicklas |
260 |
<% |
5941 |
01 Feb 12 |
nicklas |
261 |
if (fileTypes.size() == 0) |
5941 |
01 Feb 12 |
nicklas |
262 |
{ |
5941 |
01 Feb 12 |
nicklas |
263 |
%> |
5941 |
01 Feb 12 |
nicklas |
264 |
<div class="messagecontainer note"> |
5941 |
01 Feb 12 |
nicklas |
265 |
This platform has no associated data file types (or, you don't have permission to view them). |
5941 |
01 Feb 12 |
nicklas |
266 |
</div> |
5941 |
01 Feb 12 |
nicklas |
267 |
<% |
5941 |
01 Feb 12 |
nicklas |
268 |
} |
5941 |
01 Feb 12 |
nicklas |
269 |
else |
5941 |
01 Feb 12 |
nicklas |
270 |
{ |
5941 |
01 Feb 12 |
nicklas |
271 |
%> |
5042 |
11 Aug 09 |
martin |
272 |
<tbl:table |
5042 |
11 Aug 09 |
martin |
273 |
id="fileTypes" |
5042 |
11 Aug 09 |
martin |
274 |
columns="all" |
5042 |
11 Aug 09 |
martin |
275 |
> |
5042 |
11 Aug 09 |
martin |
276 |
<tbl:columndef |
5042 |
11 Aug 09 |
martin |
277 |
id="name" |
5042 |
11 Aug 09 |
martin |
278 |
title="Name" |
5042 |
11 Aug 09 |
martin |
279 |
/> |
5042 |
11 Aug 09 |
martin |
280 |
<tbl:columndef |
5042 |
11 Aug 09 |
martin |
281 |
id="variant" |
5042 |
11 Aug 09 |
martin |
282 |
title="Variant" |
5042 |
11 Aug 09 |
martin |
283 |
/> |
5042 |
11 Aug 09 |
martin |
284 |
<tbl:columndef |
5042 |
11 Aug 09 |
martin |
285 |
id="required" |
5042 |
11 Aug 09 |
martin |
286 |
title="Required" |
5042 |
11 Aug 09 |
martin |
287 |
/> |
5042 |
11 Aug 09 |
martin |
288 |
<tbl:columndef |
5713 |
02 Sep 11 |
nicklas |
289 |
id="multiple" |
5713 |
02 Sep 11 |
nicklas |
290 |
title="Multiple files" |
5713 |
02 Sep 11 |
nicklas |
291 |
/> |
5713 |
02 Sep 11 |
nicklas |
292 |
<tbl:columndef |
5042 |
11 Aug 09 |
martin |
293 |
id="genericType" |
5042 |
11 Aug 09 |
martin |
294 |
title="Generic type" |
5042 |
11 Aug 09 |
martin |
295 |
/> |
5042 |
11 Aug 09 |
martin |
296 |
<tbl:columndef |
5042 |
11 Aug 09 |
martin |
297 |
id="description" |
5042 |
11 Aug 09 |
martin |
298 |
title="Description" |
5042 |
11 Aug 09 |
martin |
299 |
/> |
5042 |
11 Aug 09 |
martin |
300 |
<tbl:data> |
5941 |
01 Feb 12 |
nicklas |
301 |
<tbl:headers> |
5941 |
01 Feb 12 |
nicklas |
302 |
<tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
303 |
<tbl:columnheaders /> |
5941 |
01 Feb 12 |
nicklas |
304 |
</tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
305 |
</tbl:headers> |
5042 |
11 Aug 09 |
martin |
306 |
<tbl:rows> |
5042 |
11 Aug 09 |
martin |
307 |
<% |
5042 |
11 Aug 09 |
martin |
308 |
for (PlatformFileType fileType : fileTypes) |
5042 |
11 Aug 09 |
martin |
309 |
{ |
5042 |
11 Aug 09 |
martin |
310 |
DataFileType dft = fileType.getDataFileType(); |
5042 |
11 Aug 09 |
martin |
311 |
PlatformVariant variant = fileType.getVariant(); |
5042 |
11 Aug 09 |
martin |
312 |
%> |
5042 |
11 Aug 09 |
martin |
313 |
<tbl:row> |
5042 |
11 Aug 09 |
martin |
314 |
<tbl:cell column="variant"><base:icon |
5946 |
03 Feb 12 |
nicklas |
315 |
image="deleted.png" |
5042 |
11 Aug 09 |
martin |
316 |
tooltip="This item has been scheduled for deletion" |
5042 |
11 Aug 09 |
martin |
317 |
visible="<%=variant != null && variant.isRemoved()%>" |
5042 |
11 Aug 09 |
martin |
318 |
/><%=variant == null ? "<i>- all -</i>" : Base.getLinkedName(ID, variant, false, true)%></tbl:cell> |
5042 |
11 Aug 09 |
martin |
319 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
320 |
image="deleted.png" |
5042 |
11 Aug 09 |
martin |
321 |
tooltip="This item has been scheduled for deletion" |
5042 |
11 Aug 09 |
martin |
322 |
visible="<%=dft != null && dft.isRemoved()%>" |
5042 |
11 Aug 09 |
martin |
323 |
/><%=Base.getLinkedName(ID, dft, false, true)%></tbl:cell> |
5042 |
11 Aug 09 |
martin |
324 |
<tbl:cell column="required"><%=fileType.isRequired() ? "yes" : "no"%></tbl:cell> |
5713 |
02 Sep 11 |
nicklas |
325 |
<tbl:cell column="multiple"><%=fileType.getAllowMultiple() ? "yes" : "no"%></tbl:cell> |
5042 |
11 Aug 09 |
martin |
326 |
<tbl:cell column="genericType"><base:propertyvalue item="<%=dft%>" property="genericType" /></tbl:cell> |
5042 |
11 Aug 09 |
martin |
327 |
<tbl:cell column="description"><%=HTML.niceFormat(dft.getDescription())%></tbl:cell> |
5042 |
11 Aug 09 |
martin |
328 |
</tbl:row> |
5042 |
11 Aug 09 |
martin |
329 |
<% |
5042 |
11 Aug 09 |
martin |
330 |
} |
3800 |
28 Sep 07 |
nicklas |
331 |
%> |
5042 |
11 Aug 09 |
martin |
332 |
</tbl:rows> |
5042 |
11 Aug 09 |
martin |
333 |
</tbl:data> |
5042 |
11 Aug 09 |
martin |
334 |
</tbl:table> |
5941 |
01 Feb 12 |
nicklas |
335 |
<% |
5941 |
01 Feb 12 |
nicklas |
336 |
} |
5941 |
01 Feb 12 |
nicklas |
337 |
%> |
5941 |
01 Feb 12 |
nicklas |
338 |
</base:section> |
5509 |
19 Nov 10 |
nicklas |
339 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5509 |
19 Nov 10 |
nicklas |
340 |
<jsp:param name="ID" value="<%=ID%>" /> |
5509 |
19 Nov 10 |
nicklas |
341 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5509 |
19 Nov 10 |
nicklas |
342 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5509 |
19 Nov 10 |
nicklas |
343 |
<jsp:param name="title" value="Other items related to this platform" /> |
5509 |
19 Nov 10 |
nicklas |
344 |
</jsp:include> |
5042 |
11 Aug 09 |
martin |
345 |
</t:tab> |
5042 |
11 Aug 09 |
martin |
346 |
<t:tab id="variants" title="Variants" |
5042 |
11 Aug 09 |
martin |
347 |
tooltip="View and manage variants of this platform" /> |
5042 |
11 Aug 09 |
martin |
348 |
</t:tabcontrol> |
3793 |
27 Sep 07 |
nicklas |
349 |
</base:body> |
3793 |
27 Sep 07 |
nicklas |
350 |
</base:page> |
3793 |
27 Sep 07 |
nicklas |
351 |
<% |
3793 |
27 Sep 07 |
nicklas |
352 |
} |
3793 |
27 Sep 07 |
nicklas |
353 |
finally |
3793 |
27 Sep 07 |
nicklas |
354 |
{ |
3793 |
27 Sep 07 |
nicklas |
355 |
if (dc != null) dc.close(); |
3793 |
27 Sep 07 |
nicklas |
356 |
} |
3793 |
27 Sep 07 |
nicklas |
357 |
|
3793 |
27 Sep 07 |
nicklas |
358 |
%> |