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