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