5877 |
16 Nov 11 |
nicklas |
1 |
<%-- $Id $ |
5877 |
16 Nov 11 |
nicklas |
2 |
------------------------------------------------------------------ |
5877 |
16 Nov 11 |
nicklas |
Copyright (C) 2011 Nicklas Nordborg |
5877 |
16 Nov 11 |
nicklas |
4 |
|
5877 |
16 Nov 11 |
nicklas |
5 |
This file is part of BASE - BioArray Software Environment. |
5877 |
16 Nov 11 |
nicklas |
6 |
Available at http://base.thep.lu.se/ |
5877 |
16 Nov 11 |
nicklas |
7 |
|
5877 |
16 Nov 11 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
5877 |
16 Nov 11 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
5877 |
16 Nov 11 |
nicklas |
10 |
as published by the Free Software Foundation; either version 3 |
5877 |
16 Nov 11 |
nicklas |
11 |
of the License, or (at your option) any later version. |
5877 |
16 Nov 11 |
nicklas |
12 |
|
5877 |
16 Nov 11 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
5877 |
16 Nov 11 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
5877 |
16 Nov 11 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5877 |
16 Nov 11 |
nicklas |
16 |
GNU General Public License for more details. |
5877 |
16 Nov 11 |
nicklas |
17 |
|
5877 |
16 Nov 11 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
5877 |
16 Nov 11 |
nicklas |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
5877 |
16 Nov 11 |
nicklas |
20 |
------------------------------------------------------------------ |
5877 |
16 Nov 11 |
nicklas |
21 |
|
5877 |
16 Nov 11 |
nicklas |
22 |
--%> |
5877 |
16 Nov 11 |
nicklas |
23 |
<%@ page pageEncoding="UTF-8" session="false" |
5877 |
16 Nov 11 |
nicklas |
24 |
import="net.sf.basedb.core.SessionControl" |
5877 |
16 Nov 11 |
nicklas |
25 |
import="net.sf.basedb.core.DbControl" |
5877 |
16 Nov 11 |
nicklas |
26 |
import="net.sf.basedb.core.Item" |
5877 |
16 Nov 11 |
nicklas |
27 |
import="net.sf.basedb.core.ReporterCloneTemplate" |
5885 |
22 Nov 11 |
nicklas |
28 |
import="net.sf.basedb.core.ClonableProperty" |
5877 |
16 Nov 11 |
nicklas |
29 |
import="net.sf.basedb.core.ItemQuery" |
5877 |
16 Nov 11 |
nicklas |
30 |
import="net.sf.basedb.core.Include" |
5877 |
16 Nov 11 |
nicklas |
31 |
import="net.sf.basedb.core.ItemResultIterator" |
5877 |
16 Nov 11 |
nicklas |
32 |
import="net.sf.basedb.core.ItemResultList" |
5877 |
16 Nov 11 |
nicklas |
33 |
import="net.sf.basedb.core.ItemContext" |
5877 |
16 Nov 11 |
nicklas |
34 |
import="net.sf.basedb.core.Nameable" |
5877 |
16 Nov 11 |
nicklas |
35 |
import="net.sf.basedb.core.Permission" |
5877 |
16 Nov 11 |
nicklas |
36 |
import="net.sf.basedb.core.PluginDefinition" |
5877 |
16 Nov 11 |
nicklas |
37 |
import="net.sf.basedb.core.query.Orders" |
5877 |
16 Nov 11 |
nicklas |
38 |
import="net.sf.basedb.core.query.Hql" |
5877 |
16 Nov 11 |
nicklas |
39 |
import="net.sf.basedb.core.plugin.GuiContext" |
5877 |
16 Nov 11 |
nicklas |
40 |
import="net.sf.basedb.core.plugin.Plugin" |
5877 |
16 Nov 11 |
nicklas |
41 |
import="net.sf.basedb.util.Enumeration" |
5877 |
16 Nov 11 |
nicklas |
42 |
import="net.sf.basedb.util.ShareableUtil" |
5877 |
16 Nov 11 |
nicklas |
43 |
import="net.sf.basedb.clients.web.Base" |
5877 |
16 Nov 11 |
nicklas |
44 |
import="net.sf.basedb.clients.web.ModeInfo" |
5877 |
16 Nov 11 |
nicklas |
45 |
import="net.sf.basedb.clients.web.PermissionUtil" |
5877 |
16 Nov 11 |
nicklas |
46 |
import="net.sf.basedb.clients.web.util.HTML" |
5877 |
16 Nov 11 |
nicklas |
47 |
import="net.sf.basedb.util.Values" |
5877 |
16 Nov 11 |
nicklas |
48 |
import="net.sf.basedb.util.formatter.Formatter" |
5877 |
16 Nov 11 |
nicklas |
49 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
5877 |
16 Nov 11 |
nicklas |
50 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5877 |
16 Nov 11 |
nicklas |
51 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5877 |
16 Nov 11 |
nicklas |
52 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
53 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
5877 |
16 Nov 11 |
nicklas |
54 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
7604 |
25 Feb 19 |
nicklas |
55 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnAction" |
6045 |
03 Apr 12 |
nicklas |
56 |
import="net.sf.basedb.clients.web.extensions.list.ListColumnUtil" |
5877 |
16 Nov 11 |
nicklas |
57 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
5877 |
16 Nov 11 |
nicklas |
58 |
import="java.util.Date" |
5877 |
16 Nov 11 |
nicklas |
59 |
import="java.util.Iterator" |
5877 |
16 Nov 11 |
nicklas |
60 |
import="java.util.List" |
5877 |
16 Nov 11 |
nicklas |
61 |
import="java.util.Map" |
5877 |
16 Nov 11 |
nicklas |
62 |
%> |
5877 |
16 Nov 11 |
nicklas |
63 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
5877 |
16 Nov 11 |
nicklas |
64 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
5877 |
16 Nov 11 |
nicklas |
65 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
5877 |
16 Nov 11 |
nicklas |
66 |
<%! |
5877 |
16 Nov 11 |
nicklas |
67 |
private static final Item itemType = Item.REPORTERCLONETEMPLATE; |
5877 |
16 Nov 11 |
nicklas |
68 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.LIST); |
5877 |
16 Nov 11 |
nicklas |
69 |
%> |
5877 |
16 Nov 11 |
nicklas |
70 |
<% |
5877 |
16 Nov 11 |
nicklas |
71 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, Permission.DENIED, itemType); |
5877 |
16 Nov 11 |
nicklas |
72 |
final String ID = sc.getId(); |
5877 |
16 Nov 11 |
nicklas |
73 |
final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType); |
5877 |
16 Nov 11 |
nicklas |
74 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
5877 |
16 Nov 11 |
nicklas |
75 |
|
5877 |
16 Nov 11 |
nicklas |
76 |
final ModeInfo mode = ModeInfo.get(request.getParameter("mode")); |
5877 |
16 Nov 11 |
nicklas |
77 |
final String callback = request.getParameter("callback"); |
5877 |
16 Nov 11 |
nicklas |
78 |
final String title = mode.generateTitle("reporter clone template", "reporter clone templates"); |
7954 |
12 May 21 |
nicklas |
79 |
final DbControl dc = sc.newDbControl(":List "+itemType); |
5877 |
16 Nov 11 |
nicklas |
80 |
ItemResultIterator<ReporterCloneTemplate> templates = null; |
5877 |
16 Nov 11 |
nicklas |
81 |
try |
5877 |
16 Nov 11 |
nicklas |
82 |
{ |
5877 |
16 Nov 11 |
nicklas |
83 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
5877 |
16 Nov 11 |
nicklas |
84 |
|
5877 |
16 Nov 11 |
nicklas |
85 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
7914 |
23 Feb 21 |
nicklas |
86 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, null); |
5877 |
16 Nov 11 |
nicklas |
87 |
try |
5877 |
16 Nov 11 |
nicklas |
88 |
{ |
7914 |
23 Feb 21 |
nicklas |
89 |
final ItemQuery<ReporterCloneTemplate> query = Base.getConfiguredQuery(dc, cc, jspContext, true, ReporterCloneTemplate.getQuery(), mode); |
5878 |
17 Nov 11 |
nicklas |
90 |
query.join(Hql.leftJoin("properties", "prp")); |
5878 |
17 Nov 11 |
nicklas |
91 |
query.setDistinct(true); |
5877 |
16 Nov 11 |
nicklas |
92 |
templates = query.iterate(dc); |
5877 |
16 Nov 11 |
nicklas |
93 |
} |
5877 |
16 Nov 11 |
nicklas |
94 |
catch (Throwable t) |
5877 |
16 Nov 11 |
nicklas |
95 |
{ |
5877 |
16 Nov 11 |
nicklas |
96 |
cc.setMessage(t.getMessage()); |
5877 |
16 Nov 11 |
nicklas |
97 |
} |
5877 |
16 Nov 11 |
nicklas |
98 |
int numListed = 0; |
7604 |
25 Feb 19 |
nicklas |
99 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
7604 |
25 Feb 19 |
nicklas |
100 |
ExtensionsInvoker<ListColumnAction<ReporterCloneTemplate,?>> columnsInvoker = ListColumnUtil.useExtensions(jspContext); |
5877 |
16 Nov 11 |
nicklas |
101 |
%> |
6262 |
27 Mar 13 |
nicklas |
102 |
<base:page title="<%=title==null ? "Reporter clone templates" : title%>" type="<%=mode.getPageType()%>" id="list-page"> |
6262 |
27 Mar 13 |
nicklas |
103 |
<base:head scripts="table.js,~templates.js" styles="table.css,toolbar.css"> |
5877 |
16 Nov 11 |
nicklas |
104 |
<ext:scripts context="<%=jspContext%>" /> |
5877 |
16 Nov 11 |
nicklas |
105 |
<ext:stylesheets context="<%=jspContext%>" /> |
5877 |
16 Nov 11 |
nicklas |
106 |
</base:head> |
5877 |
16 Nov 11 |
nicklas |
107 |
|
5877 |
16 Nov 11 |
nicklas |
108 |
<base:body> |
5954 |
13 Feb 12 |
nicklas |
109 |
<h1><%=title==null ? "Reporter clone templates" : title%></h1> |
5954 |
13 Feb 12 |
nicklas |
110 |
<div class="content"> |
5877 |
16 Nov 11 |
nicklas |
111 |
<tbl:table |
5877 |
16 Nov 11 |
nicklas |
112 |
id="templates" |
5877 |
16 Nov 11 |
nicklas |
113 |
columns="<%=cc.getSetting("columns")%>" |
5877 |
16 Nov 11 |
nicklas |
114 |
sortby="<%=cc.getSortProperty()%>" |
5877 |
16 Nov 11 |
nicklas |
115 |
direction="<%=cc.getSortDirection()%>" |
5877 |
16 Nov 11 |
nicklas |
116 |
action="index.jsp" |
5877 |
16 Nov 11 |
nicklas |
117 |
sc="<%=sc%>" |
5877 |
16 Nov 11 |
nicklas |
118 |
item="<%=itemType%>" |
6705 |
02 Feb 15 |
nicklas |
119 |
filterrows="<%=cc.getFilterRows()%>" |
5954 |
13 Feb 12 |
nicklas |
120 |
subclass="fulltable" |
7982 |
14 Jun 21 |
nicklas |
121 |
stickyheaders="<%=cc.getSetting("columns.sticky", "name")%>" |
5877 |
16 Nov 11 |
nicklas |
122 |
> |
5877 |
16 Nov 11 |
nicklas |
123 |
<tbl:hidden |
5877 |
16 Nov 11 |
nicklas |
124 |
name="mode" |
5877 |
16 Nov 11 |
nicklas |
125 |
value="<%=mode.getName()%>" |
5877 |
16 Nov 11 |
nicklas |
126 |
/> |
5877 |
16 Nov 11 |
nicklas |
127 |
<tbl:hidden |
5877 |
16 Nov 11 |
nicklas |
128 |
name="callback" |
5877 |
16 Nov 11 |
nicklas |
129 |
value="<%=callback%>" |
5877 |
16 Nov 11 |
nicklas |
130 |
skip="<%=callback == null%>" |
5877 |
16 Nov 11 |
nicklas |
131 |
/> |
5877 |
16 Nov 11 |
nicklas |
132 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
133 |
id="name" |
5877 |
16 Nov 11 |
nicklas |
134 |
property="name" |
5877 |
16 Nov 11 |
nicklas |
135 |
datatype="string" |
5877 |
16 Nov 11 |
nicklas |
136 |
title="Name" |
5877 |
16 Nov 11 |
nicklas |
137 |
sortable="true" |
5877 |
16 Nov 11 |
nicklas |
138 |
filterable="true" |
5877 |
16 Nov 11 |
nicklas |
139 |
exportable="true" |
5877 |
16 Nov 11 |
nicklas |
140 |
show="always" |
5877 |
16 Nov 11 |
nicklas |
141 |
/> |
5877 |
16 Nov 11 |
nicklas |
142 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
143 |
id="id" |
5877 |
16 Nov 11 |
nicklas |
144 |
clazz="uniquecol" |
5877 |
16 Nov 11 |
nicklas |
145 |
property="id" |
5877 |
16 Nov 11 |
nicklas |
146 |
datatype="int" |
5877 |
16 Nov 11 |
nicklas |
147 |
title="ID" |
5877 |
16 Nov 11 |
nicklas |
148 |
sortable="true" |
5877 |
16 Nov 11 |
nicklas |
149 |
filterable="true" |
5877 |
16 Nov 11 |
nicklas |
150 |
exportable="true" |
5877 |
16 Nov 11 |
nicklas |
151 |
/> |
5878 |
17 Nov 11 |
nicklas |
152 |
<% |
5878 |
17 Nov 11 |
nicklas |
153 |
Enumeration<String, String> allProperties = new Enumeration<String, String>(); |
5885 |
22 Nov 11 |
nicklas |
154 |
for (ClonableProperty cp : ClonableProperty.getAll()) |
5878 |
17 Nov 11 |
nicklas |
155 |
{ |
5878 |
17 Nov 11 |
nicklas |
156 |
allProperties.add(cp.getTitle(), cp.getTitle()); |
5878 |
17 Nov 11 |
nicklas |
157 |
} |
5878 |
17 Nov 11 |
nicklas |
158 |
%> |
5877 |
16 Nov 11 |
nicklas |
159 |
<tbl:columndef |
5878 |
17 Nov 11 |
nicklas |
160 |
id="properties" |
5878 |
17 Nov 11 |
nicklas |
161 |
property="$prp.title" |
5878 |
17 Nov 11 |
nicklas |
162 |
datatype="string" |
5878 |
17 Nov 11 |
nicklas |
163 |
title="Properties" |
5878 |
17 Nov 11 |
nicklas |
164 |
filterable="true" |
5878 |
17 Nov 11 |
nicklas |
165 |
enumeration="<%=allProperties %>" |
5878 |
17 Nov 11 |
nicklas |
166 |
/> |
5878 |
17 Nov 11 |
nicklas |
167 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
168 |
id="entryDate" |
5877 |
16 Nov 11 |
nicklas |
169 |
property="entryDate" |
5877 |
16 Nov 11 |
nicklas |
170 |
datatype="date" |
5877 |
16 Nov 11 |
nicklas |
171 |
title="Registered" |
5877 |
16 Nov 11 |
nicklas |
172 |
sortable="true" |
5877 |
16 Nov 11 |
nicklas |
173 |
filterable="true" |
5877 |
16 Nov 11 |
nicklas |
174 |
exportable="true" |
5877 |
16 Nov 11 |
nicklas |
175 |
formatter="<%=dateFormatter%>" |
5877 |
16 Nov 11 |
nicklas |
176 |
/> |
5877 |
16 Nov 11 |
nicklas |
177 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
178 |
id="owner" |
5877 |
16 Nov 11 |
nicklas |
179 |
property="owner.name" |
5877 |
16 Nov 11 |
nicklas |
180 |
datatype="string" |
5877 |
16 Nov 11 |
nicklas |
181 |
title="Owner" |
5877 |
16 Nov 11 |
nicklas |
182 |
sortable="true" |
5877 |
16 Nov 11 |
nicklas |
183 |
filterable="true" |
5877 |
16 Nov 11 |
nicklas |
184 |
exportable="true" |
5877 |
16 Nov 11 |
nicklas |
185 |
/> |
5877 |
16 Nov 11 |
nicklas |
186 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
187 |
id="description" |
5877 |
16 Nov 11 |
nicklas |
188 |
property="description" |
5877 |
16 Nov 11 |
nicklas |
189 |
datatype="string" |
5877 |
16 Nov 11 |
nicklas |
190 |
title="Description" |
5877 |
16 Nov 11 |
nicklas |
191 |
sortable="true" |
5877 |
16 Nov 11 |
nicklas |
192 |
filterable="true" |
5877 |
16 Nov 11 |
nicklas |
193 |
exportable="true" |
5877 |
16 Nov 11 |
nicklas |
194 |
/> |
5877 |
16 Nov 11 |
nicklas |
195 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
196 |
id="permission" |
5877 |
16 Nov 11 |
nicklas |
197 |
title="Permission" |
5877 |
16 Nov 11 |
nicklas |
198 |
/> |
5877 |
16 Nov 11 |
nicklas |
199 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
200 |
id="sharedTo" |
5877 |
16 Nov 11 |
nicklas |
201 |
title="Shared to" |
5877 |
16 Nov 11 |
nicklas |
202 |
filterable="true" |
5877 |
16 Nov 11 |
nicklas |
203 |
filterproperty="!sharedTo.name" |
5877 |
16 Nov 11 |
nicklas |
204 |
datatype="string" |
5877 |
16 Nov 11 |
nicklas |
205 |
/> |
6045 |
03 Apr 12 |
nicklas |
206 |
<tbl:columndef |
6045 |
03 Apr 12 |
nicklas |
207 |
id="xt-columns" |
6045 |
03 Apr 12 |
nicklas |
208 |
extensions="<%=columnsInvoker%>" |
6045 |
03 Apr 12 |
nicklas |
209 |
jspcontext="<%=jspContext%>" |
6045 |
03 Apr 12 |
nicklas |
210 |
/> |
6604 |
18 Nov 14 |
nicklas |
211 |
<div class="panelgroup bg-filled-50 bottomborder"> |
5954 |
13 Feb 12 |
nicklas |
212 |
<tbl:toolbar |
5954 |
13 Feb 12 |
nicklas |
213 |
subclass="bottomborder" |
5954 |
13 Feb 12 |
nicklas |
214 |
visible="<%=mode.hasToolbar()%>" |
5954 |
13 Feb 12 |
nicklas |
215 |
> |
5954 |
13 Feb 12 |
nicklas |
216 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
217 |
id="btnNewItem" |
5954 |
13 Feb 12 |
nicklas |
218 |
disabled="<%=!createPermission%>" |
5954 |
13 Feb 12 |
nicklas |
219 |
image="new.png" |
5954 |
13 Feb 12 |
nicklas |
220 |
title="New…" |
5954 |
13 Feb 12 |
nicklas |
221 |
tooltip="<%=createPermission ? "Create new template" : "You do not have permission to create templates"%>" |
5954 |
13 Feb 12 |
nicklas |
222 |
/> |
5954 |
13 Feb 12 |
nicklas |
223 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
224 |
id="btnDeleteItems" |
5954 |
13 Feb 12 |
nicklas |
225 |
image="delete.png" |
5954 |
13 Feb 12 |
nicklas |
226 |
title="Delete" |
5954 |
13 Feb 12 |
nicklas |
227 |
tooltip="Delete the selected items" |
5954 |
13 Feb 12 |
nicklas |
228 |
/> |
5954 |
13 Feb 12 |
nicklas |
229 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
230 |
id="btnRestoreItems" |
5954 |
13 Feb 12 |
nicklas |
231 |
image="restore.png" |
5954 |
13 Feb 12 |
nicklas |
232 |
title="Restore" |
5954 |
13 Feb 12 |
nicklas |
233 |
tooltip="Restore the selected (deleted) items" |
5954 |
13 Feb 12 |
nicklas |
234 |
/> |
5954 |
13 Feb 12 |
nicklas |
235 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
236 |
id="btnShareItems" |
5954 |
13 Feb 12 |
nicklas |
237 |
image="share.png" |
5954 |
13 Feb 12 |
nicklas |
238 |
title="Share…" |
5954 |
13 Feb 12 |
nicklas |
239 |
tooltip="Share the selected items" |
5954 |
13 Feb 12 |
nicklas |
240 |
/> |
5954 |
13 Feb 12 |
nicklas |
241 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
242 |
id="btnSetOwner" |
5954 |
13 Feb 12 |
nicklas |
243 |
image="take_ownership.png" |
5954 |
13 Feb 12 |
nicklas |
244 |
title="Set owner…" |
5954 |
13 Feb 12 |
nicklas |
245 |
tooltip="Change owner of the selected items" |
5954 |
13 Feb 12 |
nicklas |
246 |
/> |
5954 |
13 Feb 12 |
nicklas |
247 |
<tbl:button |
6262 |
27 Mar 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 |
6262 |
27 Mar 13 |
nicklas |
254 |
id="btnImport" |
6262 |
27 Mar 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 |
6262 |
27 Mar 13 |
nicklas |
262 |
id="btnExport" |
6262 |
27 Mar 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 |
6262 |
27 Mar 13 |
nicklas |
270 |
id="btnRunPlugin" |
6262 |
27 Mar 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="<%=templates == null ? 0 : templates.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> |
5877 |
16 Nov 11 |
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> |
6705 |
02 Feb 15 |
nicklas |
296 |
<% |
6705 |
02 Feb 15 |
nicklas |
297 |
int numFilters = cc.getNumPropertyFilters(); |
6705 |
02 Feb 15 |
nicklas |
298 |
int numRows = cc.getFilterRows(); |
6705 |
02 Feb 15 |
nicklas |
299 |
for (int filterNo = 0; filterNo < numRows; filterNo++) |
6705 |
02 Feb 15 |
nicklas |
300 |
{ |
6705 |
02 Feb 15 |
nicklas |
301 |
boolean lastRow = filterNo == numRows-1; |
6705 |
02 Feb 15 |
nicklas |
302 |
%> |
6705 |
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> |
6705 |
02 Feb 15 |
nicklas |
330 |
</tbl:header> |
6705 |
02 Feb 15 |
nicklas |
331 |
<tbl:propertyfilter row="<%=filterNo%>" /> |
6705 |
02 Feb 15 |
nicklas |
332 |
</tbl:headerrow> |
6705 |
02 Feb 15 |
nicklas |
333 |
<% |
6705 |
02 Feb 15 |
nicklas |
334 |
} |
6705 |
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> |
5877 |
16 Nov 11 |
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 |
} |
5877 |
16 Nov 11 |
nicklas |
349 |
int index = cc.getPage()*cc.getRowsPerPage(); |
5877 |
16 Nov 11 |
nicklas |
350 |
int selectedItemId = Values.getInt(request.getParameter("item_id")); |
5877 |
16 Nov 11 |
nicklas |
351 |
if (templates != null) |
5877 |
16 Nov 11 |
nicklas |
352 |
{ |
5877 |
16 Nov 11 |
nicklas |
353 |
while (templates.hasNext()) |
5877 |
16 Nov 11 |
nicklas |
354 |
{ |
5877 |
16 Nov 11 |
nicklas |
355 |
ReporterCloneTemplate item = templates.next(); |
5877 |
16 Nov 11 |
nicklas |
356 |
int itemId = item.getId(); |
6221 |
10 Jan 13 |
nicklas |
357 |
|
6221 |
10 Jan 13 |
nicklas |
358 |
|
5877 |
16 Nov 11 |
nicklas |
359 |
boolean deletePermission = item.hasPermission(Permission.DELETE); |
5877 |
16 Nov 11 |
nicklas |
360 |
boolean sharePermission = item.hasPermission(Permission.SET_PERMISSION); |
5877 |
16 Nov 11 |
nicklas |
361 |
boolean writePermission = item.hasPermission(Permission.WRITE); |
5877 |
16 Nov 11 |
nicklas |
362 |
String name = HTML.encodeTags(item.getName()); |
5877 |
16 Nov 11 |
nicklas |
363 |
String tooltip = mode.isSelectionMode() ? |
5877 |
16 Nov 11 |
nicklas |
364 |
"Select this item" : "View this item" + (writePermission ? " (use CTRL, ALT or SHIFT to edit)" : ""); |
5877 |
16 Nov 11 |
nicklas |
365 |
index++; |
5877 |
16 Nov 11 |
nicklas |
366 |
numListed++; |
5877 |
16 Nov 11 |
nicklas |
367 |
%> |
5877 |
16 Nov 11 |
nicklas |
368 |
<tbl:row> |
7943 |
04 May 21 |
nicklas |
369 |
<tbl:header clazz="row-index bg-filled-100"> |
7943 |
04 May 21 |
nicklas |
370 |
<div class="index-<%=mode.getName()%>"> |
7943 |
04 May 21 |
nicklas |
371 |
<div class="index <%=index>999?"index-smaller":""%>"><%=index%></div> |
7943 |
04 May 21 |
nicklas |
372 |
<div class="check"> |
7943 |
04 May 21 |
nicklas |
373 |
<base:input |
7943 |
04 May 21 |
nicklas |
374 |
type="checkbox" |
7943 |
04 May 21 |
nicklas |
375 |
name="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
376 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
377 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
378 |
checked="<%=cc.getSelected().contains(itemId)%>" |
7943 |
04 May 21 |
nicklas |
379 |
visible="<%=mode.hasCheck()%>" |
7943 |
04 May 21 |
nicklas |
380 |
/> |
7943 |
04 May 21 |
nicklas |
381 |
<base:input |
7943 |
04 May 21 |
nicklas |
382 |
type="radio" |
7943 |
04 May 21 |
nicklas |
383 |
name="item_id" |
7943 |
04 May 21 |
nicklas |
384 |
value="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
385 |
title="<%=name%>" |
7943 |
04 May 21 |
nicklas |
386 |
checked="<%=selectedItemId == itemId%>" |
7943 |
04 May 21 |
nicklas |
387 |
visible="<%=mode.hasRadio()%>" |
7943 |
04 May 21 |
nicklas |
388 |
/> |
7943 |
04 May 21 |
nicklas |
389 |
</div> |
7943 |
04 May 21 |
nicklas |
390 |
<div class="icons"> |
7943 |
04 May 21 |
nicklas |
391 |
<base:icon |
7943 |
04 May 21 |
nicklas |
392 |
image="deleted.png" |
7943 |
04 May 21 |
nicklas |
393 |
id="<%="delete."+itemId %>" |
7943 |
04 May 21 |
nicklas |
394 |
subclass="<%=deletePermission ? "table-delete-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
395 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
396 |
tooltip="This item has been scheduled for deletion" |
7943 |
04 May 21 |
nicklas |
397 |
visible="<%=item.isRemoved()%>" |
7943 |
04 May 21 |
nicklas |
398 |
/><base:icon |
7943 |
04 May 21 |
nicklas |
399 |
image="shared.png" |
7943 |
04 May 21 |
nicklas |
400 |
id="<%="share."+itemId %>" |
7943 |
04 May 21 |
nicklas |
401 |
subclass="<%=sharePermission ? "table-share-item" : "disabled" %>" |
7943 |
04 May 21 |
nicklas |
402 |
data-item-id="<%=itemId%>" |
7943 |
04 May 21 |
nicklas |
403 |
tooltip="This item is shared to other users, groups and/or projects" |
7943 |
04 May 21 |
nicklas |
404 |
visible="<%=item.isShared()%>" |
7943 |
04 May 21 |
nicklas |
405 |
/> |
7943 |
04 May 21 |
nicklas |
406 |
</div> |
7943 |
04 May 21 |
nicklas |
407 |
</div> |
7943 |
04 May 21 |
nicklas |
408 |
</tbl:header> |
6262 |
27 Mar 13 |
nicklas |
409 |
<tbl:cell column="name"><div |
6262 |
27 Mar 13 |
nicklas |
410 |
class="link table-item" |
6262 |
27 Mar 13 |
nicklas |
411 |
data-item-id="<%=itemId%>" |
6262 |
27 Mar 13 |
nicklas |
412 |
data-no-edit="<%=writePermission ? 0 : 1 %>" |
6262 |
27 Mar 13 |
nicklas |
413 |
tabindex="0" |
5877 |
16 Nov 11 |
nicklas |
414 |
title="<%=tooltip%>"><%=name%></div></tbl:cell> |
5877 |
16 Nov 11 |
nicklas |
415 |
<tbl:cell column="id"><%=item.getId()%></tbl:cell> |
5877 |
16 Nov 11 |
nicklas |
416 |
<tbl:cell column="entryDate" value="<%=item.getEntryDate()%>" /> |
5877 |
16 Nov 11 |
nicklas |
417 |
<tbl:cell column="owner" |
5877 |
16 Nov 11 |
nicklas |
418 |
><base:propertyvalue |
5877 |
16 Nov 11 |
nicklas |
419 |
item="<%=item%>" |
5877 |
16 Nov 11 |
nicklas |
420 |
property="owner" |
5877 |
16 Nov 11 |
nicklas |
421 |
enableEditLink="<%=mode.hasEditLink()%>" |
5877 |
16 Nov 11 |
nicklas |
422 |
enablePropertyLink="<%=mode.hasPropertyLink()%>" |
5877 |
16 Nov 11 |
nicklas |
423 |
/></tbl:cell> |
5878 |
17 Nov 11 |
nicklas |
424 |
<tbl:cell column="properties"> |
5878 |
17 Nov 11 |
nicklas |
425 |
<% |
5878 |
17 Nov 11 |
nicklas |
426 |
String separator = ""; |
5885 |
22 Nov 11 |
nicklas |
427 |
for (ClonableProperty cp : item.getClonableProperties()) |
5878 |
17 Nov 11 |
nicklas |
428 |
{ |
5878 |
17 Nov 11 |
nicklas |
429 |
out.write(separator); |
5878 |
17 Nov 11 |
nicklas |
430 |
separator = ", "; |
5878 |
17 Nov 11 |
nicklas |
431 |
out.write(HTML.encodeTags(cp.getTitle())); |
5878 |
17 Nov 11 |
nicklas |
432 |
} |
5878 |
17 Nov 11 |
nicklas |
433 |
%> |
5878 |
17 Nov 11 |
nicklas |
434 |
</tbl:cell> |
5877 |
16 Nov 11 |
nicklas |
435 |
<tbl:cell column="description"><%=HTML.encodeTags(item.getDescription())%></tbl:cell> |
5877 |
16 Nov 11 |
nicklas |
436 |
<tbl:cell column="permission"><%=PermissionUtil.getShortPermissions(item)%></tbl:cell> |
5877 |
16 Nov 11 |
nicklas |
437 |
<tbl:cell column="sharedTo"> |
5877 |
16 Nov 11 |
nicklas |
438 |
<% |
5877 |
16 Nov 11 |
nicklas |
439 |
Iterator<Nameable> sharees = ShareableUtil.getSharedTo(dc, item).iterator(); |
5877 |
16 Nov 11 |
nicklas |
440 |
while(sharees.hasNext()) |
5877 |
16 Nov 11 |
nicklas |
441 |
{ |
5877 |
16 Nov 11 |
nicklas |
442 |
Nameable n = sharees.next(); |
5877 |
16 Nov 11 |
nicklas |
443 |
if (mode.hasPropertyLink()) |
5877 |
16 Nov 11 |
nicklas |
444 |
{ |
5877 |
16 Nov 11 |
nicklas |
445 |
out.write(Base.getLinkedName(ID, n, false, mode.hasEditLink())); |
5877 |
16 Nov 11 |
nicklas |
446 |
} |
5877 |
16 Nov 11 |
nicklas |
447 |
else |
5877 |
16 Nov 11 |
nicklas |
448 |
{ |
5877 |
16 Nov 11 |
nicklas |
449 |
out.write(HTML.encodeTags(n.getName())); |
5877 |
16 Nov 11 |
nicklas |
450 |
} |
5877 |
16 Nov 11 |
nicklas |
451 |
out.write(sharees.hasNext() ? ", " : ""); |
5877 |
16 Nov 11 |
nicklas |
452 |
} |
5877 |
16 Nov 11 |
nicklas |
453 |
%> |
5877 |
16 Nov 11 |
nicklas |
454 |
</tbl:cell> |
6045 |
03 Apr 12 |
nicklas |
455 |
<tbl:xt-cells dc="<%=dc%>" item="<%=item%>"> |
6045 |
03 Apr 12 |
nicklas |
456 |
<tbl:cell column="xt-columns" /> |
6045 |
03 Apr 12 |
nicklas |
457 |
</tbl:xt-cells> |
5877 |
16 Nov 11 |
nicklas |
458 |
</tbl:row> |
5877 |
16 Nov 11 |
nicklas |
459 |
<% |
5877 |
16 Nov 11 |
nicklas |
460 |
} |
5877 |
16 Nov 11 |
nicklas |
461 |
} |
5954 |
13 Feb 12 |
nicklas |
462 |
if (numListed == 0) |
5954 |
13 Feb 12 |
nicklas |
463 |
{ |
5954 |
13 Feb 12 |
nicklas |
464 |
%> |
6604 |
18 Nov 14 |
nicklas |
465 |
<tbl:panel subclass="bg-filled-50"> |
5954 |
13 Feb 12 |
nicklas |
466 |
<div class="messagecontainer note"> |
5954 |
13 Feb 12 |
nicklas |
467 |
<%=templates == null || templates.getTotalCount() == 0 ? "No templates were found" : "No templates on this page. Please select another page!" %> |
5954 |
13 Feb 12 |
nicklas |
468 |
</div> |
5954 |
13 Feb 12 |
nicklas |
469 |
</tbl:panel> |
5954 |
13 Feb 12 |
nicklas |
470 |
<% |
5954 |
13 Feb 12 |
nicklas |
471 |
} |
5877 |
16 Nov 11 |
nicklas |
472 |
%> |
5954 |
13 Feb 12 |
nicklas |
473 |
</tbl:rows> |
5877 |
16 Nov 11 |
nicklas |
474 |
</tbl:data> |
5877 |
16 Nov 11 |
nicklas |
475 |
</tbl:table> |
5954 |
13 Feb 12 |
nicklas |
476 |
</div> |
5954 |
13 Feb 12 |
nicklas |
477 |
|
5951 |
09 Feb 12 |
nicklas |
478 |
<base:buttongroup subclass="dialogbuttons"> |
6262 |
27 Mar 13 |
nicklas |
479 |
<base:button id="btnOk" title="Ok" visible="<%=mode.hasOkButton()%>" /> |
6262 |
27 Mar 13 |
nicklas |
480 |
<base:button id="close" title="Cancel" visible="<%=mode.hasCancelButton()%>" /> |
6262 |
27 Mar 13 |
nicklas |
481 |
<base:button id="close" title="Close" visible="<%=mode.hasCloseButton()%>" /> |
5877 |
16 Nov 11 |
nicklas |
482 |
</base:buttongroup> |
5951 |
09 Feb 12 |
nicklas |
483 |
|
5877 |
16 Nov 11 |
nicklas |
484 |
</base:body> |
5877 |
16 Nov 11 |
nicklas |
485 |
</base:page> |
5877 |
16 Nov 11 |
nicklas |
486 |
<% |
5877 |
16 Nov 11 |
nicklas |
487 |
} |
5877 |
16 Nov 11 |
nicklas |
488 |
finally |
5877 |
16 Nov 11 |
nicklas |
489 |
{ |
5877 |
16 Nov 11 |
nicklas |
490 |
if (templates != null) templates.close(); |
5877 |
16 Nov 11 |
nicklas |
491 |
if (dc != null) dc.close(); |
5877 |
16 Nov 11 |
nicklas |
492 |
} |
5877 |
16 Nov 11 |
nicklas |
493 |
%> |