2305 |
22 May 06 |
jari |
1 |
<%-- $Id$ |
2305 |
22 May 06 |
jari |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Johan Enell |
2305 |
22 May 06 |
jari |
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/ |
2305 |
22 May 06 |
jari |
8 |
|
2305 |
22 May 06 |
jari |
9 |
BASE is free software; you can redistribute it and/or |
2305 |
22 May 06 |
jari |
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 |
2305 |
22 May 06 |
jari |
12 |
of the License, or (at your option) any later version. |
2305 |
22 May 06 |
jari |
13 |
|
2305 |
22 May 06 |
jari |
14 |
BASE is distributed in the hope that it will be useful, |
2305 |
22 May 06 |
jari |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2305 |
22 May 06 |
jari |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2305 |
22 May 06 |
jari |
17 |
GNU General Public License for more details. |
2305 |
22 May 06 |
jari |
18 |
|
2305 |
22 May 06 |
jari |
19 |
You should have received a copy of the GNU General Public License |
4511 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2305 |
22 May 06 |
jari |
21 |
------------------------------------------------------------------ |
2305 |
22 May 06 |
jari |
22 |
|
2305 |
22 May 06 |
jari |
23 |
@author Nicklas |
2305 |
22 May 06 |
jari |
24 |
@version 2.0 |
2305 |
22 May 06 |
jari |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
2305 |
22 May 06 |
jari |
27 |
import="net.sf.basedb.core.SessionControl" |
2305 |
22 May 06 |
jari |
28 |
import="net.sf.basedb.core.DbControl" |
2305 |
22 May 06 |
jari |
29 |
import="net.sf.basedb.core.Item" |
2305 |
22 May 06 |
jari |
30 |
import="net.sf.basedb.core.PlateGeometry" |
2446 |
29 Jun 06 |
nicklas |
31 |
import="net.sf.basedb.core.PlateType" |
2305 |
22 May 06 |
jari |
32 |
import="net.sf.basedb.core.ItemQuery" |
2305 |
22 May 06 |
jari |
33 |
import="net.sf.basedb.core.Include" |
2446 |
29 Jun 06 |
nicklas |
34 |
import="net.sf.basedb.core.Type" |
2305 |
22 May 06 |
jari |
35 |
import="net.sf.basedb.core.ItemResultIterator" |
2305 |
22 May 06 |
jari |
36 |
import="net.sf.basedb.core.ItemResultList" |
2305 |
22 May 06 |
jari |
37 |
import="net.sf.basedb.core.ItemContext" |
2305 |
22 May 06 |
jari |
38 |
import="net.sf.basedb.core.Permission" |
2305 |
22 May 06 |
jari |
39 |
import="net.sf.basedb.core.PluginDefinition" |
2305 |
22 May 06 |
jari |
40 |
import="net.sf.basedb.core.query.Hql" |
2305 |
22 May 06 |
jari |
41 |
import="net.sf.basedb.core.query.Restrictions" |
2305 |
22 May 06 |
jari |
42 |
import="net.sf.basedb.core.query.Expressions" |
2446 |
29 Jun 06 |
nicklas |
43 |
import="net.sf.basedb.core.query.Orders" |
2305 |
22 May 06 |
jari |
44 |
import="net.sf.basedb.core.plugin.GuiContext" |
2305 |
22 May 06 |
jari |
45 |
import="net.sf.basedb.core.plugin.Plugin" |
2305 |
22 May 06 |
jari |
46 |
import="net.sf.basedb.util.Enumeration" |
2305 |
22 May 06 |
jari |
47 |
import="net.sf.basedb.clients.web.Base" |
2305 |
22 May 06 |
jari |
48 |
import="net.sf.basedb.clients.web.ModeInfo" |
2401 |
21 Jun 06 |
martin |
49 |
import="net.sf.basedb.clients.web.PermissionUtil" |
2305 |
22 May 06 |
jari |
50 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
51 |
import="net.sf.basedb.util.Values" |
4698 |
10 Dec 08 |
nicklas |
52 |
import="net.sf.basedb.util.formatter.Formatter" |
4698 |
10 Dec 08 |
nicklas |
53 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4884 |
03 Apr 09 |
nicklas |
54 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4884 |
03 Apr 09 |
nicklas |
55 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4884 |
03 Apr 09 |
nicklas |
56 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
57 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4884 |
03 Apr 09 |
nicklas |
58 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
7604 |
25 Feb 19 |
nicklas |
59 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnAction" |
6039 |
29 Mar 12 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnUtil" |
4884 |
03 Apr 09 |
nicklas |
61 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
4698 |
10 Dec 08 |
nicklas |
62 |
import="java.util.Date" |
2305 |
22 May 06 |
jari |
63 |
import="java.util.List" |
2305 |
22 May 06 |
jari |
64 |
import="java.util.Map" |
2305 |
22 May 06 |
jari |
65 |
%> |
2305 |
22 May 06 |
jari |
66 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2305 |
22 May 06 |
jari |
67 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
4884 |
03 Apr 09 |
nicklas |
68 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
2305 |
22 May 06 |
jari |
69 |
<%! |
2305 |
22 May 06 |
jari |
70 |
private static final Item itemType = Item.PLATEGEOMETRY; |
2305 |
22 May 06 |
jari |
71 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST); |
2305 |
22 May 06 |
jari |
72 |
%> |
2305 |
22 May 06 |
jari |
73 |
<% |
2305 |
22 May 06 |
jari |
74 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType); |
2305 |
22 May 06 |
jari |
75 |
final String ID = sc.getId(); |
2305 |
22 May 06 |
jari |
76 |
final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType); |
4003 |
26 Nov 07 |
nicklas |
77 |
final boolean deletePermission = sc.hasPermission(Permission.DELETE, itemType); |
2305 |
22 May 06 |
jari |
78 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
2305 |
22 May 06 |
jari |
79 |
|
2305 |
22 May 06 |
jari |
80 |
final ModeInfo mode = ModeInfo.get(request.getParameter("mode")); |
2305 |
22 May 06 |
jari |
81 |
final String callback = request.getParameter("callback"); |
2305 |
22 May 06 |
jari |
82 |
final String title = mode.generateTitle("plate geometry", "plate geometries"); |
7954 |
12 May 21 |
nicklas |
83 |
final DbControl dc = sc.newDbControl(":List "+itemType); |
2305 |
22 May 06 |
jari |
84 |
ItemResultIterator<PlateGeometry> geometries = null; |
2305 |
22 May 06 |
jari |
85 |
try |
2305 |
22 May 06 |
jari |
86 |
{ |
4698 |
10 Dec 08 |
nicklas |
87 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
2446 |
29 Jun 06 |
nicklas |
88 |
// Query for plate types relatated to the current geometry |
2446 |
29 Jun 06 |
nicklas |
89 |
final ItemQuery<PlateType> plateTypeQuery = PlateType.getQuery(); |
2446 |
29 Jun 06 |
nicklas |
90 |
plateTypeQuery.include(cc.getInclude()); |
2446 |
29 Jun 06 |
nicklas |
91 |
plateTypeQuery.include(Include.MINE, Include.SHARED, Include.IN_PROJECT, Include.OTHERS); |
2446 |
29 Jun 06 |
nicklas |
92 |
plateTypeQuery.restrict(Restrictions.eq(Hql.property("plateGeometry"), Expressions.parameter("geometry"))); |
2446 |
29 Jun 06 |
nicklas |
93 |
plateTypeQuery.order(Orders.asc(Hql.property("name"))); |
2446 |
29 Jun 06 |
nicklas |
94 |
final boolean createPlateTypePermission = sc.hasPermission(Permission.CREATE, Item.PLATETYPE); |
2305 |
22 May 06 |
jari |
95 |
|
2305 |
22 May 06 |
jari |
96 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
7914 |
23 Feb 21 |
nicklas |
97 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null); |
2305 |
22 May 06 |
jari |
98 |
try |
2305 |
22 May 06 |
jari |
99 |
{ |
7914 |
23 Feb 21 |
nicklas |
100 |
final ItemQuery<PlateGeometry> query = Base.getConfiguredQuery(dc, cc, jspContext, true, PlateGeometry.getQuery(), mode); |
2305 |
22 May 06 |
jari |
101 |
geometries = query.iterate(dc); |
2305 |
22 May 06 |
jari |
102 |
} |
2305 |
22 May 06 |
jari |
103 |
catch (Throwable t) |
2305 |
22 May 06 |
jari |
104 |
{ |
2305 |
22 May 06 |
jari |
105 |
cc.setMessage(t.getMessage()); |
2305 |
22 May 06 |
jari |
106 |
} |
2305 |
22 May 06 |
jari |
107 |
int numListed = 0; |
7604 |
25 Feb 19 |
nicklas |
108 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
7604 |
25 Feb 19 |
nicklas |
109 |
ExtensionsInvoker<ListColumnAction<PlateGeometry,?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext); |
2305 |
22 May 06 |
jari |
110 |
%> |
6306 |
13 Aug 13 |
nicklas |
111 |
<base:page title="<%=title==null ? "Plate geometries" : title%>" type="<%=mode.getPageType()%>" id="list-page"> |
6306 |
13 Aug 13 |
nicklas |
112 |
<base:head scripts="table.js,~geometries.js" styles="table.css,toolbar.css"> |
4884 |
03 Apr 09 |
nicklas |
113 |
<ext:scripts context="<%=jspContext%>" /> |
4884 |
03 Apr 09 |
nicklas |
114 |
<ext:stylesheets context="<%=jspContext%>" /> |
2305 |
22 May 06 |
jari |
115 |
</base:head> |
2305 |
22 May 06 |
jari |
116 |
|
2305 |
22 May 06 |
jari |
117 |
<base:body> |
5954 |
13 Feb 12 |
nicklas |
118 |
<h1><%=title==null ? "Plate geometries" : title%></h1> |
5954 |
13 Feb 12 |
nicklas |
119 |
<div class="content"> |
2305 |
22 May 06 |
jari |
120 |
<tbl:table |
2305 |
22 May 06 |
jari |
121 |
id="geometries" |
2305 |
22 May 06 |
jari |
122 |
columns="<%=cc.getSetting("columns")%>" |
2305 |
22 May 06 |
jari |
123 |
sortby="<%=cc.getSortProperty()%>" |
2305 |
22 May 06 |
jari |
124 |
direction="<%=cc.getSortDirection()%>" |
2305 |
22 May 06 |
jari |
125 |
action="index.jsp" |
2305 |
22 May 06 |
jari |
126 |
sc="<%=sc%>" |
2305 |
22 May 06 |
jari |
127 |
item="<%=itemType%>" |
6702 |
02 Feb 15 |
nicklas |
128 |
filterrows="<%=cc.getFilterRows()%>" |
5954 |
13 Feb 12 |
nicklas |
129 |
subclass="fulltable" |
7982 |
14 Jun 21 |
nicklas |
130 |
stickyheaders="<%=cc.getSetting("columns.sticky", "name")%>" |
2305 |
22 May 06 |
jari |
131 |
> |
2305 |
22 May 06 |
jari |
132 |
<tbl:hidden |
2305 |
22 May 06 |
jari |
133 |
name="mode" |
2305 |
22 May 06 |
jari |
134 |
value="<%=mode.getName()%>" |
2305 |
22 May 06 |
jari |
135 |
/> |
2305 |
22 May 06 |
jari |
136 |
<tbl:hidden |
2305 |
22 May 06 |
jari |
137 |
name="callback" |
2305 |
22 May 06 |
jari |
138 |
value="<%=callback%>" |
2305 |
22 May 06 |
jari |
139 |
skip="<%=callback == null%>" |
2305 |
22 May 06 |
jari |
140 |
/> |
2305 |
22 May 06 |
jari |
141 |
<tbl:columndef |
2305 |
22 May 06 |
jari |
142 |
id="name" |
2305 |
22 May 06 |
jari |
143 |
property="name" |
2305 |
22 May 06 |
jari |
144 |
datatype="string" |
2305 |
22 May 06 |
jari |
145 |
title="Name" |
2305 |
22 May 06 |
jari |
146 |
sortable="true" |
2305 |
22 May 06 |
jari |
147 |
filterable="true" |
2305 |
22 May 06 |
jari |
148 |
exportable="true" |
2305 |
22 May 06 |
jari |
149 |
show="always" |
2305 |
22 May 06 |
jari |
150 |
/> |
2305 |
22 May 06 |
jari |
151 |
<tbl:columndef |
4332 |
12 Jun 08 |
martin |
152 |
id="id" |
4387 |
11 Aug 08 |
nicklas |
153 |
clazz="uniquecol" |
4332 |
12 Jun 08 |
martin |
154 |
property="id" |
4332 |
12 Jun 08 |
martin |
155 |
datatype="int" |
4332 |
12 Jun 08 |
martin |
156 |
title="ID" |
4332 |
12 Jun 08 |
martin |
157 |
sortable="true" |
4332 |
12 Jun 08 |
martin |
158 |
filterable="true" |
4332 |
12 Jun 08 |
martin |
159 |
exportable="true" |
4332 |
12 Jun 08 |
martin |
160 |
/> |
4332 |
12 Jun 08 |
martin |
161 |
<tbl:columndef |
4698 |
10 Dec 08 |
nicklas |
162 |
id="entryDate" |
4698 |
10 Dec 08 |
nicklas |
163 |
property="entryDate" |
4698 |
10 Dec 08 |
nicklas |
164 |
datatype="date" |
4698 |
10 Dec 08 |
nicklas |
165 |
title="Registered" |
4698 |
10 Dec 08 |
nicklas |
166 |
sortable="true" |
4698 |
10 Dec 08 |
nicklas |
167 |
filterable="true" |
4698 |
10 Dec 08 |
nicklas |
168 |
exportable="true" |
4698 |
10 Dec 08 |
nicklas |
169 |
formatter="<%=dateFormatter%>" |
4698 |
10 Dec 08 |
nicklas |
170 |
/> |
4698 |
10 Dec 08 |
nicklas |
171 |
<tbl:columndef |
2305 |
22 May 06 |
jari |
172 |
id="rows" |
2305 |
22 May 06 |
jari |
173 |
property="rows" |
2305 |
22 May 06 |
jari |
174 |
datatype="int" |
2305 |
22 May 06 |
jari |
175 |
title="Rows" |
2305 |
22 May 06 |
jari |
176 |
sortable="true" |
2305 |
22 May 06 |
jari |
177 |
filterable="true" |
2305 |
22 May 06 |
jari |
178 |
exportable="true" |
2305 |
22 May 06 |
jari |
179 |
/> |
2305 |
22 May 06 |
jari |
180 |
<tbl:columndef |
2305 |
22 May 06 |
jari |
181 |
id="columns" |
2305 |
22 May 06 |
jari |
182 |
property="columns" |
2305 |
22 May 06 |
jari |
183 |
datatype="int" |
2305 |
22 May 06 |
jari |
184 |
title="Columns" |
2305 |
22 May 06 |
jari |
185 |
sortable="true" |
2305 |
22 May 06 |
jari |
186 |
filterable="true" |
2305 |
22 May 06 |
jari |
187 |
exportable="true" |
2305 |
22 May 06 |
jari |
188 |
/> |
2446 |
29 Jun 06 |
nicklas |
189 |
<tbl:columndef |
2446 |
29 Jun 06 |
nicklas |
190 |
id="plateTypes" |
2446 |
29 Jun 06 |
nicklas |
191 |
title="Plate types" |
4610 |
28 Oct 08 |
nicklas |
192 |
property="&plateTypes(name)" |
4610 |
28 Oct 08 |
nicklas |
193 |
datatype="string" |
4610 |
28 Oct 08 |
nicklas |
194 |
filterable="true" |
4901 |
23 Apr 09 |
martin |
195 |
exportable="true" |
2446 |
29 Jun 06 |
nicklas |
196 |
/> |
2305 |
22 May 06 |
jari |
197 |
<tbl:columndef |
2305 |
22 May 06 |
jari |
198 |
id="description" |
2305 |
22 May 06 |
jari |
199 |
property="description" |
2305 |
22 May 06 |
jari |
200 |
datatype="string" |
2305 |
22 May 06 |
jari |
201 |
title="Description" |
2305 |
22 May 06 |
jari |
202 |
sortable="true" |
2305 |
22 May 06 |
jari |
203 |
filterable="true" |
2305 |
22 May 06 |
jari |
204 |
exportable="true" |
2305 |
22 May 06 |
jari |
205 |
/> |
6039 |
29 Mar 12 |
nicklas |
206 |
<tbl:columndef |
6039 |
29 Mar 12 |
nicklas |
207 |
id="xt-columns" |
6039 |
29 Mar 12 |
nicklas |
208 |
extensions="<%=columnsInvoker%>" |
6039 |
29 Mar 12 |
nicklas |
209 |
jspcontext="<%=jspContext%>" |
6039 |
29 Mar 12 |
nicklas |
210 |
/> |
6604 |
18 Nov 14 |
nicklas |
211 |
<div class="panelgroup bg-filled-50 bottomborder"> |
5954 |
13 Feb 12 |
nicklas |
212 |
<tbl:toolbar |
5954 |
13 Feb 12 |
nicklas |
213 |
subclass="bottomborder" |
5954 |
13 Feb 12 |
nicklas |
214 |
visible="<%=mode.hasToolbar()%>" |
5954 |
13 Feb 12 |
nicklas |
215 |
> |
5954 |
13 Feb 12 |
nicklas |
216 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
217 |
id="btnNewItem" |
5954 |
13 Feb 12 |
nicklas |
218 |
disabled="<%=!createPermission%>" |
5954 |
13 Feb 12 |
nicklas |
219 |
image="new.png" |
5954 |
13 Feb 12 |
nicklas |
220 |
title="New…" |
5954 |
13 Feb 12 |
nicklas |
221 |
tooltip="<%=createPermission ? "Create new plate geometry" : "You do not have permission to create plate geometries"%>" |
5954 |
13 Feb 12 |
nicklas |
222 |
/> |
5954 |
13 Feb 12 |
nicklas |
223 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
224 |
id="btnDeleteItems" |
5954 |
13 Feb 12 |
nicklas |
225 |
image="delete.png" |
5954 |
13 Feb 12 |
nicklas |
226 |
title="Delete" |
5954 |
13 Feb 12 |
nicklas |
227 |
tooltip="Delete the selected items" |
5954 |
13 Feb 12 |
nicklas |
228 |
/> |
5954 |
13 Feb 12 |
nicklas |
229 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
230 |
id="btnRestoreItems" |
5954 |
13 Feb 12 |
nicklas |
231 |
image="restore.png" |
5954 |
13 Feb 12 |
nicklas |
232 |
title="Restore" |
5954 |
13 Feb 12 |
nicklas |
233 |
tooltip="Restore the selected (deleted) items" |
5954 |
13 Feb 12 |
nicklas |
234 |
/> |
5954 |
13 Feb 12 |
nicklas |
235 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
236 |
id="btnColumns" |
5954 |
13 Feb 12 |
nicklas |
237 |
image="columns.png" |
5954 |
13 Feb 12 |
nicklas |
238 |
title="Columns…" |
5954 |
13 Feb 12 |
nicklas |
239 |
tooltip="Show, hide and re-order columns" |
5954 |
13 Feb 12 |
nicklas |
240 |
/> |
5954 |
13 Feb 12 |
nicklas |
241 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
242 |
id="btnImport" |
6306 |
13 Aug 13 |
nicklas |
243 |
data-plugin-type="IMPORT" |
5954 |
13 Feb 12 |
nicklas |
244 |
image="import.png" |
5954 |
13 Feb 12 |
nicklas |
245 |
title="Import…" |
5954 |
13 Feb 12 |
nicklas |
246 |
tooltip="Import data" |
5954 |
13 Feb 12 |
nicklas |
247 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5954 |
13 Feb 12 |
nicklas |
248 |
/> |
5954 |
13 Feb 12 |
nicklas |
249 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
250 |
id="btnExport" |
6306 |
13 Aug 13 |
nicklas |
251 |
data-plugin-type="EXPORT" |
5954 |
13 Feb 12 |
nicklas |
252 |
image="export.png" |
5954 |
13 Feb 12 |
nicklas |
253 |
title="Export…" |
5954 |
13 Feb 12 |
nicklas |
254 |
tooltip="Export data" |
5954 |
13 Feb 12 |
nicklas |
255 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5954 |
13 Feb 12 |
nicklas |
256 |
/> |
5954 |
13 Feb 12 |
nicklas |
257 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
258 |
id="btnRunPlugin" |
6306 |
13 Aug 13 |
nicklas |
259 |
data-plugin-type="OTHER" |
5954 |
13 Feb 12 |
nicklas |
260 |
image="runplugin.png" |
5954 |
13 Feb 12 |
nicklas |
261 |
title="Run plugin…" |
5954 |
13 Feb 12 |
nicklas |
262 |
tooltip="Run a plugin" |
5954 |
13 Feb 12 |
nicklas |
263 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5954 |
13 Feb 12 |
nicklas |
264 |
/> |
5954 |
13 Feb 12 |
nicklas |
265 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
266 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5954 |
13 Feb 12 |
nicklas |
267 |
</tbl:toolbar> |
5954 |
13 Feb 12 |
nicklas |
268 |
<tbl:panel> |
6182 |
23 Oct 12 |
nicklas |
269 |
<tbl:presetselector /> |
5954 |
13 Feb 12 |
nicklas |
270 |
<tbl:navigator |
5954 |
13 Feb 12 |
nicklas |
271 |
page="<%=cc.getPage()%>" |
5954 |
13 Feb 12 |
nicklas |
272 |
rowsperpage="<%=cc.getRowsPerPage()%>" |
5954 |
13 Feb 12 |
nicklas |
273 |
totalrows="<%=geometries == null ? 0 : geometries.getTotalCount()%>" |
5954 |
13 Feb 12 |
nicklas |
274 |
visible="<%=mode.hasNavigator()%>" |
5954 |
13 Feb 12 |
nicklas |
275 |
/> |
5954 |
13 Feb 12 |
nicklas |
276 |
</tbl:panel> |
5954 |
13 Feb 12 |
nicklas |
277 |
</div> |
2305 |
22 May 06 |
jari |
278 |
<tbl:data> |
5948 |
08 Feb 12 |
nicklas |
279 |
<tbl:headers> |
5948 |
08 Feb 12 |
nicklas |
280 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
281 |
<tbl:header clazz="row-index bg-filled-100" /> |
5948 |
08 Feb 12 |
nicklas |
282 |
<tbl:columnheaders /> |
5948 |
08 Feb 12 |
nicklas |
283 |
</tbl:headerrow> |
6702 |
02 Feb 15 |
nicklas |
284 |
<% |
6702 |
02 Feb 15 |
nicklas |
285 |
int numFilters = cc.getNumPropertyFilters(); |
6702 |
02 Feb 15 |
nicklas |
286 |
int numRows = cc.getFilterRows(); |
6702 |
02 Feb 15 |
nicklas |
287 |
for (int filterNo = 0; filterNo < numRows; filterNo++) |
6702 |
02 Feb 15 |
nicklas |
288 |
{ |
6702 |
02 Feb 15 |
nicklas |
289 |
boolean lastRow = filterNo == numRows-1; |
6702 |
02 Feb 15 |
nicklas |
290 |
%> |
6702 |
02 Feb 15 |
nicklas |
291 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
292 |
<tbl:header subclass="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
293 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
294 |
<div class="index"></div> |
7943 |
04 May 21 |
nicklas |
295 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
296 |
<base:icon |
7943 |
04 May 21 |
nicklas |
297 |
subclass="link table-check" |
7943 |
04 May 21 |
nicklas |
298 |
image="check_uncheck.png" |
7943 |
04 May 21 |
nicklas |
299 |
tooltip="Toggle all (use CTRL, ALT or SHIFT to check/uncheck)" |
7943 |
04 May 21 |
nicklas |
300 |
visible="<%=lastRow && mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
301 |
/> |
7943 |
04 May 21 |
nicklas |
302 |
</div> |
7943 |
04 May 21 |
nicklas |
303 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
304 |
<base:icon |
7943 |
04 May 21 |
nicklas |
305 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
306 |
image="add.png" |
7943 |
04 May 21 |
nicklas |
307 |
tooltip="Add extra filter row" |
7943 |
04 May 21 |
nicklas |
308 |
visible="<%=lastRow%>" |
7943 |
04 May 21 |
nicklas |
309 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
310 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
311 |
image="remove.png" |
7943 |
04 May 21 |
nicklas |
312 |
tooltip="Remove this filter row" |
7943 |
04 May 21 |
nicklas |
313 |
visible="<%=numRows > 1 || numFilters > 0 %>" |
7943 |
04 May 21 |
nicklas |
314 |
data-remove-row="<%=filterNo%>" |
7943 |
04 May 21 |
nicklas |
315 |
/> |
7943 |
04 May 21 |
nicklas |
316 |
</div> |
7943 |
04 May 21 |
nicklas |
317 |
</div> |
6702 |
02 Feb 15 |
nicklas |
318 |
</tbl:header> |
6702 |
02 Feb 15 |
nicklas |
319 |
<tbl:propertyfilter row="<%=filterNo%>" /> |
6702 |
02 Feb 15 |
nicklas |
320 |
</tbl:headerrow> |
6702 |
02 Feb 15 |
nicklas |
321 |
<% |
6702 |
02 Feb 15 |
nicklas |
322 |
} |
6702 |
02 Feb 15 |
nicklas |
323 |
%> |
7913 |
22 Feb 21 |
nicklas |
324 |
<tbl:columnsubtitles /> |
5948 |
08 Feb 12 |
nicklas |
325 |
</tbl:headers> |
5948 |
08 Feb 12 |
nicklas |
326 |
<tbl:rows> |
2305 |
22 May 06 |
jari |
327 |
<% |
5954 |
13 Feb 12 |
nicklas |
328 |
if (cc.getMessage() != null) |
5954 |
13 Feb 12 |
nicklas |
329 |
{ |
5954 |
13 Feb 12 |
nicklas |
330 |
%> |
6604 |
18 Nov 14 |
nicklas |
331 |
<tbl:panel subclass="bg-filled-50"> |
5954 |
13 Feb 12 |
nicklas |
332 |
<div class="messagecontainer error"><%=cc.getMessage()%></div> |
5954 |
13 Feb 12 |
nicklas |
333 |
</tbl:panel> |
5954 |
13 Feb 12 |
nicklas |
334 |
<% |
5954 |
13 Feb 12 |
nicklas |
335 |
cc.setMessage(null); |
5954 |
13 Feb 12 |
nicklas |
336 |
} |
2305 |
22 May 06 |
jari |
337 |
int index = cc.getPage()*cc.getRowsPerPage(); |
2305 |
22 May 06 |
jari |
338 |
int selectedItemId = cc.getId(); |
2305 |
22 May 06 |
jari |
339 |
if (geometries != null) |
2503 |
09 Aug 06 |
martin |
340 |
{ |
2305 |
22 May 06 |
jari |
341 |
while (geometries.hasNext()) |
2305 |
22 May 06 |
jari |
342 |
{ |
2305 |
22 May 06 |
jari |
343 |
PlateGeometry item = geometries.next(); |
2305 |
22 May 06 |
jari |
344 |
int itemId = item.getId(); |
2305 |
22 May 06 |
jari |
345 |
String name = HTML.encodeTags(item.getName()); |
2446 |
29 Jun 06 |
nicklas |
346 |
boolean usePermission = item.hasPermission(Permission.USE); |
2503 |
09 Aug 06 |
martin |
347 |
boolean writePermission = item.hasPermission(Permission.WRITE); |
6221 |
10 Jan 13 |
nicklas |
348 |
|
2503 |
09 Aug 06 |
martin |
349 |
String tooltip = mode.isSelectionMode() ? |
2503 |
09 Aug 06 |
martin |
350 |
"Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : ""); |
2305 |
22 May 06 |
jari |
351 |
index++; |
2305 |
22 May 06 |
jari |
352 |
numListed++; |
2305 |
22 May 06 |
jari |
353 |
%> |
2305 |
22 May 06 |
jari |
354 |
<tbl:row> |
7943 |
04 May 21 |
nicklas |
355 |
<tbl:header clazz="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
356 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
357 |
<div class="index <%=index>999?"index-smaller":""%>"><%=index%></div> |
7943 |
04 May 21 |
nicklas |
358 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
359 |
<base:input |
7943 |
04 May 21 |
nicklas |
360 |
type="checkbox" |
7943 |
04 May 21 |
nicklas |
361 |
name="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
362 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
363 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
364 |
checked="<%=cc.getSelected().contains(itemId)%>" |
7943 |
04 May 21 |
nicklas |
365 |
visible="<%=mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
366 |
/> |
7943 |
04 May 21 |
nicklas |
367 |
<base:input |
7943 |
04 May 21 |
nicklas |
368 |
type="radio" |
7943 |
04 May 21 |
nicklas |
369 |
name="item_id" |
7943 |
04 May 21 |
nicklas |
370 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
371 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
372 |
checked="<%=selectedItemId == itemId%>" |
7943 |
04 May 21 |
nicklas |
373 |
visible="<%=mode.hasRadio()%>" |
7943 |
04 May 21 |
nicklas |
374 |
/> |
7943 |
04 May 21 |
nicklas |
375 |
</div> |
7943 |
04 May 21 |
nicklas |
376 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
377 |
<base:icon |
7943 |
04 May 21 |
nicklas |
378 |
image="deleted.png" |
7943 |
04 May 21 |
nicklas |
379 |
id="<%="delete."+itemId %>" |
7943 |
04 May 21 |
nicklas |
380 |
subclass="<%=deletePermission ? "table-delete-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
381 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
382 |
tooltip="This item has been scheduled for deletion" |
7943 |
04 May 21 |
nicklas |
383 |
visible="<%=item.isRemoved()%>" |
7943 |
04 May 21 |
nicklas |
384 |
/> |
7943 |
04 May 21 |
nicklas |
385 |
</div> |
7943 |
04 May 21 |
nicklas |
386 |
</div> |
7943 |
04 May 21 |
nicklas |
387 |
</tbl:header> |
6306 |
13 Aug 13 |
nicklas |
388 |
<tbl:cell column="name"><div |
6306 |
13 Aug 13 |
nicklas |
389 |
class="link table-item" |
6306 |
13 Aug 13 |
nicklas |
390 |
data-item-id="<%=itemId%>" |
6306 |
13 Aug 13 |
nicklas |
391 |
data-no-edit="<%=writePermission ? 0 : 1 %>" |
6306 |
13 Aug 13 |
nicklas |
392 |
tabindex="0" |
2446 |
29 Jun 06 |
nicklas |
393 |
title="<%=tooltip%>"><%=name%></div></tbl:cell> |
4332 |
12 Jun 08 |
martin |
394 |
<tbl:cell column="id"><%=item.getId()%></tbl:cell> |
4698 |
10 Dec 08 |
nicklas |
395 |
<tbl:cell column="entryDate" value="<%=item.getEntryDate()%>" /> |
2305 |
22 May 06 |
jari |
396 |
<tbl:cell column="rows"><%=item.getRows()%></tbl:cell> |
2305 |
22 May 06 |
jari |
397 |
<tbl:cell column="columns"><%=item.getColumns()%></tbl:cell> |
2446 |
29 Jun 06 |
nicklas |
398 |
<tbl:cell column="plateTypes"> |
2446 |
29 Jun 06 |
nicklas |
399 |
<% |
2446 |
29 Jun 06 |
nicklas |
400 |
plateTypeQuery.setParameter("geometry", itemId, Type.INT); |
2446 |
29 Jun 06 |
nicklas |
401 |
try |
2446 |
29 Jun 06 |
nicklas |
402 |
{ |
2446 |
29 Jun 06 |
nicklas |
403 |
String separator = ""; |
2446 |
29 Jun 06 |
nicklas |
404 |
for (PlateType p : plateTypeQuery.list(dc)) |
2446 |
29 Jun 06 |
nicklas |
405 |
{ |
2446 |
29 Jun 06 |
nicklas |
406 |
out.write(separator); |
2446 |
29 Jun 06 |
nicklas |
407 |
if (mode.hasPropertyLink()) |
2446 |
29 Jun 06 |
nicklas |
408 |
{ |
2446 |
29 Jun 06 |
nicklas |
409 |
out.write(Base.getLinkedName(ID, p, false, mode.hasEditLink())); |
2446 |
29 Jun 06 |
nicklas |
410 |
} |
2446 |
29 Jun 06 |
nicklas |
411 |
else |
2446 |
29 Jun 06 |
nicklas |
412 |
{ |
2446 |
29 Jun 06 |
nicklas |
413 |
out.write(HTML.encodeTags(p.getName())); |
2446 |
29 Jun 06 |
nicklas |
414 |
} |
2446 |
29 Jun 06 |
nicklas |
415 |
separator = ", "; |
2446 |
29 Jun 06 |
nicklas |
416 |
} |
2446 |
29 Jun 06 |
nicklas |
417 |
} |
2446 |
29 Jun 06 |
nicklas |
418 |
catch (Throwable t) |
2446 |
29 Jun 06 |
nicklas |
419 |
{ |
2446 |
29 Jun 06 |
nicklas |
420 |
%> |
2446 |
29 Jun 06 |
nicklas |
421 |
<div class="error"><%=t.getMessage()%></div> |
2446 |
29 Jun 06 |
nicklas |
422 |
<% |
2446 |
29 Jun 06 |
nicklas |
423 |
} |
2446 |
29 Jun 06 |
nicklas |
424 |
%> |
2446 |
29 Jun 06 |
nicklas |
425 |
<base:icon |
6306 |
13 Aug 13 |
nicklas |
426 |
id="<%="newplatetype."+itemId%>" |
2446 |
29 Jun 06 |
nicklas |
427 |
image="add.png" |
6306 |
13 Aug 13 |
nicklas |
428 |
subclass="auto-init" |
6306 |
13 Aug 13 |
nicklas |
429 |
data-auto-init="new-plate-type" |
6306 |
13 Aug 13 |
nicklas |
430 |
data-item-id="<%=itemId %>" |
2446 |
29 Jun 06 |
nicklas |
431 |
tooltip="Create new plate type" |
2446 |
29 Jun 06 |
nicklas |
432 |
visible="<%=mode.hasEditLink() && createPlateTypePermission && usePermission %>" |
2446 |
29 Jun 06 |
nicklas |
433 |
/> |
2446 |
29 Jun 06 |
nicklas |
434 |
</tbl:cell> |
2305 |
22 May 06 |
jari |
435 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
6039 |
29 Mar 12 |
nicklas |
436 |
<tbl:xt-cells dc="<%=dc%>" item="<%=item%>"> |
6039 |
29 Mar 12 |
nicklas |
437 |
<tbl:cell column="xt-columns" /> |
6039 |
29 Mar 12 |
nicklas |
438 |
</tbl:xt-cells> |
2305 |
22 May 06 |
jari |
439 |
</tbl:row> |
2305 |
22 May 06 |
jari |
440 |
<% |
2305 |
22 May 06 |
jari |
441 |
} |
2305 |
22 May 06 |
jari |
442 |
} |
5954 |
13 Feb 12 |
nicklas |
443 |
if (numListed == 0) |
5954 |
13 Feb 12 |
nicklas |
444 |
{ |
5954 |
13 Feb 12 |
nicklas |
445 |
%> |
6604 |
18 Nov 14 |
nicklas |
446 |
<tbl:panel subclass="bg-filled-50"> |
5954 |
13 Feb 12 |
nicklas |
447 |
<div class="messagecontainer note"> |
5954 |
13 Feb 12 |
nicklas |
448 |
<%=geometries == null || geometries.getTotalCount() == 0 ? "No plate geometries were found" : "No plate geometries on this page. Please select another page!" %> |
5954 |
13 Feb 12 |
nicklas |
449 |
</div> |
5954 |
13 Feb 12 |
nicklas |
450 |
</tbl:panel> |
5954 |
13 Feb 12 |
nicklas |
451 |
<% |
5954 |
13 Feb 12 |
nicklas |
452 |
} |
2305 |
22 May 06 |
jari |
453 |
%> |
5954 |
13 Feb 12 |
nicklas |
454 |
</tbl:rows> |
2305 |
22 May 06 |
jari |
455 |
</tbl:data> |
2305 |
22 May 06 |
jari |
456 |
</tbl:table> |
5954 |
13 Feb 12 |
nicklas |
457 |
</div> |
5954 |
13 Feb 12 |
nicklas |
458 |
|
5951 |
09 Feb 12 |
nicklas |
459 |
<base:buttongroup subclass="dialogbuttons"> |
6306 |
13 Aug 13 |
nicklas |
460 |
<base:button id="btnOk" title="Ok" visible="<%=mode.hasOkButton()%>" /> |
6306 |
13 Aug 13 |
nicklas |
461 |
<base:button id="close" title="Cancel" visible="<%=mode.hasCancelButton()%>" /> |
6306 |
13 Aug 13 |
nicklas |
462 |
<base:button id="close" title="Close" visible="<%=mode.hasCloseButton()%>" /> |
2305 |
22 May 06 |
jari |
463 |
</base:buttongroup> |
5951 |
09 Feb 12 |
nicklas |
464 |
|
2305 |
22 May 06 |
jari |
465 |
</base:body> |
2305 |
22 May 06 |
jari |
466 |
</base:page> |
2305 |
22 May 06 |
jari |
467 |
<% |
2305 |
22 May 06 |
jari |
468 |
} |
2305 |
22 May 06 |
jari |
469 |
finally |
2305 |
22 May 06 |
jari |
470 |
{ |
2305 |
22 May 06 |
jari |
471 |
if (geometries != null) geometries.close(); |
2305 |
22 May 06 |
jari |
472 |
if (dc != null) dc.close(); |
2305 |
22 May 06 |
jari |
473 |
} |
3675 |
16 Aug 07 |
jari |
474 |
%> |