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.ItemContext" |
2305 |
22 May 06 |
jari |
31 |
import="net.sf.basedb.core.PlateType" |
2305 |
22 May 06 |
jari |
32 |
import="net.sf.basedb.core.PlateEventType" |
2305 |
22 May 06 |
jari |
33 |
import="net.sf.basedb.core.ItemQuery" |
2305 |
22 May 06 |
jari |
34 |
import="net.sf.basedb.core.ItemResultIterator" |
2305 |
22 May 06 |
jari |
35 |
import="net.sf.basedb.core.Permission" |
2305 |
22 May 06 |
jari |
36 |
import="net.sf.basedb.core.PluginDefinition" |
2305 |
22 May 06 |
jari |
37 |
import="net.sf.basedb.core.PermissionDeniedException" |
2305 |
22 May 06 |
jari |
38 |
import="net.sf.basedb.core.query.Restrictions" |
2305 |
22 May 06 |
jari |
39 |
import="net.sf.basedb.core.query.Expressions" |
2305 |
22 May 06 |
jari |
40 |
import="net.sf.basedb.core.query.Orders" |
2305 |
22 May 06 |
jari |
41 |
import="net.sf.basedb.core.query.Hql" |
2305 |
22 May 06 |
jari |
42 |
import="net.sf.basedb.core.plugin.GuiContext" |
2305 |
22 May 06 |
jari |
43 |
import="net.sf.basedb.core.plugin.Plugin" |
2305 |
22 May 06 |
jari |
44 |
import="net.sf.basedb.clients.web.Base" |
2305 |
22 May 06 |
jari |
45 |
import="net.sf.basedb.clients.web.ModeInfo" |
2401 |
21 Jun 06 |
martin |
46 |
import="net.sf.basedb.clients.web.PermissionUtil" |
2305 |
22 May 06 |
jari |
47 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
48 |
import="net.sf.basedb.util.Values" |
4884 |
03 Apr 09 |
nicklas |
49 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4884 |
03 Apr 09 |
nicklas |
50 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4884 |
03 Apr 09 |
nicklas |
51 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
52 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4884 |
03 Apr 09 |
nicklas |
53 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
7604 |
25 Feb 19 |
nicklas |
54 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnAction" |
6039 |
29 Mar 12 |
nicklas |
55 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnUtil" |
4884 |
03 Apr 09 |
nicklas |
56 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
2305 |
22 May 06 |
jari |
57 |
import="java.util.List" |
2305 |
22 May 06 |
jari |
58 |
import="java.util.Map" |
2305 |
22 May 06 |
jari |
59 |
%> |
2305 |
22 May 06 |
jari |
60 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
2305 |
22 May 06 |
jari |
61 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
2305 |
22 May 06 |
jari |
62 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
2305 |
22 May 06 |
jari |
63 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4884 |
03 Apr 09 |
nicklas |
64 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
2305 |
22 May 06 |
jari |
65 |
<%! |
2305 |
22 May 06 |
jari |
66 |
private static final Item itemType = Item.PLATEEVENTTYPE; |
2305 |
22 May 06 |
jari |
67 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST); |
2305 |
22 May 06 |
jari |
68 |
%> |
2305 |
22 May 06 |
jari |
69 |
<% |
2305 |
22 May 06 |
jari |
70 |
final int plateTypeId = Values.getInt(request.getParameter("platetype_id")); |
2305 |
22 May 06 |
jari |
71 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType); |
2305 |
22 May 06 |
jari |
72 |
final String ID = sc.getId(); |
2305 |
22 May 06 |
jari |
73 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
2305 |
22 May 06 |
jari |
74 |
|
2305 |
22 May 06 |
jari |
75 |
final ModeInfo mode = ModeInfo.get(request.getParameter("mode")); |
2305 |
22 May 06 |
jari |
76 |
final String callback = request.getParameter("callback"); |
2305 |
22 May 06 |
jari |
77 |
final String title = mode.generateTitle("event type", "event types"); |
7954 |
12 May 21 |
nicklas |
78 |
final DbControl dc = sc.newDbControl(":List "+itemType); |
2305 |
22 May 06 |
jari |
79 |
ItemResultIterator<PlateEventType> eventTypes = null; |
2305 |
22 May 06 |
jari |
80 |
try |
2305 |
22 May 06 |
jari |
81 |
{ |
2305 |
22 May 06 |
jari |
82 |
final PlateType plateType = PlateType.getById(dc, plateTypeId); |
2305 |
22 May 06 |
jari |
83 |
final boolean createPermission = plateType.hasPermission(Permission.WRITE); |
2305 |
22 May 06 |
jari |
84 |
final boolean deletePermission = createPermission; |
2305 |
22 May 06 |
jari |
85 |
|
2305 |
22 May 06 |
jari |
86 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
7914 |
23 Feb 21 |
nicklas |
87 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, plateType); |
2305 |
22 May 06 |
jari |
88 |
try |
2305 |
22 May 06 |
jari |
89 |
{ |
7914 |
23 Feb 21 |
nicklas |
90 |
final ItemQuery<PlateEventType> query = Base.getConfiguredQuery(dc, cc, jspContext, true, plateType.getEventTypes(), mode); |
2305 |
22 May 06 |
jari |
91 |
eventTypes = query.iterate(dc); |
2305 |
22 May 06 |
jari |
92 |
} |
2305 |
22 May 06 |
jari |
93 |
catch (Throwable t) |
2305 |
22 May 06 |
jari |
94 |
{ |
2305 |
22 May 06 |
jari |
95 |
cc.setMessage(t.getMessage()); |
2305 |
22 May 06 |
jari |
96 |
} |
2305 |
22 May 06 |
jari |
97 |
int numListed = 0; |
7604 |
25 Feb 19 |
nicklas |
98 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
7604 |
25 Feb 19 |
nicklas |
99 |
ExtensionsInvoker<ListColumnAction<PlateEventType,?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext); |
2305 |
22 May 06 |
jari |
100 |
%> |
6306 |
13 Aug 13 |
nicklas |
101 |
<base:page title="<%=title%>" type="<%=mode.getPageType()%>" id="list-page"> |
6306 |
13 Aug 13 |
nicklas |
102 |
<base:head scripts="table.js,tabcontrol-2.js,~eventtypes.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css"> |
4884 |
03 Apr 09 |
nicklas |
103 |
<ext:scripts context="<%=jspContext%>" /> |
4884 |
03 Apr 09 |
nicklas |
104 |
<ext:stylesheets context="<%=jspContext%>" /> |
2305 |
22 May 06 |
jari |
105 |
</base:head> |
2305 |
22 May 06 |
jari |
106 |
<base:body> |
5954 |
13 Feb 12 |
nicklas |
107 |
<p:path><p:pathelement |
5954 |
13 Feb 12 |
nicklas |
108 |
title="Plate types" href="<%="../index.jsp?ID="+ID%>" |
5954 |
13 Feb 12 |
nicklas |
109 |
/><p:pathelement title="<%=HTML.encodeTags(plateType.getName())%>" |
5954 |
13 Feb 12 |
nicklas |
110 |
/></p:path> |
2305 |
22 May 06 |
jari |
111 |
|
5954 |
13 Feb 12 |
nicklas |
112 |
<t:tabcontrol |
5954 |
13 Feb 12 |
nicklas |
113 |
id="main" |
5954 |
13 Feb 12 |
nicklas |
114 |
subclass="content mastertabcontrol" |
6306 |
13 Aug 13 |
nicklas |
115 |
active="events"> |
2305 |
22 May 06 |
jari |
116 |
<t:tab id="properties" title="Properties" /> |
2305 |
22 May 06 |
jari |
117 |
<t:tab id="events" title="Event types"> |
5954 |
13 Feb 12 |
nicklas |
118 |
|
2305 |
22 May 06 |
jari |
119 |
<tbl:table |
2305 |
22 May 06 |
jari |
120 |
id="eventtypes" |
2305 |
22 May 06 |
jari |
121 |
columns="<%=cc.getSetting("columns")%>" |
2305 |
22 May 06 |
jari |
122 |
sortby="<%=cc.getSortProperty()%>" |
2305 |
22 May 06 |
jari |
123 |
direction="<%=cc.getSortDirection()%>" |
2305 |
22 May 06 |
jari |
124 |
action="index.jsp" |
2305 |
22 May 06 |
jari |
125 |
sc="<%=sc%>" |
2305 |
22 May 06 |
jari |
126 |
item="<%=itemType%>" |
6702 |
02 Feb 15 |
nicklas |
127 |
filterrows="<%=cc.getFilterRows()%>" |
5954 |
13 Feb 12 |
nicklas |
128 |
subclass="fulltable" |
7982 |
14 Jun 21 |
nicklas |
129 |
stickyheaders="<%=cc.getSetting("columns.sticky", "name")%>" |
2305 |
22 May 06 |
jari |
130 |
> |
2305 |
22 May 06 |
jari |
131 |
<tbl:hidden |
2305 |
22 May 06 |
jari |
132 |
name="mode" |
2305 |
22 May 06 |
jari |
133 |
value="<%=mode.getName()%>" |
2305 |
22 May 06 |
jari |
134 |
/> |
2305 |
22 May 06 |
jari |
135 |
<tbl:hidden |
2305 |
22 May 06 |
jari |
136 |
name="platetype_id" |
2305 |
22 May 06 |
jari |
137 |
value="<%=String.valueOf(plateTypeId)%>" |
2305 |
22 May 06 |
jari |
138 |
/> |
2305 |
22 May 06 |
jari |
139 |
<tbl:hidden |
2305 |
22 May 06 |
jari |
140 |
name="callback" |
2305 |
22 May 06 |
jari |
141 |
value="<%=callback%>" |
2305 |
22 May 06 |
jari |
142 |
skip="<%=callback == null%>" |
2305 |
22 May 06 |
jari |
143 |
/> |
2305 |
22 May 06 |
jari |
144 |
<tbl:columndef |
2305 |
22 May 06 |
jari |
145 |
id="name" |
2305 |
22 May 06 |
jari |
146 |
property="name" |
2305 |
22 May 06 |
jari |
147 |
datatype="string" |
2305 |
22 May 06 |
jari |
148 |
title="Name" |
2305 |
22 May 06 |
jari |
149 |
sortable="true" |
2305 |
22 May 06 |
jari |
150 |
filterable="true" |
2305 |
22 May 06 |
jari |
151 |
exportable="true" |
2305 |
22 May 06 |
jari |
152 |
show="always" |
2305 |
22 May 06 |
jari |
153 |
/> |
2305 |
22 May 06 |
jari |
154 |
<tbl:columndef |
4332 |
12 Jun 08 |
martin |
155 |
id="id" |
4387 |
11 Aug 08 |
nicklas |
156 |
clazz="uniquecol" |
4332 |
12 Jun 08 |
martin |
157 |
property="id" |
4332 |
12 Jun 08 |
martin |
158 |
datatype="int" |
4332 |
12 Jun 08 |
martin |
159 |
title="ID" |
4332 |
12 Jun 08 |
martin |
160 |
sortable="true" |
4332 |
12 Jun 08 |
martin |
161 |
filterable="true" |
4332 |
12 Jun 08 |
martin |
162 |
exportable="true" |
4332 |
12 Jun 08 |
martin |
163 |
/> |
4332 |
12 Jun 08 |
martin |
164 |
<tbl:columndef |
2305 |
22 May 06 |
jari |
165 |
id="ordinal" |
2305 |
22 May 06 |
jari |
166 |
property="ordinal" |
2305 |
22 May 06 |
jari |
167 |
datatype="int" |
2305 |
22 May 06 |
jari |
168 |
title="Ordinal" |
2305 |
22 May 06 |
jari |
169 |
sortable="true" |
2305 |
22 May 06 |
jari |
170 |
filterable="true" |
2305 |
22 May 06 |
jari |
171 |
exportable="true" |
2305 |
22 May 06 |
jari |
172 |
/> |
2305 |
22 May 06 |
jari |
173 |
<tbl:columndef |
2305 |
22 May 06 |
jari |
174 |
id="protocolType" |
2305 |
22 May 06 |
jari |
175 |
property="protocolType.name" |
2305 |
22 May 06 |
jari |
176 |
datatype="string" |
5630 |
13 May 11 |
nicklas |
177 |
title="Protocol type" |
2305 |
22 May 06 |
jari |
178 |
sortable="true" |
2305 |
22 May 06 |
jari |
179 |
filterable="true" |
2305 |
22 May 06 |
jari |
180 |
exportable="true" |
2305 |
22 May 06 |
jari |
181 |
/> |
2305 |
22 May 06 |
jari |
182 |
<tbl:columndef |
2305 |
22 May 06 |
jari |
183 |
id="description" |
2305 |
22 May 06 |
jari |
184 |
property="description" |
2305 |
22 May 06 |
jari |
185 |
datatype="string" |
2305 |
22 May 06 |
jari |
186 |
title="Description" |
2305 |
22 May 06 |
jari |
187 |
sortable="true" |
2305 |
22 May 06 |
jari |
188 |
filterable="true" |
2305 |
22 May 06 |
jari |
189 |
exportable="true" |
2305 |
22 May 06 |
jari |
190 |
/> |
6039 |
29 Mar 12 |
nicklas |
191 |
<tbl:columndef |
6039 |
29 Mar 12 |
nicklas |
192 |
id="xt-columns" |
6039 |
29 Mar 12 |
nicklas |
193 |
extensions="<%=columnsInvoker%>" |
6039 |
29 Mar 12 |
nicklas |
194 |
jspcontext="<%=jspContext%>" |
6039 |
29 Mar 12 |
nicklas |
195 |
/> |
6604 |
18 Nov 14 |
nicklas |
196 |
<div class="panelgroup bg-filled-50 bottomborder"> |
5954 |
13 Feb 12 |
nicklas |
197 |
<tbl:toolbar |
5954 |
13 Feb 12 |
nicklas |
198 |
subclass="bottomborder" |
5954 |
13 Feb 12 |
nicklas |
199 |
visible="<%=mode.hasToolbar()%>" |
5954 |
13 Feb 12 |
nicklas |
200 |
> |
5954 |
13 Feb 12 |
nicklas |
201 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
202 |
id="btnNewItem" |
6306 |
13 Aug 13 |
nicklas |
203 |
data-extra-url="<%="&platetype_id="+plateTypeId%>" |
5954 |
13 Feb 12 |
nicklas |
204 |
disabled="<%=!createPermission%>" |
5954 |
13 Feb 12 |
nicklas |
205 |
image="new.png" |
5954 |
13 Feb 12 |
nicklas |
206 |
title="New…" |
5954 |
13 Feb 12 |
nicklas |
207 |
tooltip="<%=createPermission ? "Create new event type" : "You do not have permission to create event types"%>" |
5954 |
13 Feb 12 |
nicklas |
208 |
/> |
5954 |
13 Feb 12 |
nicklas |
209 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
210 |
id="btnDeleteItems" |
5954 |
13 Feb 12 |
nicklas |
211 |
disabled="<%=!deletePermission%>" |
5954 |
13 Feb 12 |
nicklas |
212 |
image="delete.png" |
6306 |
13 Aug 13 |
nicklas |
213 |
data-confirm="1" |
5954 |
13 Feb 12 |
nicklas |
214 |
title="Delete…" |
5954 |
13 Feb 12 |
nicklas |
215 |
tooltip="<%=deletePermission ? "Delete the selected event types" : "You do not have permission to delete event types"%>" |
5954 |
13 Feb 12 |
nicklas |
216 |
/> |
5954 |
13 Feb 12 |
nicklas |
217 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
218 |
id="btnColumns" |
5954 |
13 Feb 12 |
nicklas |
219 |
image="columns.png" |
5954 |
13 Feb 12 |
nicklas |
220 |
title="Columns…" |
5954 |
13 Feb 12 |
nicklas |
221 |
tooltip="Show, hide and re-order columns" |
5954 |
13 Feb 12 |
nicklas |
222 |
/> |
5954 |
13 Feb 12 |
nicklas |
223 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
224 |
id="btnImport" |
6306 |
13 Aug 13 |
nicklas |
225 |
data-plugin-type="IMPORT" |
5954 |
13 Feb 12 |
nicklas |
226 |
image="import.png" |
5954 |
13 Feb 12 |
nicklas |
227 |
title="Import…" |
5954 |
13 Feb 12 |
nicklas |
228 |
tooltip="Import data" |
5954 |
13 Feb 12 |
nicklas |
229 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5954 |
13 Feb 12 |
nicklas |
230 |
/> |
5954 |
13 Feb 12 |
nicklas |
231 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
232 |
id="btnExport" |
6306 |
13 Aug 13 |
nicklas |
233 |
data-plugin-type="EXPORT" |
5954 |
13 Feb 12 |
nicklas |
234 |
image="export.png" |
5954 |
13 Feb 12 |
nicklas |
235 |
title="Export…" |
5954 |
13 Feb 12 |
nicklas |
236 |
tooltip="Export data" |
5954 |
13 Feb 12 |
nicklas |
237 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5954 |
13 Feb 12 |
nicklas |
238 |
/> |
5954 |
13 Feb 12 |
nicklas |
239 |
<tbl:button |
6306 |
13 Aug 13 |
nicklas |
240 |
id="btnRunPlugin" |
6306 |
13 Aug 13 |
nicklas |
241 |
data-plugin-type="OTHER" |
5954 |
13 Feb 12 |
nicklas |
242 |
image="runplugin.png" |
5954 |
13 Feb 12 |
nicklas |
243 |
title="Run plugin…" |
5954 |
13 Feb 12 |
nicklas |
244 |
tooltip="Run a plugin" |
5954 |
13 Feb 12 |
nicklas |
245 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5954 |
13 Feb 12 |
nicklas |
246 |
/> |
5954 |
13 Feb 12 |
nicklas |
247 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
248 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5954 |
13 Feb 12 |
nicklas |
249 |
</tbl:toolbar> |
5954 |
13 Feb 12 |
nicklas |
250 |
<tbl:panel> |
6182 |
23 Oct 12 |
nicklas |
251 |
<tbl:presetselector /> |
5954 |
13 Feb 12 |
nicklas |
252 |
<tbl:navigator |
5954 |
13 Feb 12 |
nicklas |
253 |
page="<%=cc.getPage()%>" |
5954 |
13 Feb 12 |
nicklas |
254 |
rowsperpage="<%=cc.getRowsPerPage()%>" |
5954 |
13 Feb 12 |
nicklas |
255 |
totalrows="<%=eventTypes == null ? 0 : eventTypes.getTotalCount()%>" |
5954 |
13 Feb 12 |
nicklas |
256 |
visible="<%=mode.hasNavigator()%>" |
5954 |
13 Feb 12 |
nicklas |
257 |
/> |
5954 |
13 Feb 12 |
nicklas |
258 |
</tbl:panel> |
5954 |
13 Feb 12 |
nicklas |
259 |
</div> |
2305 |
22 May 06 |
jari |
260 |
<tbl:data> |
5948 |
08 Feb 12 |
nicklas |
261 |
<tbl:headers> |
5948 |
08 Feb 12 |
nicklas |
262 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
263 |
<tbl:header clazz="row-index bg-filled-100" /> |
5948 |
08 Feb 12 |
nicklas |
264 |
<tbl:columnheaders /> |
5948 |
08 Feb 12 |
nicklas |
265 |
</tbl:headerrow> |
6702 |
02 Feb 15 |
nicklas |
266 |
<% |
6702 |
02 Feb 15 |
nicklas |
267 |
int numFilters = cc.getNumPropertyFilters(); |
6702 |
02 Feb 15 |
nicklas |
268 |
int numRows = cc.getFilterRows(); |
6702 |
02 Feb 15 |
nicklas |
269 |
for (int filterNo = 0; filterNo < numRows; filterNo++) |
6702 |
02 Feb 15 |
nicklas |
270 |
{ |
6702 |
02 Feb 15 |
nicklas |
271 |
boolean lastRow = filterNo == numRows-1; |
6702 |
02 Feb 15 |
nicklas |
272 |
%> |
6702 |
02 Feb 15 |
nicklas |
273 |
<tbl:headerrow> |
7943 |
04 May 21 |
nicklas |
274 |
<tbl:header subclass="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
275 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
276 |
<div class="index"></div> |
7943 |
04 May 21 |
nicklas |
277 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
278 |
<base:icon |
7943 |
04 May 21 |
nicklas |
279 |
subclass="link table-check" |
7943 |
04 May 21 |
nicklas |
280 |
image="check_uncheck.png" |
7943 |
04 May 21 |
nicklas |
281 |
tooltip="Toggle all (use CTRL, ALT or SHIFT to check/uncheck)" |
7943 |
04 May 21 |
nicklas |
282 |
visible="<%=lastRow && mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
283 |
/> |
7943 |
04 May 21 |
nicklas |
284 |
</div> |
7943 |
04 May 21 |
nicklas |
285 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
286 |
<base:icon |
7943 |
04 May 21 |
nicklas |
287 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
288 |
image="add.png" |
7943 |
04 May 21 |
nicklas |
289 |
tooltip="Add extra filter row" |
7943 |
04 May 21 |
nicklas |
290 |
visible="<%=lastRow%>" |
7943 |
04 May 21 |
nicklas |
291 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
292 |
subclass="link table-filter-row-action" |
7943 |
04 May 21 |
nicklas |
293 |
image="remove.png" |
7943 |
04 May 21 |
nicklas |
294 |
tooltip="Remove this filter row" |
7943 |
04 May 21 |
nicklas |
295 |
visible="<%=numRows > 1 || numFilters > 0 %>" |
7943 |
04 May 21 |
nicklas |
296 |
data-remove-row="<%=filterNo%>" |
7943 |
04 May 21 |
nicklas |
297 |
/> |
7943 |
04 May 21 |
nicklas |
298 |
</div> |
7943 |
04 May 21 |
nicklas |
299 |
</div> |
6702 |
02 Feb 15 |
nicklas |
300 |
</tbl:header> |
6702 |
02 Feb 15 |
nicklas |
301 |
<tbl:propertyfilter row="<%=filterNo%>" /> |
6702 |
02 Feb 15 |
nicklas |
302 |
</tbl:headerrow> |
6702 |
02 Feb 15 |
nicklas |
303 |
<% |
6702 |
02 Feb 15 |
nicklas |
304 |
} |
6702 |
02 Feb 15 |
nicklas |
305 |
%> |
7913 |
22 Feb 21 |
nicklas |
306 |
<tbl:columnsubtitles /> |
5948 |
08 Feb 12 |
nicklas |
307 |
</tbl:headers> |
5948 |
08 Feb 12 |
nicklas |
308 |
<tbl:rows> |
2305 |
22 May 06 |
jari |
309 |
<% |
5954 |
13 Feb 12 |
nicklas |
310 |
if (cc.getMessage() != null) |
5954 |
13 Feb 12 |
nicklas |
311 |
{ |
5954 |
13 Feb 12 |
nicklas |
312 |
%> |
6604 |
18 Nov 14 |
nicklas |
313 |
<tbl:panel subclass="bg-filled-50"> |
5954 |
13 Feb 12 |
nicklas |
314 |
<div class="messagecontainer error"><%=cc.getMessage()%></div> |
5954 |
13 Feb 12 |
nicklas |
315 |
</tbl:panel> |
5954 |
13 Feb 12 |
nicklas |
316 |
<% |
5954 |
13 Feb 12 |
nicklas |
317 |
cc.setMessage(null); |
5954 |
13 Feb 12 |
nicklas |
318 |
} |
2305 |
22 May 06 |
jari |
319 |
int index = cc.getPage()*cc.getRowsPerPage(); |
2305 |
22 May 06 |
jari |
320 |
int selectedItemId = cc.getId(); |
2305 |
22 May 06 |
jari |
321 |
if (eventTypes != null) |
2503 |
09 Aug 06 |
martin |
322 |
{ |
2305 |
22 May 06 |
jari |
323 |
while (eventTypes.hasNext()) |
2305 |
22 May 06 |
jari |
324 |
{ |
2305 |
22 May 06 |
jari |
325 |
PlateEventType item = eventTypes.next(); |
2305 |
22 May 06 |
jari |
326 |
int itemId = item.getId(); |
2503 |
09 Aug 06 |
martin |
327 |
boolean writePermission = item.hasPermission(Permission.WRITE); |
2503 |
09 Aug 06 |
martin |
328 |
String tooltip = mode.isSelectionMode() ? |
2503 |
09 Aug 06 |
martin |
329 |
"Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : ""); |
2305 |
22 May 06 |
jari |
330 |
String name = HTML.encodeTags(item.getName()); |
2305 |
22 May 06 |
jari |
331 |
index++; |
2305 |
22 May 06 |
jari |
332 |
numListed++; |
2305 |
22 May 06 |
jari |
333 |
%> |
2305 |
22 May 06 |
jari |
334 |
<tbl:row> |
7943 |
04 May 21 |
nicklas |
335 |
<tbl:header clazz="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
336 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
337 |
<div class="index <%=index>999?"index-smaller":""%>"><%=index%></div> |
7943 |
04 May 21 |
nicklas |
338 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
339 |
<base:input |
7943 |
04 May 21 |
nicklas |
340 |
type="checkbox" |
7943 |
04 May 21 |
nicklas |
341 |
name="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
342 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
343 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
344 |
checked="<%=cc.getSelected().contains(itemId)%>" |
7943 |
04 May 21 |
nicklas |
345 |
visible="<%=mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
346 |
/> |
7943 |
04 May 21 |
nicklas |
347 |
<base:input |
7943 |
04 May 21 |
nicklas |
348 |
type="radio" |
7943 |
04 May 21 |
nicklas |
349 |
name="item_id" |
7943 |
04 May 21 |
nicklas |
350 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
351 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
352 |
checked="<%=selectedItemId == itemId%>" |
7943 |
04 May 21 |
nicklas |
353 |
visible="<%=mode.hasRadio()%>" |
7943 |
04 May 21 |
nicklas |
354 |
/> |
7943 |
04 May 21 |
nicklas |
355 |
</div> |
7943 |
04 May 21 |
nicklas |
356 |
<div class="icons"></div> |
7943 |
04 May 21 |
nicklas |
357 |
</div> |
7943 |
04 May 21 |
nicklas |
358 |
</tbl:header> |
6306 |
13 Aug 13 |
nicklas |
359 |
<tbl:cell column="name"><div |
6306 |
13 Aug 13 |
nicklas |
360 |
class="link table-item" |
6306 |
13 Aug 13 |
nicklas |
361 |
data-item-id="<%=itemId%>" |
6306 |
13 Aug 13 |
nicklas |
362 |
data-no-edit="<%=writePermission ? 0 : 1 %>" |
6306 |
13 Aug 13 |
nicklas |
363 |
data-extra-url="&platetype_id=<%=plateTypeId%>" |
6306 |
13 Aug 13 |
nicklas |
364 |
tabindex="0" |
2446 |
29 Jun 06 |
nicklas |
365 |
title="<%=tooltip%>"><%=name%></div></tbl:cell> |
4332 |
12 Jun 08 |
martin |
366 |
<tbl:cell column="id"><%=item.getId()%></tbl:cell> |
2305 |
22 May 06 |
jari |
367 |
<tbl:cell column="ordinal"><%=item.getOrdinal()%></tbl:cell> |
2354 |
07 Jun 06 |
martin |
368 |
<tbl:cell column="protocolType" |
2354 |
07 Jun 06 |
martin |
369 |
><base:propertyvalue |
2354 |
07 Jun 06 |
martin |
370 |
item="<%=item%>" |
2354 |
07 Jun 06 |
martin |
371 |
property="protocolType" |
2354 |
07 Jun 06 |
martin |
372 |
enableEditLink="<%=mode.hasEditLink()%>" |
2354 |
07 Jun 06 |
martin |
373 |
enablePropertyLink="<%=mode.hasPropertyLink()%>" |
2354 |
07 Jun 06 |
martin |
374 |
/></tbl:cell> |
2305 |
22 May 06 |
jari |
375 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
6039 |
29 Mar 12 |
nicklas |
376 |
<tbl:xt-cells dc="<%=dc%>" item="<%=item%>"> |
6039 |
29 Mar 12 |
nicklas |
377 |
<tbl:cell column="xt-columns" /> |
6039 |
29 Mar 12 |
nicklas |
378 |
</tbl:xt-cells> |
2305 |
22 May 06 |
jari |
379 |
</tbl:row> |
2305 |
22 May 06 |
jari |
380 |
<% |
2305 |
22 May 06 |
jari |
381 |
} |
2305 |
22 May 06 |
jari |
382 |
} |
5954 |
13 Feb 12 |
nicklas |
383 |
if (numListed == 0) |
5954 |
13 Feb 12 |
nicklas |
384 |
{ |
5954 |
13 Feb 12 |
nicklas |
385 |
%> |
6604 |
18 Nov 14 |
nicklas |
386 |
<tbl:panel subclass="bg-filled-50"> |
5954 |
13 Feb 12 |
nicklas |
387 |
<div class="messagecontainer note"> |
5954 |
13 Feb 12 |
nicklas |
388 |
<%=eventTypes == null || eventTypes.getTotalCount() == 0 ? "No event types were found" : "No event types on this page. Please select another page!" %> |
5954 |
13 Feb 12 |
nicklas |
389 |
</div> |
5954 |
13 Feb 12 |
nicklas |
390 |
</tbl:panel> |
5954 |
13 Feb 12 |
nicklas |
391 |
<% |
5954 |
13 Feb 12 |
nicklas |
392 |
} |
2305 |
22 May 06 |
jari |
393 |
%> |
2305 |
22 May 06 |
jari |
394 |
</tbl:rows> |
5954 |
13 Feb 12 |
nicklas |
395 |
</tbl:data> |
2305 |
22 May 06 |
jari |
396 |
</tbl:table> |
5954 |
13 Feb 12 |
nicklas |
397 |
|
5954 |
13 Feb 12 |
nicklas |
398 |
</t:tab> |
5954 |
13 Feb 12 |
nicklas |
399 |
</t:tabcontrol> |
5954 |
13 Feb 12 |
nicklas |
400 |
|
5900 |
07 Dec 11 |
nicklas |
401 |
<base:buttongroup> |
6306 |
13 Aug 13 |
nicklas |
402 |
<base:button id="btnOk" title="Ok" visible="<%=mode.hasOkButton()%>" /> |
6306 |
13 Aug 13 |
nicklas |
403 |
<base:button id="close" title="Cancel" visible="<%=mode.hasCancelButton()%>" /> |
6306 |
13 Aug 13 |
nicklas |
404 |
<base:button id="close" title="Close" visible="<%=mode.hasCloseButton()%>" /> |
2305 |
22 May 06 |
jari |
405 |
</base:buttongroup> |
2305 |
22 May 06 |
jari |
406 |
|
2305 |
22 May 06 |
jari |
407 |
|
2305 |
22 May 06 |
jari |
408 |
</base:body> |
2305 |
22 May 06 |
jari |
409 |
</base:page> |
2305 |
22 May 06 |
jari |
410 |
<% |
2305 |
22 May 06 |
jari |
411 |
} |
2305 |
22 May 06 |
jari |
412 |
finally |
2305 |
22 May 06 |
jari |
413 |
{ |
2305 |
22 May 06 |
jari |
414 |
if (eventTypes != null) eventTypes.close(); |
2305 |
22 May 06 |
jari |
415 |
if (dc != null) dc.close(); |
2305 |
22 May 06 |
jari |
416 |
} |
3675 |
16 Aug 07 |
jari |
417 |
%> |