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