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