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.SystemItems" |
5877 |
16 Nov 11 |
nicklas |
27 |
import="net.sf.basedb.core.Group" |
5877 |
16 Nov 11 |
nicklas |
28 |
import="net.sf.basedb.core.Item" |
5877 |
16 Nov 11 |
nicklas |
29 |
import="net.sf.basedb.core.ItemContext" |
5877 |
16 Nov 11 |
nicklas |
30 |
import="net.sf.basedb.core.Permission" |
5877 |
16 Nov 11 |
nicklas |
31 |
import="net.sf.basedb.core.ReporterCloneTemplate" |
5885 |
22 Nov 11 |
nicklas |
32 |
import="net.sf.basedb.core.ClonableProperty" |
5877 |
16 Nov 11 |
nicklas |
33 |
import="net.sf.basedb.core.User" |
5877 |
16 Nov 11 |
nicklas |
34 |
import="net.sf.basedb.core.PermissionDeniedException" |
5877 |
16 Nov 11 |
nicklas |
35 |
import="net.sf.basedb.core.PluginDefinition" |
5877 |
16 Nov 11 |
nicklas |
36 |
import="net.sf.basedb.core.ItemQuery" |
5877 |
16 Nov 11 |
nicklas |
37 |
import="net.sf.basedb.core.ItemResultList" |
5877 |
16 Nov 11 |
nicklas |
38 |
import="net.sf.basedb.core.Include" |
5877 |
16 Nov 11 |
nicklas |
39 |
import="net.sf.basedb.core.MultiPermissions" |
5877 |
16 Nov 11 |
nicklas |
40 |
import="net.sf.basedb.core.plugin.GuiContext" |
5877 |
16 Nov 11 |
nicklas |
41 |
import="net.sf.basedb.core.plugin.Plugin" |
5877 |
16 Nov 11 |
nicklas |
42 |
import="net.sf.basedb.core.Project" |
5877 |
16 Nov 11 |
nicklas |
43 |
import="net.sf.basedb.core.query.Orders" |
5877 |
16 Nov 11 |
nicklas |
44 |
import="net.sf.basedb.core.query.Hql" |
5877 |
16 Nov 11 |
nicklas |
45 |
import="net.sf.basedb.clients.web.Base" |
5877 |
16 Nov 11 |
nicklas |
46 |
import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
5877 |
16 Nov 11 |
nicklas |
47 |
import="net.sf.basedb.clients.web.PermissionUtil" |
5877 |
16 Nov 11 |
nicklas |
48 |
import="net.sf.basedb.clients.web.util.HTML" |
5877 |
16 Nov 11 |
nicklas |
49 |
import="net.sf.basedb.util.formatter.Formatter" |
5877 |
16 Nov 11 |
nicklas |
50 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
5877 |
16 Nov 11 |
nicklas |
51 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5877 |
16 Nov 11 |
nicklas |
52 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5877 |
16 Nov 11 |
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" |
5877 |
16 Nov 11 |
nicklas |
55 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
5877 |
16 Nov 11 |
nicklas |
56 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
5877 |
16 Nov 11 |
nicklas |
57 |
import="java.util.Date" |
5877 |
16 Nov 11 |
nicklas |
58 |
import="net.sf.basedb.util.Values" |
5877 |
16 Nov 11 |
nicklas |
59 |
import="java.util.Collections" |
5877 |
16 Nov 11 |
nicklas |
60 |
import="java.util.Map" |
5877 |
16 Nov 11 |
nicklas |
61 |
import="java.util.Set" |
5877 |
16 Nov 11 |
nicklas |
62 |
import="java.util.List" |
5877 |
16 Nov 11 |
nicklas |
63 |
%> |
5877 |
16 Nov 11 |
nicklas |
64 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
5877 |
16 Nov 11 |
nicklas |
65 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
5877 |
16 Nov 11 |
nicklas |
66 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
5877 |
16 Nov 11 |
nicklas |
67 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
5877 |
16 Nov 11 |
nicklas |
68 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
5877 |
16 Nov 11 |
nicklas |
69 |
<%! |
5877 |
16 Nov 11 |
nicklas |
70 |
private static final Item itemType = Item.REPORTERCLONETEMPLATE; |
5877 |
16 Nov 11 |
nicklas |
71 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
5877 |
16 Nov 11 |
nicklas |
72 |
%> |
5877 |
16 Nov 11 |
nicklas |
73 |
<% |
5877 |
16 Nov 11 |
nicklas |
74 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
5877 |
16 Nov 11 |
nicklas |
75 |
final String ID = sc.getId(); |
5877 |
16 Nov 11 |
nicklas |
76 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
5877 |
16 Nov 11 |
nicklas |
77 |
final int itemId = cc.getId(); |
6262 |
27 Mar 13 |
nicklas |
78 |
final String tab = Values.getStringOrNull(request.getParameter("tab")); |
5877 |
16 Nov 11 |
nicklas |
79 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
80 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
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 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
5877 |
16 Nov 11 |
nicklas |
85 |
|
5877 |
16 Nov 11 |
nicklas |
86 |
String title = null; |
5877 |
16 Nov 11 |
nicklas |
87 |
ReporterCloneTemplate template = ReporterCloneTemplate.getById(dc, itemId); |
5877 |
16 Nov 11 |
nicklas |
88 |
|
5877 |
16 Nov 11 |
nicklas |
89 |
final boolean writePermission = template.hasPermission(Permission.WRITE); |
5877 |
16 Nov 11 |
nicklas |
90 |
final boolean deletePermission = template.hasPermission(Permission.DELETE); |
5877 |
16 Nov 11 |
nicklas |
91 |
final boolean sharePermission = template.hasPermission(Permission.SET_PERMISSION); |
5877 |
16 Nov 11 |
nicklas |
92 |
final boolean setOwnerPermission = template.hasPermission(Permission.SET_OWNER); |
5877 |
16 Nov 11 |
nicklas |
93 |
final boolean isRemoved = template.isRemoved(); |
5877 |
16 Nov 11 |
nicklas |
94 |
final boolean isUsed = isRemoved && template.isUsed(); |
5877 |
16 Nov 11 |
nicklas |
95 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
5877 |
16 Nov 11 |
nicklas |
96 |
final boolean isOwner = template.isOwner(); |
5877 |
16 Nov 11 |
nicklas |
97 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, template); |
7604 |
25 Feb 19 |
nicklas |
98 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
5877 |
16 Nov 11 |
nicklas |
99 |
%> |
6262 |
27 Mar 13 |
nicklas |
100 |
<base:page title="<%=title%>" id="view-page"> |
6262 |
27 Mar 13 |
nicklas |
101 |
<base:head scripts="tabcontrol-2.js,table.js,~templates.js" styles="toolbar.css,headertabcontrol.css,path.css,table.css"> |
5877 |
16 Nov 11 |
nicklas |
102 |
<ext:scripts context="<%=jspContext%>" /> |
5877 |
16 Nov 11 |
nicklas |
103 |
<ext:stylesheets context="<%=jspContext%>" /> |
5877 |
16 Nov 11 |
nicklas |
104 |
</base:head> |
5877 |
16 Nov 11 |
nicklas |
105 |
<base:body> |
5941 |
01 Feb 12 |
nicklas |
106 |
<p:path><p:pathelement |
5941 |
01 Feb 12 |
nicklas |
107 |
title="Reporter clone templates" href="<%="index.jsp?ID="+ID%>" |
5941 |
01 Feb 12 |
nicklas |
108 |
/><p:pathelement title="<%=HTML.encodeTags(template.getName())%>" |
5941 |
01 Feb 12 |
nicklas |
109 |
/></p:path> |
6262 |
27 Mar 13 |
nicklas |
110 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
5877 |
16 Nov 11 |
nicklas |
111 |
|
5941 |
01 Feb 12 |
nicklas |
112 |
<t:tabcontrol |
5941 |
01 Feb 12 |
nicklas |
113 |
id="main" |
5941 |
01 Feb 12 |
nicklas |
114 |
subclass="content mastertabcontrol" |
6244 |
25 Feb 13 |
nicklas |
115 |
active="<%=tab%>"> |
5877 |
16 Nov 11 |
nicklas |
116 |
<t:tab id="properties" title="Properties"> |
5941 |
01 Feb 12 |
nicklas |
117 |
<div> |
5941 |
01 Feb 12 |
nicklas |
118 |
<table class="fullform bottomborder"> |
5941 |
01 Feb 12 |
nicklas |
119 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
120 |
<th class="itemstatus"> |
5877 |
16 Nov 11 |
nicklas |
121 |
<base:icon |
5946 |
03 Feb 12 |
nicklas |
122 |
image="shared.png" |
5941 |
01 Feb 12 |
nicklas |
123 |
visible="<%=template.isShared()%>" |
5941 |
01 Feb 12 |
nicklas |
124 |
tooltip="This item is shared to other users, groups and/or projects" |
5941 |
01 Feb 12 |
nicklas |
125 |
/> |
5941 |
01 Feb 12 |
nicklas |
126 |
<base:icon |
6262 |
27 Mar 13 |
nicklas |
127 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
128 |
image="deleted.png" |
5941 |
01 Feb 12 |
nicklas |
129 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5941 |
01 Feb 12 |
nicklas |
130 |
enabled="<%=deletePermanentlyPermission %>" |
5941 |
01 Feb 12 |
nicklas |
131 |
visible="<%=isRemoved%>" |
5941 |
01 Feb 12 |
nicklas |
132 |
/> |
6262 |
27 Mar 13 |
nicklas |
133 |
<base:icon |
6262 |
27 Mar 13 |
nicklas |
134 |
id="btnUsingItems" |
6262 |
27 Mar 13 |
nicklas |
135 |
image="used.png" |
5941 |
01 Feb 12 |
nicklas |
136 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5941 |
01 Feb 12 |
nicklas |
137 |
visible="<%=isRemoved && isUsed%>" /> |
5941 |
01 Feb 12 |
nicklas |
138 |
</th> |
5941 |
01 Feb 12 |
nicklas |
139 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
140 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5941 |
01 Feb 12 |
nicklas |
141 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
142 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
143 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
144 |
image="edit.png" |
5941 |
01 Feb 12 |
nicklas |
145 |
title="Edit…" |
5941 |
01 Feb 12 |
nicklas |
146 |
tooltip="<%=writePermission ? "Edit this template" : "You do not have permission to edit this template"%>" |
5941 |
01 Feb 12 |
nicklas |
147 |
/> |
5941 |
01 Feb 12 |
nicklas |
148 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
149 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
150 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
151 |
image="delete.png" |
5941 |
01 Feb 12 |
nicklas |
152 |
title="Delete" |
5941 |
01 Feb 12 |
nicklas |
153 |
visible="<%=!template.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
154 |
tooltip="<%=deletePermission ? "Delete this template" : "You do not have permission to delete this template"%>" |
5941 |
01 Feb 12 |
nicklas |
155 |
/> |
5941 |
01 Feb 12 |
nicklas |
156 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
157 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
158 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
159 |
image="restore.png" |
5941 |
01 Feb 12 |
nicklas |
160 |
title="Restore" |
5941 |
01 Feb 12 |
nicklas |
161 |
visible="<%=template.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
162 |
tooltip="<%=writePermission ? "Restore this template" : "You do not have permission to restore this template"%>" |
5941 |
01 Feb 12 |
nicklas |
163 |
/> |
5941 |
01 Feb 12 |
nicklas |
164 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
165 |
id="btnShare" |
5942 |
01 Feb 12 |
nicklas |
166 |
disabled="<%=!sharePermission%>" |
5945 |
02 Feb 12 |
nicklas |
167 |
image="share.png" |
5941 |
01 Feb 12 |
nicklas |
168 |
title="Share…" |
5941 |
01 Feb 12 |
nicklas |
169 |
tooltip="<%=sharePermission ? "Share this template to other user, groups and projects" : "You do not have permission to share this template"%>" |
5941 |
01 Feb 12 |
nicklas |
170 |
/> |
5941 |
01 Feb 12 |
nicklas |
171 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
172 |
id="btnSetOwner" |
5942 |
01 Feb 12 |
nicklas |
173 |
disabled="<%=!setOwnerPermission%>" |
5941 |
01 Feb 12 |
nicklas |
174 |
image="take_ownership.png" |
5941 |
01 Feb 12 |
nicklas |
175 |
title="Set owner…" |
5941 |
01 Feb 12 |
nicklas |
176 |
tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
5941 |
01 Feb 12 |
nicklas |
177 |
/> |
5941 |
01 Feb 12 |
nicklas |
178 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
179 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
180 |
image="import.png" |
6262 |
27 Mar 13 |
nicklas |
181 |
data-plugin-type="IMPORT" |
5941 |
01 Feb 12 |
nicklas |
182 |
title="Import…" |
5941 |
01 Feb 12 |
nicklas |
183 |
tooltip="Import data" |
5941 |
01 Feb 12 |
nicklas |
184 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
185 |
/> |
5941 |
01 Feb 12 |
nicklas |
186 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
187 |
id="btnExport" |
6262 |
27 Mar 13 |
nicklas |
188 |
image="export.png" |
6262 |
27 Mar 13 |
nicklas |
189 |
data-plugin-type="EXPORT" |
5941 |
01 Feb 12 |
nicklas |
190 |
title="Export…" |
5941 |
01 Feb 12 |
nicklas |
191 |
tooltip="Export data" |
5941 |
01 Feb 12 |
nicklas |
192 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
193 |
/> |
5941 |
01 Feb 12 |
nicklas |
194 |
<tbl:button |
6262 |
27 Mar 13 |
nicklas |
195 |
id="btnRunPlugin" |
6262 |
27 Mar 13 |
nicklas |
196 |
image="runplugin.png" |
6262 |
27 Mar 13 |
nicklas |
197 |
data-plugin-type="OTHER" |
5941 |
01 Feb 12 |
nicklas |
198 |
title="Run plugin…" |
5941 |
01 Feb 12 |
nicklas |
199 |
tooltip="Run a plugin" |
5941 |
01 Feb 12 |
nicklas |
200 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5941 |
01 Feb 12 |
nicklas |
201 |
/> |
5941 |
01 Feb 12 |
nicklas |
202 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
203 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5941 |
01 Feb 12 |
nicklas |
204 |
<tbl:button |
5941 |
01 Feb 12 |
nicklas |
205 |
image="help.png" |
6262 |
27 Mar 13 |
nicklas |
206 |
subclass="auto-init" |
6262 |
27 Mar 13 |
nicklas |
207 |
data-auto-init="help" |
6262 |
27 Mar 13 |
nicklas |
208 |
data-help-id="reporterclonetemplate.view.properties" |
5941 |
01 Feb 12 |
nicklas |
209 |
title="Help…" |
5941 |
01 Feb 12 |
nicklas |
210 |
tooltip="Get help about this page" |
5941 |
01 Feb 12 |
nicklas |
211 |
/> |
5941 |
01 Feb 12 |
nicklas |
212 |
</tbl:toolbar> |
5941 |
01 Feb 12 |
nicklas |
213 |
</td> |
5941 |
01 Feb 12 |
nicklas |
214 |
</tr> |
5877 |
16 Nov 11 |
nicklas |
215 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
216 |
<th>Name</th> |
5877 |
16 Nov 11 |
nicklas |
217 |
<td><%=HTML.encodeTags(template.getName())%></td> |
5877 |
16 Nov 11 |
nicklas |
218 |
</tr> |
5877 |
16 Nov 11 |
nicklas |
219 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
220 |
<th>Registered</th> |
5877 |
16 Nov 11 |
nicklas |
221 |
<td><%=dateFormatter.format(template.getEntryDate())%></td> |
5877 |
16 Nov 11 |
nicklas |
222 |
</tr> |
5877 |
16 Nov 11 |
nicklas |
223 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
224 |
<th>Locked</th> |
5877 |
16 Nov 11 |
nicklas |
225 |
<td><%=template.isLocked() ? "yes" : "no"%></td> |
5877 |
16 Nov 11 |
nicklas |
226 |
</tr> |
5877 |
16 Nov 11 |
nicklas |
227 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
228 |
<th>Permissions</th> |
5941 |
01 Feb 12 |
nicklas |
229 |
<td><%=PermissionUtil.getFullPermissionNames(template)%></td> |
5941 |
01 Feb 12 |
nicklas |
230 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
231 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
232 |
<th>Owner</th> |
5877 |
16 Nov 11 |
nicklas |
233 |
<td><base:propertyvalue item="<%=template%>" property="owner" /></td> |
5877 |
16 Nov 11 |
nicklas |
234 |
</tr> |
5877 |
16 Nov 11 |
nicklas |
235 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
236 |
<th>Description</th> |
5877 |
16 Nov 11 |
nicklas |
237 |
<td><%=HTML.niceFormat(template.getDescription())%></td> |
5877 |
16 Nov 11 |
nicklas |
238 |
</tr> |
5877 |
16 Nov 11 |
nicklas |
239 |
</table> |
5941 |
01 Feb 12 |
nicklas |
240 |
</div> |
5877 |
16 Nov 11 |
nicklas |
241 |
|
5877 |
16 Nov 11 |
nicklas |
242 |
<% |
5885 |
22 Nov 11 |
nicklas |
243 |
List<ClonableProperty> properties = template.getClonableProperties(); |
5941 |
01 Feb 12 |
nicklas |
244 |
%> |
5941 |
01 Feb 12 |
nicklas |
245 |
<base:section |
5941 |
01 Feb 12 |
nicklas |
246 |
id="properties" |
5941 |
01 Feb 12 |
nicklas |
247 |
title="<%="Cloned properties (" + properties.size() + ")"%>" |
5941 |
01 Feb 12 |
nicklas |
248 |
context="<%=cc%>" |
5941 |
01 Feb 12 |
nicklas |
249 |
> |
5877 |
16 Nov 11 |
nicklas |
250 |
<% |
5941 |
01 Feb 12 |
nicklas |
251 |
if (properties.size() == 0) |
5941 |
01 Feb 12 |
nicklas |
252 |
{ |
5941 |
01 Feb 12 |
nicklas |
253 |
%> |
5941 |
01 Feb 12 |
nicklas |
254 |
<div class="messagecontainer note"> |
5941 |
01 Feb 12 |
nicklas |
255 |
This template doesn't specify any properties to clone. |
5941 |
01 Feb 12 |
nicklas |
256 |
</div> |
5941 |
01 Feb 12 |
nicklas |
257 |
<% |
5941 |
01 Feb 12 |
nicklas |
258 |
} |
5941 |
01 Feb 12 |
nicklas |
259 |
else |
5941 |
01 Feb 12 |
nicklas |
260 |
{ |
5941 |
01 Feb 12 |
nicklas |
261 |
boolean hasNonExistingProperty = false; |
5941 |
01 Feb 12 |
nicklas |
262 |
%> |
5877 |
16 Nov 11 |
nicklas |
263 |
<tbl:table |
6147 |
21 Sep 12 |
nicklas |
264 |
id="tbl.properties" |
5877 |
16 Nov 11 |
nicklas |
265 |
columns="all" |
5877 |
16 Nov 11 |
nicklas |
266 |
> |
5877 |
16 Nov 11 |
nicklas |
267 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
268 |
id="title" |
5877 |
16 Nov 11 |
nicklas |
269 |
title="Property" |
5877 |
16 Nov 11 |
nicklas |
270 |
/> |
5877 |
16 Nov 11 |
nicklas |
271 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
272 |
id="valueType" |
5877 |
16 Nov 11 |
nicklas |
273 |
title="Value type" |
5877 |
16 Nov 11 |
nicklas |
274 |
/> |
5877 |
16 Nov 11 |
nicklas |
275 |
<tbl:columndef |
5877 |
16 Nov 11 |
nicklas |
276 |
id="description" |
5877 |
16 Nov 11 |
nicklas |
277 |
title="Description" |
5877 |
16 Nov 11 |
nicklas |
278 |
/> |
5877 |
16 Nov 11 |
nicklas |
279 |
<tbl:data> |
5941 |
01 Feb 12 |
nicklas |
280 |
<tbl:headers> |
5941 |
01 Feb 12 |
nicklas |
281 |
<tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
282 |
<tbl:columnheaders /> |
5941 |
01 Feb 12 |
nicklas |
283 |
</tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
284 |
</tbl:headers> |
5877 |
16 Nov 11 |
nicklas |
285 |
<tbl:rows> |
5877 |
16 Nov 11 |
nicklas |
286 |
<% |
5885 |
22 Nov 11 |
nicklas |
287 |
for (ClonableProperty property : properties) |
5877 |
16 Nov 11 |
nicklas |
288 |
{ |
5877 |
16 Nov 11 |
nicklas |
289 |
boolean exists = property.exists(); |
5877 |
16 Nov 11 |
nicklas |
290 |
hasNonExistingProperty |= !exists; |
5877 |
16 Nov 11 |
nicklas |
291 |
%> |
5877 |
16 Nov 11 |
nicklas |
292 |
<tbl:row> |
5877 |
16 Nov 11 |
nicklas |
293 |
<tbl:cell column="title"> |
5946 |
03 Feb 12 |
nicklas |
294 |
<base:icon image="warning.png" visible="<%=!exists %>"/> |
5877 |
16 Nov 11 |
nicklas |
295 |
<%=HTML.encodeTags(property.getTitle())%></tbl:cell> |
5877 |
16 Nov 11 |
nicklas |
296 |
<tbl:cell column="description"><%=HTML.encodeTags(property.getDescription())%></tbl:cell> |
5877 |
16 Nov 11 |
nicklas |
297 |
<tbl:cell column="valueType"><%=property.getType() %></tbl:cell> |
5877 |
16 Nov 11 |
nicklas |
298 |
</tbl:row> |
5877 |
16 Nov 11 |
nicklas |
299 |
<% |
5877 |
16 Nov 11 |
nicklas |
300 |
} |
5877 |
16 Nov 11 |
nicklas |
301 |
%> |
5877 |
16 Nov 11 |
nicklas |
302 |
</tbl:rows> |
5877 |
16 Nov 11 |
nicklas |
303 |
</tbl:data> |
5877 |
16 Nov 11 |
nicklas |
304 |
</tbl:table> |
5877 |
16 Nov 11 |
nicklas |
305 |
<% |
5877 |
16 Nov 11 |
nicklas |
306 |
if (hasNonExistingProperty) |
5877 |
16 Nov 11 |
nicklas |
307 |
{ |
5877 |
16 Nov 11 |
nicklas |
308 |
%> |
5946 |
03 Feb 12 |
nicklas |
309 |
<base:icon image="warning.png" /> = This property no longer exists in the main reporter table |
5877 |
16 Nov 11 |
nicklas |
310 |
and will be ignored when cloning |
5877 |
16 Nov 11 |
nicklas |
311 |
<% |
5877 |
16 Nov 11 |
nicklas |
312 |
} |
5941 |
01 Feb 12 |
nicklas |
313 |
} |
5941 |
01 Feb 12 |
nicklas |
314 |
%> |
5941 |
01 Feb 12 |
nicklas |
315 |
</base:section> |
5877 |
16 Nov 11 |
nicklas |
316 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5877 |
16 Nov 11 |
nicklas |
317 |
<jsp:param name="ID" value="<%=ID%>" /> |
5877 |
16 Nov 11 |
nicklas |
318 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5877 |
16 Nov 11 |
nicklas |
319 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5877 |
16 Nov 11 |
nicklas |
320 |
<jsp:param name="title" value="Other items related to this template" /> |
5877 |
16 Nov 11 |
nicklas |
321 |
</jsp:include> |
5941 |
01 Feb 12 |
nicklas |
322 |
<jsp:include page="../../common/share/list_share.jsp"> |
5941 |
01 Feb 12 |
nicklas |
323 |
<jsp:param name="ID" value="<%=ID%>" /> |
5941 |
01 Feb 12 |
nicklas |
324 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5941 |
01 Feb 12 |
nicklas |
325 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5941 |
01 Feb 12 |
nicklas |
326 |
<jsp:param name="title" value="Shared to" /> |
5941 |
01 Feb 12 |
nicklas |
327 |
</jsp:include> |
5877 |
16 Nov 11 |
nicklas |
328 |
</t:tab> |
5877 |
16 Nov 11 |
nicklas |
329 |
|
7166 |
07 Jun 16 |
nicklas |
330 |
<t:tab id="history" title="History" |
7166 |
07 Jun 16 |
nicklas |
331 |
tooltip="Displays a log with the history of this item" |
6262 |
27 Mar 13 |
nicklas |
332 |
visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
6244 |
25 Feb 13 |
nicklas |
333 |
<jsp:include page="../../common/history/frameset.jsp"> |
6244 |
25 Feb 13 |
nicklas |
334 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6244 |
25 Feb 13 |
nicklas |
335 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6244 |
25 Feb 13 |
nicklas |
336 |
<jsp:param name="ID" value="<%=ID%>" /> |
6244 |
25 Feb 13 |
nicklas |
337 |
</jsp:include> |
5877 |
16 Nov 11 |
nicklas |
338 |
</t:tab> |
5877 |
16 Nov 11 |
nicklas |
339 |
</t:tabcontrol> |
5877 |
16 Nov 11 |
nicklas |
340 |
|
5877 |
16 Nov 11 |
nicklas |
341 |
</base:body> |
5877 |
16 Nov 11 |
nicklas |
342 |
</base:page> |
5877 |
16 Nov 11 |
nicklas |
343 |
<% |
5877 |
16 Nov 11 |
nicklas |
344 |
} |
5877 |
16 Nov 11 |
nicklas |
345 |
finally |
5877 |
16 Nov 11 |
nicklas |
346 |
{ |
5877 |
16 Nov 11 |
nicklas |
347 |
if (dc != null) dc.close(); |
5877 |
16 Nov 11 |
nicklas |
348 |
} |
5877 |
16 Nov 11 |
nicklas |
349 |
|
5877 |
16 Nov 11 |
nicklas |
350 |
%> |