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