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