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