6742 |
17 Feb 15 |
nicklas |
1 |
<%-- $Id$ |
6742 |
17 Feb 15 |
nicklas |
2 |
------------------------------------------------------------------ |
6742 |
17 Feb 15 |
nicklas |
Copyright (C) 2015 Nicklas Nordborg |
6742 |
17 Feb 15 |
nicklas |
4 |
|
6742 |
17 Feb 15 |
nicklas |
5 |
This file is part of BASE - BioArray Software Environment. |
6742 |
17 Feb 15 |
nicklas |
6 |
Available at http://base.thep.lu.se/ |
6742 |
17 Feb 15 |
nicklas |
7 |
|
6742 |
17 Feb 15 |
nicklas |
8 |
BASE is free software; you can redistribute it and/or |
6742 |
17 Feb 15 |
nicklas |
9 |
modify it under the terms of the GNU General Public License |
6742 |
17 Feb 15 |
nicklas |
10 |
as published by the Free Software Foundation; either version 3 |
6742 |
17 Feb 15 |
nicklas |
11 |
of the License, or (at your option) any later version. |
6742 |
17 Feb 15 |
nicklas |
12 |
|
6742 |
17 Feb 15 |
nicklas |
13 |
BASE is distributed in the hope that it will be useful, |
6742 |
17 Feb 15 |
nicklas |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
6742 |
17 Feb 15 |
nicklas |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6742 |
17 Feb 15 |
nicklas |
16 |
GNU General Public License for more details. |
6742 |
17 Feb 15 |
nicklas |
17 |
|
6742 |
17 Feb 15 |
nicklas |
18 |
You should have received a copy of the GNU General Public License |
6742 |
17 Feb 15 |
nicklas |
19 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
6742 |
17 Feb 15 |
nicklas |
20 |
------------------------------------------------------------------ |
6742 |
17 Feb 15 |
nicklas |
21 |
|
6742 |
17 Feb 15 |
nicklas |
22 |
@author Nicklas |
6742 |
17 Feb 15 |
nicklas |
23 |
--%> |
6742 |
17 Feb 15 |
nicklas |
24 |
<%@ page pageEncoding="UTF-8" session="false" |
6742 |
17 Feb 15 |
nicklas |
25 |
import="net.sf.basedb.core.SessionControl" |
6742 |
17 Feb 15 |
nicklas |
26 |
import="net.sf.basedb.core.DbControl" |
6742 |
17 Feb 15 |
nicklas |
27 |
import="net.sf.basedb.core.SystemItems" |
6742 |
17 Feb 15 |
nicklas |
28 |
import="net.sf.basedb.core.Group" |
6742 |
17 Feb 15 |
nicklas |
29 |
import="net.sf.basedb.core.Include" |
6742 |
17 Feb 15 |
nicklas |
30 |
import="net.sf.basedb.core.Item" |
6742 |
17 Feb 15 |
nicklas |
31 |
import="net.sf.basedb.core.ItemContext" |
6753 |
20 Feb 15 |
nicklas |
32 |
import="net.sf.basedb.core.RawDataType" |
6742 |
17 Feb 15 |
nicklas |
33 |
import="net.sf.basedb.core.ItemQuery" |
6742 |
17 Feb 15 |
nicklas |
34 |
import="net.sf.basedb.core.ItemResultList" |
6742 |
17 Feb 15 |
nicklas |
35 |
import="net.sf.basedb.core.Permission" |
6742 |
17 Feb 15 |
nicklas |
36 |
import="net.sf.basedb.core.ItemList" |
6768 |
10 Mar 15 |
nicklas |
37 |
import="net.sf.basedb.core.SyncFilter" |
6770 |
13 Mar 15 |
nicklas |
38 |
import="net.sf.basedb.core.SyncFilter.SourceItemTransform" |
6770 |
13 Mar 15 |
nicklas |
39 |
import="net.sf.basedb.core.PropertyFilter" |
6742 |
17 Feb 15 |
nicklas |
40 |
import="net.sf.basedb.core.MultiPermissions" |
6742 |
17 Feb 15 |
nicklas |
41 |
import="net.sf.basedb.core.User" |
6742 |
17 Feb 15 |
nicklas |
42 |
import="net.sf.basedb.core.PermissionDeniedException" |
6742 |
17 Feb 15 |
nicklas |
43 |
import="net.sf.basedb.core.PluginDefinition" |
6742 |
17 Feb 15 |
nicklas |
44 |
import="net.sf.basedb.core.plugin.GuiContext" |
6742 |
17 Feb 15 |
nicklas |
45 |
import="net.sf.basedb.core.plugin.Plugin" |
6742 |
17 Feb 15 |
nicklas |
46 |
import="net.sf.basedb.core.Project" |
6742 |
17 Feb 15 |
nicklas |
47 |
import="net.sf.basedb.core.query.Orders" |
6742 |
17 Feb 15 |
nicklas |
48 |
import="net.sf.basedb.core.query.Hql" |
6742 |
17 Feb 15 |
nicklas |
49 |
import="net.sf.basedb.clients.web.Base" |
6742 |
17 Feb 15 |
nicklas |
50 |
import="net.sf.basedb.clients.web.ChangeHistoryUtil" |
6742 |
17 Feb 15 |
nicklas |
51 |
import="net.sf.basedb.clients.web.PermissionUtil" |
6742 |
17 Feb 15 |
nicklas |
52 |
import="net.sf.basedb.clients.web.util.HTML" |
6742 |
17 Feb 15 |
nicklas |
53 |
import="net.sf.basedb.util.Values" |
6768 |
10 Mar 15 |
nicklas |
54 |
import="net.sf.basedb.util.formatter.Formatter" |
6769 |
11 Mar 15 |
nicklas |
55 |
import="net.sf.basedb.util.formatter.PropertyFilterFormatter" |
6768 |
10 Mar 15 |
nicklas |
56 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
6742 |
17 Feb 15 |
nicklas |
57 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
6742 |
17 Feb 15 |
nicklas |
58 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
6742 |
17 Feb 15 |
nicklas |
59 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
6742 |
17 Feb 15 |
nicklas |
61 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
6742 |
17 Feb 15 |
nicklas |
62 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
6742 |
17 Feb 15 |
nicklas |
63 |
import="java.util.Collections" |
6793 |
24 Mar 15 |
nicklas |
64 |
import="java.util.Collection" |
6742 |
17 Feb 15 |
nicklas |
65 |
import="java.util.Map" |
6742 |
17 Feb 15 |
nicklas |
66 |
import="java.util.Set" |
6770 |
13 Mar 15 |
nicklas |
67 |
import="java.util.List" |
6793 |
24 Mar 15 |
nicklas |
68 |
import="java.util.ArrayList" |
6768 |
10 Mar 15 |
nicklas |
69 |
import="java.util.Date" |
6742 |
17 Feb 15 |
nicklas |
70 |
%> |
6742 |
17 Feb 15 |
nicklas |
71 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
6742 |
17 Feb 15 |
nicklas |
72 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
6742 |
17 Feb 15 |
nicklas |
73 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
6742 |
17 Feb 15 |
nicklas |
74 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
6742 |
17 Feb 15 |
nicklas |
75 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
6742 |
17 Feb 15 |
nicklas |
76 |
<%! |
6742 |
17 Feb 15 |
nicklas |
77 |
private static final Item itemType = Item.ITEMLIST; |
6742 |
17 Feb 15 |
nicklas |
78 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
6742 |
17 Feb 15 |
nicklas |
79 |
%> |
6742 |
17 Feb 15 |
nicklas |
80 |
<% |
6742 |
17 Feb 15 |
nicklas |
81 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
6742 |
17 Feb 15 |
nicklas |
82 |
final String ID = sc.getId(); |
6742 |
17 Feb 15 |
nicklas |
83 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
6742 |
17 Feb 15 |
nicklas |
84 |
final int itemId = cc.getId(); |
6742 |
17 Feb 15 |
nicklas |
85 |
final String tab = Values.getStringOrNull(request.getParameter("tab")); |
6742 |
17 Feb 15 |
nicklas |
86 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
87 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
6742 |
17 Feb 15 |
nicklas |
88 |
try |
6742 |
17 Feb 15 |
nicklas |
89 |
{ |
6742 |
17 Feb 15 |
nicklas |
90 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
6742 |
17 Feb 15 |
nicklas |
91 |
|
6742 |
17 Feb 15 |
nicklas |
92 |
String title = null; |
6742 |
17 Feb 15 |
nicklas |
93 |
ItemList list = ItemList.getById(dc, itemId); |
7883 |
03 Dec 20 |
nicklas |
94 |
boolean listIsInSync = list.isInSync(dc); |
6742 |
17 Feb 15 |
nicklas |
95 |
|
6803 |
25 Mar 15 |
nicklas |
96 |
final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType); |
6742 |
17 Feb 15 |
nicklas |
97 |
final boolean writePermission = list.hasPermission(Permission.WRITE); |
6742 |
17 Feb 15 |
nicklas |
98 |
final boolean deletePermission = list.hasPermission(Permission.DELETE); |
6742 |
17 Feb 15 |
nicklas |
99 |
final boolean sharePermission = list.hasPermission(Permission.SET_PERMISSION); |
6742 |
17 Feb 15 |
nicklas |
100 |
final boolean usePermission = list.hasPermission(Permission.USE); |
6742 |
17 Feb 15 |
nicklas |
101 |
final boolean setOwnerPermission = list.hasPermission(Permission.SET_OWNER); |
6742 |
17 Feb 15 |
nicklas |
102 |
final boolean isRemoved = list.isRemoved(); |
6742 |
17 Feb 15 |
nicklas |
103 |
final boolean isUsed = isRemoved && list.isUsed(); |
6742 |
17 Feb 15 |
nicklas |
104 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
6742 |
17 Feb 15 |
nicklas |
105 |
final boolean isOwner = list.isOwner(); |
6768 |
10 Mar 15 |
nicklas |
106 |
Formatter<Date> timeFormatter = FormatterFactory.getDateTimeFormatter(sc); |
6769 |
11 Mar 15 |
nicklas |
107 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
6742 |
17 Feb 15 |
nicklas |
108 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, list); |
7604 |
25 Feb 19 |
nicklas |
109 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
6770 |
13 Mar 15 |
nicklas |
110 |
|
6770 |
13 Mar 15 |
nicklas |
111 |
ItemQuery<SyncFilter> sfQuery = list.getSyncFilters(); |
6793 |
24 Mar 15 |
nicklas |
112 |
List<SyncFilter> syncFilters = new ArrayList<SyncFilter>(sfQuery.list(dc)); |
6793 |
24 Mar 15 |
nicklas |
113 |
Collections.sort(syncFilters, SyncFilter.compareByChainOrder()); |
7884 |
03 Dec 20 |
nicklas |
114 |
String firstFilterGroup = syncFilters.size() > 0 ? syncFilters.get(0).getFilterGroup() : null; |
7884 |
03 Dec 20 |
nicklas |
115 |
boolean displayFilterGroups = firstFilterGroup != null && !firstFilterGroup.equals(syncFilters.get(syncFilters.size()-1).getFilterGroup()); |
6742 |
17 Feb 15 |
nicklas |
116 |
%> |
6742 |
17 Feb 15 |
nicklas |
117 |
<base:page title="<%=title%>" id="view-page"> |
7564 |
08 Jan 19 |
nicklas |
118 |
<base:head scripts="table.js,tabcontrol-2.js,~lists.js" styles="table.css,toolbar.css,headertabcontrol.css,path.css,~syncfilter/filtertext.css"> |
6742 |
17 Feb 15 |
nicklas |
119 |
<ext:scripts context="<%=jspContext%>" /> |
6742 |
17 Feb 15 |
nicklas |
120 |
<ext:stylesheets context="<%=jspContext%>" /> |
6797 |
24 Mar 15 |
nicklas |
121 |
<style> |
6797 |
24 Mar 15 |
nicklas |
122 |
.not-in-sync |
6797 |
24 Mar 15 |
nicklas |
123 |
{ |
6797 |
24 Mar 15 |
nicklas |
124 |
text-decoration: line-through; |
6797 |
24 Mar 15 |
nicklas |
125 |
display: inline-block; |
6797 |
24 Mar 15 |
nicklas |
126 |
} |
7881 |
01 Dec 20 |
nicklas |
127 |
.filter-group-separator div |
7881 |
01 Dec 20 |
nicklas |
128 |
{ |
7882 |
02 Dec 20 |
nicklas |
129 |
background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) calc(50%), rgba(120,120,120,1) calc(50%), rgba(120,120,120,1) calc(50% + 1px), rgba(0,0,0,0) calc(50% + 1px), rgba(0,0,0,0) 100%); |
7881 |
01 Dec 20 |
nicklas |
130 |
text-align: left; |
7881 |
01 Dec 20 |
nicklas |
131 |
} |
7881 |
01 Dec 20 |
nicklas |
132 |
.filter-group-separator span |
7881 |
01 Dec 20 |
nicklas |
133 |
{ |
7882 |
02 Dec 20 |
nicklas |
134 |
margin-left: 4em; |
7882 |
02 Dec 20 |
nicklas |
135 |
padding: 0 1em; |
7884 |
03 Dec 20 |
nicklas |
136 |
font-style: italic; |
7881 |
01 Dec 20 |
nicklas |
137 |
} |
6797 |
24 Mar 15 |
nicklas |
138 |
</style> |
6742 |
17 Feb 15 |
nicklas |
139 |
</base:head> |
6742 |
17 Feb 15 |
nicklas |
140 |
<base:body> |
6742 |
17 Feb 15 |
nicklas |
141 |
<p:path><p:pathelement |
6742 |
17 Feb 15 |
nicklas |
142 |
title="Item lists" href="<%="index.jsp?ID="+ID%>" |
6742 |
17 Feb 15 |
nicklas |
143 |
/><p:pathelement title="<%=HTML.encodeTags(list.getName())%>" |
6742 |
17 Feb 15 |
nicklas |
144 |
/></p:path> |
6742 |
17 Feb 15 |
nicklas |
145 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
6742 |
17 Feb 15 |
nicklas |
146 |
|
6742 |
17 Feb 15 |
nicklas |
147 |
<t:tabcontrol |
6742 |
17 Feb 15 |
nicklas |
148 |
id="main" |
6742 |
17 Feb 15 |
nicklas |
149 |
subclass="content mastertabcontrol" |
6742 |
17 Feb 15 |
nicklas |
150 |
active="<%=tab%>"> |
6742 |
17 Feb 15 |
nicklas |
151 |
<t:tab id="properties" title="Properties"> |
6742 |
17 Feb 15 |
nicklas |
152 |
<div> |
6742 |
17 Feb 15 |
nicklas |
153 |
<table class="fullform bottomborder"> |
6742 |
17 Feb 15 |
nicklas |
154 |
<tr> |
6742 |
17 Feb 15 |
nicklas |
155 |
<th class="itemstatus"> |
6742 |
17 Feb 15 |
nicklas |
156 |
<base:icon |
6742 |
17 Feb 15 |
nicklas |
157 |
image="shared.png" |
6742 |
17 Feb 15 |
nicklas |
158 |
visible="<%=list.isShared()%>" |
6742 |
17 Feb 15 |
nicklas |
159 |
tooltip="This item is shared to other users, groups and/or projects" |
6742 |
17 Feb 15 |
nicklas |
160 |
/> |
6742 |
17 Feb 15 |
nicklas |
161 |
<base:icon |
6742 |
17 Feb 15 |
nicklas |
162 |
id="btnDeletePermanently" |
6742 |
17 Feb 15 |
nicklas |
163 |
image="deleted.png" |
6742 |
17 Feb 15 |
nicklas |
164 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
6742 |
17 Feb 15 |
nicklas |
165 |
enabled="<%=deletePermanentlyPermission %>" |
6742 |
17 Feb 15 |
nicklas |
166 |
visible="<%=isRemoved%>" |
6742 |
17 Feb 15 |
nicklas |
167 |
/> |
6742 |
17 Feb 15 |
nicklas |
168 |
<base:icon |
6742 |
17 Feb 15 |
nicklas |
169 |
id="btnUsingItems" |
6742 |
17 Feb 15 |
nicklas |
170 |
image="used.png" |
6742 |
17 Feb 15 |
nicklas |
171 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
6742 |
17 Feb 15 |
nicklas |
172 |
visible="<%=isRemoved && isUsed%>" /> |
6742 |
17 Feb 15 |
nicklas |
173 |
</th> |
6742 |
17 Feb 15 |
nicklas |
174 |
<td style="padding: 0px;"> |
6742 |
17 Feb 15 |
nicklas |
175 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
6742 |
17 Feb 15 |
nicklas |
176 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
177 |
id="btnEdit" |
6742 |
17 Feb 15 |
nicklas |
178 |
disabled="<%=!writePermission%>" |
6742 |
17 Feb 15 |
nicklas |
179 |
image="edit.png" |
6742 |
17 Feb 15 |
nicklas |
180 |
title="Edit…" |
6742 |
17 Feb 15 |
nicklas |
181 |
tooltip="<%=writePermission ? "Edit this list" : "You do not have permission to edit this list"%>" |
6742 |
17 Feb 15 |
nicklas |
182 |
/> |
6742 |
17 Feb 15 |
nicklas |
183 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
184 |
id="btnDelete" |
6742 |
17 Feb 15 |
nicklas |
185 |
disabled="<%=!deletePermission%>" |
6742 |
17 Feb 15 |
nicklas |
186 |
image="delete.png" |
6742 |
17 Feb 15 |
nicklas |
187 |
title="Delete" |
6742 |
17 Feb 15 |
nicklas |
188 |
visible="<%=!list.isRemoved()%>" |
6742 |
17 Feb 15 |
nicklas |
189 |
tooltip="<%=deletePermission ? "Delete this list" : "You do not have permission to delete this list"%>" |
6742 |
17 Feb 15 |
nicklas |
190 |
/> |
6742 |
17 Feb 15 |
nicklas |
191 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
192 |
id="btnRestore" |
6742 |
17 Feb 15 |
nicklas |
193 |
disabled="<%=!writePermission%>" |
6742 |
17 Feb 15 |
nicklas |
194 |
image="restore.png" |
6742 |
17 Feb 15 |
nicklas |
195 |
title="Restore" |
6742 |
17 Feb 15 |
nicklas |
196 |
visible="<%=list.isRemoved()%>" |
6742 |
17 Feb 15 |
nicklas |
197 |
tooltip="<%=writePermission ? "Restore this list" : "You do not have permission to restore this list"%>" |
6742 |
17 Feb 15 |
nicklas |
198 |
/> |
6742 |
17 Feb 15 |
nicklas |
199 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
200 |
id="btnShare" |
6742 |
17 Feb 15 |
nicklas |
201 |
disabled="<%=!sharePermission%>" |
6742 |
17 Feb 15 |
nicklas |
202 |
image="share.png" |
6742 |
17 Feb 15 |
nicklas |
203 |
title="Share…" |
6742 |
17 Feb 15 |
nicklas |
204 |
tooltip="<%=sharePermission ? "Share this list to other user, groups and projects" : "You do not have permission to share this list"%>" |
6742 |
17 Feb 15 |
nicklas |
205 |
/> |
6742 |
17 Feb 15 |
nicklas |
206 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
207 |
id="btnSetOwner" |
6742 |
17 Feb 15 |
nicklas |
208 |
disabled="<%=!setOwnerPermission%>" |
6742 |
17 Feb 15 |
nicklas |
209 |
image="take_ownership.png" |
6742 |
17 Feb 15 |
nicklas |
210 |
title="Set owner…" |
6742 |
17 Feb 15 |
nicklas |
211 |
tooltip="<%=setOwnerPermission ? "Change owner of this item" : "You do not have permission to change ownership of this item"%>" |
6742 |
17 Feb 15 |
nicklas |
212 |
/> |
6742 |
17 Feb 15 |
nicklas |
213 |
<tbl:button |
6803 |
25 Mar 15 |
nicklas |
214 |
id="btnCopy" |
6803 |
25 Mar 15 |
nicklas |
215 |
image="copy.png" |
6803 |
25 Mar 15 |
nicklas |
216 |
tooltip="Create a new list using this as a template" |
6803 |
25 Mar 15 |
nicklas |
217 |
subclass="auto-init" |
6803 |
25 Mar 15 |
nicklas |
218 |
data-auto-init="clone" |
6803 |
25 Mar 15 |
nicklas |
219 |
data-item-id="<%=itemId %>" |
6803 |
25 Mar 15 |
nicklas |
220 |
visible="<%=createPermission%>" |
6803 |
25 Mar 15 |
nicklas |
221 |
title="Copy…" |
6803 |
25 Mar 15 |
nicklas |
222 |
/> |
6803 |
25 Mar 15 |
nicklas |
223 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
224 |
id="btnMergeUnion" |
6742 |
17 Feb 15 |
nicklas |
225 |
data-merge-type="union" |
6803 |
25 Mar 15 |
nicklas |
226 |
visible="<%=writePermission && !list.getDisableManualMembers()%>" |
6742 |
17 Feb 15 |
nicklas |
227 |
image="set_operations/union_small.png" |
6742 |
17 Feb 15 |
nicklas |
228 |
title="Union…" |
6742 |
17 Feb 15 |
nicklas |
229 |
tooltip="Add items from other lists to this list" |
6742 |
17 Feb 15 |
nicklas |
230 |
/> |
6742 |
17 Feb 15 |
nicklas |
231 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
232 |
id="btnMergeIntersection" |
6742 |
17 Feb 15 |
nicklas |
233 |
data-merge-type="intersection" |
6803 |
25 Mar 15 |
nicklas |
234 |
visible="<%=writePermission && !list.getDisableManualMembers()%>" |
6742 |
17 Feb 15 |
nicklas |
235 |
image="set_operations/intersection_small.png" |
6742 |
17 Feb 15 |
nicklas |
236 |
title="Intersection…" |
6742 |
17 Feb 15 |
nicklas |
237 |
tooltip="Keep only items that are present in other lists" |
6742 |
17 Feb 15 |
nicklas |
238 |
/> |
6742 |
17 Feb 15 |
nicklas |
239 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
240 |
id="btnMergeComplement" |
6742 |
17 Feb 15 |
nicklas |
241 |
data-merge-type="complement" |
6803 |
25 Mar 15 |
nicklas |
242 |
visible="<%=writePermission && !list.getDisableManualMembers()%>" |
6742 |
17 Feb 15 |
nicklas |
243 |
image="set_operations/complement_small.png" |
6742 |
17 Feb 15 |
nicklas |
244 |
title="Complement…" |
6742 |
17 Feb 15 |
nicklas |
245 |
tooltip="Remove items found in other lists from this list" |
6742 |
17 Feb 15 |
nicklas |
246 |
/> |
6742 |
17 Feb 15 |
nicklas |
247 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
248 |
id="btnImport" |
6742 |
17 Feb 15 |
nicklas |
249 |
image="import.png" |
6742 |
17 Feb 15 |
nicklas |
250 |
data-plugin-type="IMPORT" |
6742 |
17 Feb 15 |
nicklas |
251 |
title="Import…" |
6742 |
17 Feb 15 |
nicklas |
252 |
tooltip="Import data" |
6742 |
17 Feb 15 |
nicklas |
253 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
6742 |
17 Feb 15 |
nicklas |
254 |
/> |
6742 |
17 Feb 15 |
nicklas |
255 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
256 |
id="btnExport" |
6742 |
17 Feb 15 |
nicklas |
257 |
image="export.png" |
6742 |
17 Feb 15 |
nicklas |
258 |
data-plugin-type="EXPORT" |
6742 |
17 Feb 15 |
nicklas |
259 |
title="Export…" |
6742 |
17 Feb 15 |
nicklas |
260 |
tooltip="Export data" |
6742 |
17 Feb 15 |
nicklas |
261 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
6742 |
17 Feb 15 |
nicklas |
262 |
/> |
6742 |
17 Feb 15 |
nicklas |
263 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
264 |
id="btnRunPlugin" |
6742 |
17 Feb 15 |
nicklas |
265 |
image="runplugin.png" |
6742 |
17 Feb 15 |
nicklas |
266 |
data-plugin-type="OTHER" |
6742 |
17 Feb 15 |
nicklas |
267 |
title="Run plugin…" |
6742 |
17 Feb 15 |
nicklas |
268 |
tooltip="Run a plugin" |
6742 |
17 Feb 15 |
nicklas |
269 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
6742 |
17 Feb 15 |
nicklas |
270 |
/> |
6742 |
17 Feb 15 |
nicklas |
271 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
272 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
6742 |
17 Feb 15 |
nicklas |
273 |
<tbl:button |
6742 |
17 Feb 15 |
nicklas |
274 |
image="help.png" |
6742 |
17 Feb 15 |
nicklas |
275 |
subclass="auto-init" |
6742 |
17 Feb 15 |
nicklas |
276 |
data-auto-init="help" |
6742 |
17 Feb 15 |
nicklas |
277 |
data-help-id="itemlist.view.properties" |
6742 |
17 Feb 15 |
nicklas |
278 |
title="Help…" |
6742 |
17 Feb 15 |
nicklas |
279 |
tooltip="Get help about this page" |
6742 |
17 Feb 15 |
nicklas |
280 |
/> |
6742 |
17 Feb 15 |
nicklas |
281 |
</tbl:toolbar> |
6742 |
17 Feb 15 |
nicklas |
282 |
</td> |
6742 |
17 Feb 15 |
nicklas |
283 |
</tr> |
6742 |
17 Feb 15 |
nicklas |
284 |
<tr> |
6742 |
17 Feb 15 |
nicklas |
285 |
<th>Name</th> |
6742 |
17 Feb 15 |
nicklas |
286 |
<td><%=HTML.encodeTags(list.getName())%></td> |
6742 |
17 Feb 15 |
nicklas |
287 |
</tr> |
6742 |
17 Feb 15 |
nicklas |
288 |
<tr> |
6742 |
17 Feb 15 |
nicklas |
289 |
<th>Member type</th> |
6753 |
20 Feb 15 |
nicklas |
290 |
<td><%=list.getMemberType()%> |
6753 |
20 Feb 15 |
nicklas |
291 |
<% |
6753 |
20 Feb 15 |
nicklas |
292 |
if (list.getMemberType() != Item.RAWBIOASSAY) |
6753 |
20 Feb 15 |
nicklas |
293 |
{ |
6753 |
20 Feb 15 |
nicklas |
294 |
%> |
6753 |
20 Feb 15 |
nicklas |
295 |
(<base:propertyvalue item="<%=list%>" property="itemSubtype" nulltext="<i>any</i>"/>) |
6753 |
20 Feb 15 |
nicklas |
296 |
<% |
6753 |
20 Feb 15 |
nicklas |
297 |
} |
6753 |
20 Feb 15 |
nicklas |
298 |
else |
6753 |
20 Feb 15 |
nicklas |
299 |
{ |
6753 |
20 Feb 15 |
nicklas |
300 |
RawDataType rdt = list.getRawDataType(); |
6753 |
20 Feb 15 |
nicklas |
301 |
%> |
6753 |
20 Feb 15 |
nicklas |
302 |
(<%=rdt != null ? HTML.encodeTags(rdt.getName()) : "<i>any</i>"%>) |
6753 |
20 Feb 15 |
nicklas |
303 |
<% |
6753 |
20 Feb 15 |
nicklas |
304 |
} |
6753 |
20 Feb 15 |
nicklas |
305 |
%> |
6753 |
20 Feb 15 |
nicklas |
306 |
</td> |
6742 |
17 Feb 15 |
nicklas |
307 |
</tr> |
6742 |
17 Feb 15 |
nicklas |
308 |
<tr> |
6742 |
17 Feb 15 |
nicklas |
309 |
<th>Size</th> |
6742 |
17 Feb 15 |
nicklas |
310 |
<td><%=list.getSize()%></td> |
6742 |
17 Feb 15 |
nicklas |
311 |
</tr> |
6768 |
10 Mar 15 |
nicklas |
312 |
<tr> |
6786 |
19 Mar 15 |
nicklas |
313 |
<th>Modify members</th> |
6786 |
19 Mar 15 |
nicklas |
314 |
<td></td> |
6786 |
19 Mar 15 |
nicklas |
315 |
</tr> |
6786 |
19 Mar 15 |
nicklas |
316 |
<tr> |
6786 |
19 Mar 15 |
nicklas |
317 |
<th class="subprompt">Manual</th> |
6786 |
19 Mar 15 |
nicklas |
318 |
<td><%=list.getDisableManualMembers() ? "Disabled" : "Allowed" %></td> |
6786 |
19 Mar 15 |
nicklas |
319 |
</tr> |
6786 |
19 Mar 15 |
nicklas |
320 |
<tr> |
6786 |
19 Mar 15 |
nicklas |
321 |
<th class="subprompt">Sync filters</th> |
6786 |
19 Mar 15 |
nicklas |
322 |
<td><%=list.getDisableSyncFilters() ? "Disabled" : "Allowed" %></td> |
6786 |
19 Mar 15 |
nicklas |
323 |
</tr> |
6786 |
19 Mar 15 |
nicklas |
324 |
<tr> |
6771 |
16 Mar 15 |
nicklas |
325 |
<th>Last sync</th> |
6797 |
24 Mar 15 |
nicklas |
326 |
<td> |
7883 |
03 Dec 20 |
nicklas |
327 |
<%=list.getSyncDate() == null ? "<i>never</i>" : timeFormatter.format(list.getSyncDate())%>; |
7883 |
03 Dec 20 |
nicklas |
328 |
<% |
7883 |
03 Dec 20 |
nicklas |
329 |
if (list.getSizeAtLastSync() >= 0) |
7883 |
03 Dec 20 |
nicklas |
330 |
{ |
7883 |
03 Dec 20 |
nicklas |
331 |
%> |
7883 |
03 Dec 20 |
nicklas |
332 |
<%=list.getSizeAtLastSync()%> members; |
7883 |
03 Dec 20 |
nicklas |
333 |
<% |
7883 |
03 Dec 20 |
nicklas |
334 |
} |
7883 |
03 Dec 20 |
nicklas |
335 |
%> |
6797 |
24 Mar 15 |
nicklas |
336 |
<span id="not-insync-warning" style="display: none;"> |
6797 |
24 Mar 15 |
nicklas |
337 |
<i><base:icon image="warning.png" /> List appears to be out of sync with filters</i> |
6797 |
24 Mar 15 |
nicklas |
338 |
</span> |
6797 |
24 Mar 15 |
nicklas |
339 |
<span id="insync-info" style="display: none;"> |
6797 |
24 Mar 15 |
nicklas |
340 |
<i><base:icon image="ok.png" /> List appears to be in sync with filters</i> |
6797 |
24 Mar 15 |
nicklas |
341 |
</span> |
6797 |
24 Mar 15 |
nicklas |
342 |
</td> |
6771 |
16 Mar 15 |
nicklas |
343 |
</tr> |
6771 |
16 Mar 15 |
nicklas |
344 |
<tr> |
6742 |
17 Feb 15 |
nicklas |
345 |
<th>External ID</th> |
6742 |
17 Feb 15 |
nicklas |
346 |
<td><%=HTML.encodeTags(list.getExternalId())%></td> |
6742 |
17 Feb 15 |
nicklas |
347 |
</tr> |
6742 |
17 Feb 15 |
nicklas |
348 |
<tr> |
6742 |
17 Feb 15 |
nicklas |
349 |
<th>Owner</th> |
6742 |
17 Feb 15 |
nicklas |
350 |
<td><base:propertyvalue item="<%=list%>" property="owner"/></td> |
6742 |
17 Feb 15 |
nicklas |
351 |
</tr> |
6742 |
17 Feb 15 |
nicklas |
352 |
<tr> |
6742 |
17 Feb 15 |
nicklas |
353 |
<th>Permissions</th> |
6742 |
17 Feb 15 |
nicklas |
354 |
<td><%=PermissionUtil.getFullPermissionNames(list)%></td> |
6742 |
17 Feb 15 |
nicklas |
355 |
</tr> |
6742 |
17 Feb 15 |
nicklas |
356 |
<tr> |
6742 |
17 Feb 15 |
nicklas |
357 |
<th>Description</th> |
6742 |
17 Feb 15 |
nicklas |
358 |
<td><%=HTML.niceFormat(list.getDescription())%></td> |
6742 |
17 Feb 15 |
nicklas |
359 |
</tr> |
6742 |
17 Feb 15 |
nicklas |
360 |
</table> |
6742 |
17 Feb 15 |
nicklas |
361 |
</div> |
6770 |
13 Mar 15 |
nicklas |
362 |
|
6770 |
13 Mar 15 |
nicklas |
363 |
<base:section |
6770 |
13 Mar 15 |
nicklas |
364 |
id="syncFilters" |
6770 |
13 Mar 15 |
nicklas |
365 |
title="<%="Synchronization filters (" + syncFilters.size() +")"%>" |
6770 |
13 Mar 15 |
nicklas |
366 |
context="<%=cc%>" |
6770 |
13 Mar 15 |
nicklas |
367 |
> |
6770 |
13 Mar 15 |
nicklas |
368 |
<tbl:table |
6770 |
13 Mar 15 |
nicklas |
369 |
id="tbl.syncFilters" |
6770 |
13 Mar 15 |
nicklas |
370 |
columns="all" |
6770 |
13 Mar 15 |
nicklas |
371 |
item="SYNCFILTER" |
6770 |
13 Mar 15 |
nicklas |
372 |
action="syncfilter/index.jsp" |
7794 |
03 Mar 20 |
nicklas |
373 |
dragcolumns="<%=false%>" |
6770 |
13 Mar 15 |
nicklas |
374 |
> |
6770 |
13 Mar 15 |
nicklas |
375 |
<tbl:hidden name="list_id" value="<%=Integer.toString(itemId) %>" /> |
6770 |
13 Mar 15 |
nicklas |
376 |
<tbl:columndef |
6770 |
13 Mar 15 |
nicklas |
377 |
id="name" |
6770 |
13 Mar 15 |
nicklas |
378 |
title="Name" |
6770 |
13 Mar 15 |
nicklas |
379 |
/> |
6772 |
16 Mar 15 |
nicklas |
380 |
<tbl:columndef |
6772 |
16 Mar 15 |
nicklas |
381 |
id="inSync" |
6816 |
31 Mar 15 |
nicklas |
382 |
title="In sync/enabled" |
6772 |
16 Mar 15 |
nicklas |
383 |
/> |
6770 |
13 Mar 15 |
nicklas |
384 |
<tbl:columndef |
6770 |
13 Mar 15 |
nicklas |
385 |
id="sourceItems" |
6770 |
13 Mar 15 |
nicklas |
386 |
title="List members" |
6770 |
13 Mar 15 |
nicklas |
387 |
/> |
6770 |
13 Mar 15 |
nicklas |
388 |
<tbl:columndef |
6770 |
13 Mar 15 |
nicklas |
389 |
id="filter" |
6770 |
13 Mar 15 |
nicklas |
390 |
title="Filter" |
6770 |
13 Mar 15 |
nicklas |
391 |
/> |
6770 |
13 Mar 15 |
nicklas |
392 |
<tbl:columndef |
6770 |
13 Mar 15 |
nicklas |
393 |
id="matching" |
6797 |
24 Mar 15 |
nicklas |
394 |
title="Matching items" |
6770 |
13 Mar 15 |
nicklas |
395 |
/> |
6770 |
13 Mar 15 |
nicklas |
396 |
<tbl:columndef |
6770 |
13 Mar 15 |
nicklas |
397 |
id="description" |
6770 |
13 Mar 15 |
nicklas |
398 |
title="Description" |
6770 |
13 Mar 15 |
nicklas |
399 |
/> |
6770 |
13 Mar 15 |
nicklas |
400 |
<tbl:toolbar subclass="topborder leftborder rightborder bg-filled-50"> |
6816 |
31 Mar 15 |
nicklas |
401 |
<tbl:button |
6816 |
31 Mar 15 |
nicklas |
402 |
id="btnResync" |
6816 |
31 Mar 15 |
nicklas |
403 |
image="resync.png" |
6816 |
31 Mar 15 |
nicklas |
404 |
disabled="<%=!writePermission || syncFilters.size() == 0 || list.getDisableSyncFilters() %>" |
6816 |
31 Mar 15 |
nicklas |
405 |
tooltip="Re-sync the list with all enabled filters" |
6816 |
31 Mar 15 |
nicklas |
406 |
title="Re-sync…" |
6816 |
31 Mar 15 |
nicklas |
407 |
/> |
6770 |
13 Mar 15 |
nicklas |
408 |
<tbl:button |
6770 |
13 Mar 15 |
nicklas |
409 |
id="btnAddSyncFilter" |
6770 |
13 Mar 15 |
nicklas |
410 |
image="add.png" |
6770 |
13 Mar 15 |
nicklas |
411 |
disabled="<%=!writePermission%>" |
6770 |
13 Mar 15 |
nicklas |
412 |
tooltip="<%=writePermission ? "Add new filter" : "You do not have permission to modify the filters"%>" |
7884 |
03 Dec 20 |
nicklas |
413 |
data-filter-group="<%=firstFilterGroup %>" |
6770 |
13 Mar 15 |
nicklas |
414 |
title="Add filter…" |
6770 |
13 Mar 15 |
nicklas |
415 |
/> |
6770 |
13 Mar 15 |
nicklas |
416 |
<tbl:button |
6770 |
13 Mar 15 |
nicklas |
417 |
id="btnRemoveSyncFilter" |
6770 |
13 Mar 15 |
nicklas |
418 |
image="delete_permanently.png" |
6770 |
13 Mar 15 |
nicklas |
419 |
disabled="<%=!writePermission%>" |
6770 |
13 Mar 15 |
nicklas |
420 |
tooltip="<%=writePermission ? "Remove the selected filters" : "You do not have permission to modify the filters"%>" |
6770 |
13 Mar 15 |
nicklas |
421 |
title="Remove…" |
6770 |
13 Mar 15 |
nicklas |
422 |
/> |
6771 |
16 Mar 15 |
nicklas |
423 |
<tbl:button |
6794 |
24 Mar 15 |
nicklas |
424 |
id="btnEnable" |
6794 |
24 Mar 15 |
nicklas |
425 |
image="start.png" |
6794 |
24 Mar 15 |
nicklas |
426 |
disabled="<%=!writePermission%>" |
6794 |
24 Mar 15 |
nicklas |
427 |
tooltip="<%=writePermission ? "Enable the selected filters" : "You do not have permission to modify the filters"%>" |
6794 |
24 Mar 15 |
nicklas |
428 |
title="Enable" |
6794 |
24 Mar 15 |
nicklas |
429 |
/> |
6794 |
24 Mar 15 |
nicklas |
430 |
<tbl:button |
6794 |
24 Mar 15 |
nicklas |
431 |
id="btnDisable" |
6794 |
24 Mar 15 |
nicklas |
432 |
image="pause.png" |
6794 |
24 Mar 15 |
nicklas |
433 |
disabled="<%=!writePermission%>" |
6794 |
24 Mar 15 |
nicklas |
434 |
tooltip="<%=writePermission ? "Disable the selected filters" : "You do not have permission to modify the filters"%>" |
6794 |
24 Mar 15 |
nicklas |
435 |
title="Disable" |
6794 |
24 Mar 15 |
nicklas |
436 |
/> |
6770 |
13 Mar 15 |
nicklas |
437 |
</tbl:toolbar> |
6770 |
13 Mar 15 |
nicklas |
438 |
<tbl:data> |
6797 |
24 Mar 15 |
nicklas |
439 |
<tbl:headers style="<%=syncFilters.size() == 0 ? "display: none;" : "" %>"> |
6770 |
13 Mar 15 |
nicklas |
440 |
<tbl:headerrow> |
6770 |
13 Mar 15 |
nicklas |
441 |
<tbl:header subclass="index" /> |
6770 |
13 Mar 15 |
nicklas |
442 |
<tbl:header |
6770 |
13 Mar 15 |
nicklas |
443 |
subclass="check" |
6770 |
13 Mar 15 |
nicklas |
444 |
><base:icon |
6834 |
08 Apr 15 |
nicklas |
445 |
subclass="link table-check" |
6770 |
13 Mar 15 |
nicklas |
446 |
image="check_uncheck.png" |
6834 |
08 Apr 15 |
nicklas |
447 |
tooltip="Toggle all (use CTRL, ALT or SHIFT to check/uncheck)" |
6770 |
13 Mar 15 |
nicklas |
448 |
/></tbl:header> |
6770 |
13 Mar 15 |
nicklas |
449 |
<tbl:columnheaders /> |
6770 |
13 Mar 15 |
nicklas |
450 |
</tbl:headerrow> |
6770 |
13 Mar 15 |
nicklas |
451 |
</tbl:headers> |
6770 |
13 Mar 15 |
nicklas |
452 |
<tbl:rows> |
6770 |
13 Mar 15 |
nicklas |
453 |
<% |
6770 |
13 Mar 15 |
nicklas |
454 |
int index = 0; |
7564 |
08 Jan 19 |
nicklas |
455 |
Formatter<PropertyFilter> filterFormatter = new PropertyFilterFormatter(dc, dateFormatter, true); |
7881 |
01 Dec 20 |
nicklas |
456 |
String lastFilterGroup = null; |
6770 |
13 Mar 15 |
nicklas |
457 |
for (SyncFilter sf : syncFilters) |
6770 |
13 Mar 15 |
nicklas |
458 |
{ |
6770 |
13 Mar 15 |
nicklas |
459 |
index++; |
6770 |
13 Mar 15 |
nicklas |
460 |
String name = HTML.encodeTags(sf.getName()); |
6770 |
13 Mar 15 |
nicklas |
461 |
int filterId = sf.getId(); |
6770 |
13 Mar 15 |
nicklas |
462 |
SourceItemTransform transform = sf.getSourceItemTransformation(); |
6793 |
24 Mar 15 |
nicklas |
463 |
|
7564 |
08 Jan 19 |
nicklas |
464 |
boolean disabled = sf.isDisabled(); |
7564 |
08 Jan 19 |
nicklas |
465 |
boolean inSync = false; |
7564 |
08 Jan 19 |
nicklas |
466 |
Throwable syncException = null; |
7564 |
08 Jan 19 |
nicklas |
467 |
int currentMatching = 0; |
7564 |
08 Jan 19 |
nicklas |
468 |
String filterString = ""; |
7564 |
08 Jan 19 |
nicklas |
469 |
try |
6770 |
13 Mar 15 |
nicklas |
470 |
{ |
7564 |
08 Jan 19 |
nicklas |
471 |
StringBuilder sb = new StringBuilder(); |
7564 |
08 Jan 19 |
nicklas |
472 |
for (int filterRow = 0; filterRow < sf.getFilterRows(); filterRow++) |
7564 |
08 Jan 19 |
nicklas |
473 |
{ |
7564 |
08 Jan 19 |
nicklas |
474 |
sb.append(filterRow > 0 ? "\n<operator>OR</operator> " : ""); |
7564 |
08 Jan 19 |
nicklas |
475 |
List<String> filters = SyncFilter.getFormattedAndSortedFilters(sf.getPropertyFilters(filterRow), filterFormatter); |
7564 |
08 Jan 19 |
nicklas |
476 |
sb.append(Values.getString(filters, "\n <operator>AND</operator> ", true)); |
7564 |
08 Jan 19 |
nicklas |
477 |
} |
7564 |
08 Jan 19 |
nicklas |
478 |
filterString = sb.toString(); |
7564 |
08 Jan 19 |
nicklas |
479 |
|
7564 |
08 Jan 19 |
nicklas |
480 |
if (!disabled) |
7564 |
08 Jan 19 |
nicklas |
481 |
{ |
7564 |
08 Jan 19 |
nicklas |
482 |
inSync = sf.isInSync(dc); |
7564 |
08 Jan 19 |
nicklas |
483 |
currentMatching = sf.getCurrentMatchingSource(dc); |
7564 |
08 Jan 19 |
nicklas |
484 |
listIsInSync &= inSync; |
7564 |
08 Jan 19 |
nicklas |
485 |
} |
6770 |
13 Mar 15 |
nicklas |
486 |
} |
7564 |
08 Jan 19 |
nicklas |
487 |
catch (Throwable t) |
7564 |
08 Jan 19 |
nicklas |
488 |
{ |
7564 |
08 Jan 19 |
nicklas |
489 |
syncException = t; |
7564 |
08 Jan 19 |
nicklas |
490 |
listIsInSync = false; |
7564 |
08 Jan 19 |
nicklas |
491 |
} |
6797 |
24 Mar 15 |
nicklas |
492 |
int lastSyncMatchingSource = sf.getLastSyncMatchingSource(); |
6797 |
24 Mar 15 |
nicklas |
493 |
int lastSyncMatchingTransformed = sf.getLastSyncMatchingTransformed(); |
7881 |
01 Dec 20 |
nicklas |
494 |
if (displayFilterGroups && !sf.getFilterGroup().equals(lastFilterGroup)) |
7881 |
01 Dec 20 |
nicklas |
495 |
{ |
7884 |
03 Dec 20 |
nicklas |
496 |
String filterOp = sf.getFilterGroup().endsWith("+") ? "Include" : "Exclude"; |
7884 |
03 Dec 20 |
nicklas |
497 |
if (writePermission && lastFilterGroup != null) |
7884 |
03 Dec 20 |
nicklas |
498 |
{ |
7884 |
03 Dec 20 |
nicklas |
499 |
%> |
7884 |
03 Dec 20 |
nicklas |
500 |
<tbl:row highlight=""> |
7884 |
03 Dec 20 |
nicklas |
501 |
<tbl:header colspan="2" /> |
7884 |
03 Dec 20 |
nicklas |
502 |
<tbl:cell column="name"> |
7884 |
03 Dec 20 |
nicklas |
503 |
<base:icon |
7884 |
03 Dec 20 |
nicklas |
504 |
image="add.png" |
7884 |
03 Dec 20 |
nicklas |
505 |
subclass="auto-init link" |
7884 |
03 Dec 20 |
nicklas |
506 |
data-auto-init="new-sync-filter" |
7884 |
03 Dec 20 |
nicklas |
507 |
data-filter-group="<%=lastFilterGroup %>" |
7884 |
03 Dec 20 |
nicklas |
508 |
tooltip="<%="Add new filter to the " + lastFilterGroup + " group"%>" |
7884 |
03 Dec 20 |
nicklas |
509 |
/> |
7884 |
03 Dec 20 |
nicklas |
510 |
</tbl:cell> |
7884 |
03 Dec 20 |
nicklas |
511 |
</tbl:row> |
7884 |
03 Dec 20 |
nicklas |
512 |
<% |
7884 |
03 Dec 20 |
nicklas |
513 |
} |
7881 |
01 Dec 20 |
nicklas |
514 |
lastFilterGroup = sf.getFilterGroup(); |
7881 |
01 Dec 20 |
nicklas |
515 |
%> |
7881 |
01 Dec 20 |
nicklas |
516 |
<tbl:headerrow subclass="bg-filled-100 filter-group-separator"> |
7884 |
03 Dec 20 |
nicklas |
517 |
<tbl:header colspan="8"> |
7882 |
02 Dec 20 |
nicklas |
518 |
<div><span class="bg-filled-100"><%=filterOp%> › <%=lastFilterGroup%></span></div> |
7881 |
01 Dec 20 |
nicklas |
519 |
</tbl:header> |
7881 |
01 Dec 20 |
nicklas |
520 |
</tbl:headerrow> |
7881 |
01 Dec 20 |
nicklas |
521 |
<% |
7881 |
01 Dec 20 |
nicklas |
522 |
} |
6770 |
13 Mar 15 |
nicklas |
523 |
%> |
6770 |
13 Mar 15 |
nicklas |
524 |
<tbl:row> |
6770 |
13 Mar 15 |
nicklas |
525 |
<tbl:header |
6770 |
13 Mar 15 |
nicklas |
526 |
clazz="index" |
6770 |
13 Mar 15 |
nicklas |
527 |
><%=index%></tbl:header> |
6770 |
13 Mar 15 |
nicklas |
528 |
<tbl:header |
6770 |
13 Mar 15 |
nicklas |
529 |
clazz="check" |
6770 |
13 Mar 15 |
nicklas |
530 |
><input |
6770 |
13 Mar 15 |
nicklas |
531 |
type="checkbox" |
6770 |
13 Mar 15 |
nicklas |
532 |
name="<%=filterId%>" |
6770 |
13 Mar 15 |
nicklas |
533 |
value="<%=filterId%>" |
6770 |
13 Mar 15 |
nicklas |
534 |
title="<%=name%>" |
6770 |
13 Mar 15 |
nicklas |
535 |
></tbl:header> |
6770 |
13 Mar 15 |
nicklas |
536 |
<tbl:cell column="name"><div |
6785 |
19 Mar 15 |
nicklas |
537 |
class="<%=writePermission ? "link table-item" : ""%>" |
6770 |
13 Mar 15 |
nicklas |
538 |
data-item-id="<%=filterId%>" |
6770 |
13 Mar 15 |
nicklas |
539 |
data-no-edit="<%=writePermission ? 0 : 1 %>" |
6770 |
13 Mar 15 |
nicklas |
540 |
data-extra-url="&list_id=<%=itemId%>" |
6770 |
13 Mar 15 |
nicklas |
541 |
tabindex="0" |
6770 |
13 Mar 15 |
nicklas |
542 |
title=""><%=name%></div></tbl:cell> |
6770 |
13 Mar 15 |
nicklas |
543 |
<tbl:cell column="sourceItems"> |
6770 |
13 Mar 15 |
nicklas |
544 |
<% |
6770 |
13 Mar 15 |
nicklas |
545 |
if (transform == SourceItemTransform.NONE) |
6770 |
13 Mar 15 |
nicklas |
546 |
{ |
6770 |
13 Mar 15 |
nicklas |
547 |
%> |
6814 |
31 Mar 15 |
nicklas |
548 |
<i><%=sf.getSourceItemType().toString() %></i> must match filter |
6770 |
13 Mar 15 |
nicklas |
549 |
<% |
6770 |
13 Mar 15 |
nicklas |
550 |
} |
6770 |
13 Mar 15 |
nicklas |
551 |
else |
6770 |
13 Mar 15 |
nicklas |
552 |
{ |
6770 |
13 Mar 15 |
nicklas |
553 |
%> |
6770 |
13 Mar 15 |
nicklas |
554 |
<%=transform == SourceItemTransform.PARENT_TO_CHILD ? "Parent" : "Child" %> |
6793 |
24 Mar 15 |
nicklas |
555 |
<i><%=sf.getSourceItemType().toString() %></i> |
6787 |
19 Mar 15 |
nicklas |
556 |
that matches filter |
6793 |
24 Mar 15 |
nicklas |
557 |
<i><%=sf.getSourceItemMustExist() ? "must exist" : "must not exist" %></i> |
6770 |
13 Mar 15 |
nicklas |
558 |
<% |
6770 |
13 Mar 15 |
nicklas |
559 |
} |
6770 |
13 Mar 15 |
nicklas |
560 |
%> |
6770 |
13 Mar 15 |
nicklas |
561 |
</tbl:cell> |
6785 |
19 Mar 15 |
nicklas |
562 |
<tbl:cell column="filter"> |
6817 |
31 Mar 15 |
nicklas |
563 |
<base:icon |
6817 |
31 Mar 15 |
nicklas |
564 |
subclass="link auto-init" |
6817 |
31 Mar 15 |
nicklas |
565 |
data-auto-init="sync-filter-view" |
6817 |
31 Mar 15 |
nicklas |
566 |
data-syncfilter-id="<%=filterId%>" |
6817 |
31 Mar 15 |
nicklas |
567 |
data-source-item-type="<%=sf.getSourceItemType().name()%>" |
6817 |
31 Mar 15 |
nicklas |
568 |
image="table_go.png" |
6817 |
31 Mar 15 |
nicklas |
569 |
tooltip="Go to list view with this filter enabled" |
6817 |
31 Mar 15 |
nicklas |
570 |
style="float: right; margin-left: 4px;" |
6817 |
31 Mar 15 |
nicklas |
571 |
/> |
6785 |
19 Mar 15 |
nicklas |
572 |
<% |
6785 |
19 Mar 15 |
nicklas |
573 |
if (writePermission) |
6785 |
19 Mar 15 |
nicklas |
574 |
{ |
6785 |
19 Mar 15 |
nicklas |
575 |
%> |
6785 |
19 Mar 15 |
nicklas |
576 |
<base:icon |
6785 |
19 Mar 15 |
nicklas |
577 |
subclass="link auto-init" |
6785 |
19 Mar 15 |
nicklas |
578 |
data-auto-init="sync-filter-edit" |
6785 |
19 Mar 15 |
nicklas |
579 |
data-syncfilter-id="<%=filterId%>" |
6785 |
19 Mar 15 |
nicklas |
580 |
data-source-item-type="<%=sf.getSourceItemType().name()%>" |
6785 |
19 Mar 15 |
nicklas |
581 |
image="edit.png" |
6785 |
19 Mar 15 |
nicklas |
582 |
tooltip="Modify this filter" |
6785 |
19 Mar 15 |
nicklas |
583 |
style="float: right;" |
6785 |
19 Mar 15 |
nicklas |
584 |
/> |
6785 |
19 Mar 15 |
nicklas |
585 |
<% |
6785 |
19 Mar 15 |
nicklas |
586 |
} |
6785 |
19 Mar 15 |
nicklas |
587 |
%> |
7889 |
04 Dec 20 |
nicklas |
588 |
<pre class="filtertext" id="syncfilter.<%=filterId%>"><%=HTML.encodeTags(filterString, "value|name|operator|function|missing")%></pre></tbl:cell> |
6772 |
16 Mar 15 |
nicklas |
589 |
<tbl:cell column="inSync"> |
6772 |
16 Mar 15 |
nicklas |
590 |
<base:icon |
6797 |
24 Mar 15 |
nicklas |
591 |
image="<%=disabled ? "pause.png" : (inSync ? "ok.png" : "warning.png")%>" style="padding-right: 4px;" |
6794 |
24 Mar 15 |
nicklas |
592 |
subclass="<%=disabled ? "interactable disabled" : "" %>" |
6794 |
24 Mar 15 |
nicklas |
593 |
/><%=disabled ? "Disabled" : (inSync ? (transform == SourceItemTransform.NONE ? "Yes" : "Yes¹") : "No")%> |
6772 |
16 Mar 15 |
nicklas |
594 |
</tbl:cell> |
6772 |
16 Mar 15 |
nicklas |
595 |
<tbl:cell column="matching"> |
7564 |
08 Jan 19 |
nicklas |
596 |
<% |
7564 |
08 Jan 19 |
nicklas |
597 |
if (syncException != null) |
7564 |
08 Jan 19 |
nicklas |
598 |
{ |
7564 |
08 Jan 19 |
nicklas |
599 |
%> |
7564 |
08 Jan 19 |
nicklas |
600 |
<div class="messagecontainer error"><%=HTML.encodeTags(syncException.getMessage())%></div> |
6797 |
24 Mar 15 |
nicklas |
601 |
<% |
7564 |
08 Jan 19 |
nicklas |
602 |
} |
7564 |
08 Jan 19 |
nicklas |
603 |
else |
7564 |
08 Jan 19 |
nicklas |
604 |
{ |
7564 |
08 Jan 19 |
nicklas |
605 |
%> |
7564 |
08 Jan 19 |
nicklas |
606 |
<span class="<%=!inSync ? "not-in-sync" : "" %>"> |
7564 |
08 Jan 19 |
nicklas |
607 |
<%=lastSyncMatchingSource == -1 ? "?" : lastSyncMatchingSource%> |
7564 |
08 Jan 19 |
nicklas |
608 |
<span class="itemsubtype">(<%=sf.getSourceItemType() %>)</span> |
7564 |
08 Jan 19 |
nicklas |
609 |
<% |
7564 |
08 Jan 19 |
nicklas |
610 |
if (transform != SourceItemTransform.NONE) |
7564 |
08 Jan 19 |
nicklas |
611 |
{ |
7564 |
08 Jan 19 |
nicklas |
612 |
%> |
7564 |
08 Jan 19 |
nicklas |
613 |
› <%=lastSyncMatchingTransformed == -1 ? "?" : lastSyncMatchingTransformed%> |
7564 |
08 Jan 19 |
nicklas |
614 |
<span class="itemsubtype">(<%=list.getMemberType() %>)</span> |
7564 |
08 Jan 19 |
nicklas |
615 |
<% |
7564 |
08 Jan 19 |
nicklas |
616 |
} |
7564 |
08 Jan 19 |
nicklas |
617 |
%> |
7564 |
08 Jan 19 |
nicklas |
618 |
</span> |
7564 |
08 Jan 19 |
nicklas |
619 |
<% |
7564 |
08 Jan 19 |
nicklas |
620 |
if (!inSync && !disabled) |
6797 |
24 Mar 15 |
nicklas |
621 |
{ |
6797 |
24 Mar 15 |
nicklas |
622 |
%> |
7564 |
08 Jan 19 |
nicklas |
623 |
(<%=currentMatching%> › ?) |
6797 |
24 Mar 15 |
nicklas |
624 |
<% |
6797 |
24 Mar 15 |
nicklas |
625 |
} |
6772 |
16 Mar 15 |
nicklas |
626 |
} |
6772 |
16 Mar 15 |
nicklas |
627 |
%> |
6772 |
16 Mar 15 |
nicklas |
628 |
</tbl:cell> |
6770 |
13 Mar 15 |
nicklas |
629 |
<tbl:cell column="description"><%=HTML.niceFormat(sf.getDescription())%></tbl:cell> |
6770 |
13 Mar 15 |
nicklas |
630 |
</tbl:row> |
6770 |
13 Mar 15 |
nicklas |
631 |
<% |
6770 |
13 Mar 15 |
nicklas |
632 |
} |
7884 |
03 Dec 20 |
nicklas |
633 |
if (writePermission && lastFilterGroup != null) |
7884 |
03 Dec 20 |
nicklas |
634 |
{ |
7884 |
03 Dec 20 |
nicklas |
635 |
%> |
7884 |
03 Dec 20 |
nicklas |
636 |
<tbl:row highlight=""> |
7884 |
03 Dec 20 |
nicklas |
637 |
<tbl:header colspan="2" /> |
7884 |
03 Dec 20 |
nicklas |
638 |
<tbl:cell column="name"> |
7884 |
03 Dec 20 |
nicklas |
639 |
<base:icon |
7884 |
03 Dec 20 |
nicklas |
640 |
image="add.png" |
7884 |
03 Dec 20 |
nicklas |
641 |
subclass="auto-init link" |
7884 |
03 Dec 20 |
nicklas |
642 |
data-auto-init="new-sync-filter" |
7884 |
03 Dec 20 |
nicklas |
643 |
data-filter-group="<%=lastFilterGroup %>" |
7884 |
03 Dec 20 |
nicklas |
644 |
tooltip="<%="Add new filter to the " + lastFilterGroup + " group"%>" |
7884 |
03 Dec 20 |
nicklas |
645 |
/> |
7884 |
03 Dec 20 |
nicklas |
646 |
</tbl:cell> |
7884 |
03 Dec 20 |
nicklas |
647 |
</tbl:row> |
7884 |
03 Dec 20 |
nicklas |
648 |
<% |
7884 |
03 Dec 20 |
nicklas |
649 |
} |
6770 |
13 Mar 15 |
nicklas |
650 |
if (index == 0) |
6770 |
13 Mar 15 |
nicklas |
651 |
{ |
6770 |
13 Mar 15 |
nicklas |
652 |
%> |
6770 |
13 Mar 15 |
nicklas |
653 |
<tbl:panel> |
6770 |
13 Mar 15 |
nicklas |
654 |
There are no synchronization filters for this list. |
6770 |
13 Mar 15 |
nicklas |
655 |
</tbl:panel> |
6770 |
13 Mar 15 |
nicklas |
656 |
<% |
6770 |
13 Mar 15 |
nicklas |
657 |
} |
6770 |
13 Mar 15 |
nicklas |
658 |
%> |
6770 |
13 Mar 15 |
nicklas |
659 |
</tbl:rows> |
6770 |
13 Mar 15 |
nicklas |
660 |
</tbl:data> |
6770 |
13 Mar 15 |
nicklas |
661 |
</tbl:table> |
6772 |
16 Mar 15 |
nicklas |
662 |
<% |
6772 |
16 Mar 15 |
nicklas |
663 |
if (syncFilters.size() > 0) |
6772 |
16 Mar 15 |
nicklas |
664 |
{ |
6772 |
16 Mar 15 |
nicklas |
665 |
%> |
6772 |
16 Mar 15 |
nicklas |
666 |
¹ Changes in parent/child relationship are not checked! |
6772 |
16 Mar 15 |
nicklas |
667 |
<% |
6772 |
16 Mar 15 |
nicklas |
668 |
} |
6772 |
16 Mar 15 |
nicklas |
669 |
%> |
6797 |
24 Mar 15 |
nicklas |
670 |
<div id="sync-data" class="datacontainer" |
6797 |
24 Mar 15 |
nicklas |
671 |
data-is-in-sync="<%=listIsInSync ? 1 : 0%>" |
6797 |
24 Mar 15 |
nicklas |
672 |
data-sync-disabled="<%=list.getDisableSyncFilters() ? 1 : 0 %>" |
6797 |
24 Mar 15 |
nicklas |
673 |
data-num-syncfilters="<%=syncFilters.size()%>" |
6797 |
24 Mar 15 |
nicklas |
674 |
></div> |
6770 |
13 Mar 15 |
nicklas |
675 |
</base:section> |
6742 |
17 Feb 15 |
nicklas |
676 |
|
6742 |
17 Feb 15 |
nicklas |
677 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
6742 |
17 Feb 15 |
nicklas |
678 |
<jsp:param name="ID" value="<%=ID%>" /> |
6742 |
17 Feb 15 |
nicklas |
679 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6742 |
17 Feb 15 |
nicklas |
680 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6742 |
17 Feb 15 |
nicklas |
681 |
<jsp:param name="title" value="Other items related to this list" /> |
6742 |
17 Feb 15 |
nicklas |
682 |
</jsp:include> |
6742 |
17 Feb 15 |
nicklas |
683 |
<jsp:include page="../../common/share/list_share.jsp"> |
6742 |
17 Feb 15 |
nicklas |
684 |
<jsp:param name="ID" value="<%=ID%>" /> |
6742 |
17 Feb 15 |
nicklas |
685 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6742 |
17 Feb 15 |
nicklas |
686 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6742 |
17 Feb 15 |
nicklas |
687 |
<jsp:param name="title" value="Shared to" /> |
6742 |
17 Feb 15 |
nicklas |
688 |
</jsp:include> |
6742 |
17 Feb 15 |
nicklas |
689 |
</t:tab> |
6742 |
17 Feb 15 |
nicklas |
690 |
<t:tab id="annotations" title="Annotations" |
6742 |
17 Feb 15 |
nicklas |
691 |
tooltip="View annotation values" clazz="white"> |
6742 |
17 Feb 15 |
nicklas |
692 |
<jsp:include page="../../common/annotations/list_frameset.jsp"> |
6742 |
17 Feb 15 |
nicklas |
693 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6742 |
17 Feb 15 |
nicklas |
694 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6742 |
17 Feb 15 |
nicklas |
695 |
<jsp:param name="ID" value="<%=ID%>" /> |
6742 |
17 Feb 15 |
nicklas |
696 |
</jsp:include> |
6742 |
17 Feb 15 |
nicklas |
697 |
</t:tab> |
6742 |
17 Feb 15 |
nicklas |
698 |
<t:tab id="members" title="Members" /> |
6755 |
20 Feb 15 |
nicklas |
699 |
<t:tab id="overview" title="Overview" |
6755 |
20 Feb 15 |
nicklas |
700 |
tooltip="Display a tree overview of related items" |
6755 |
20 Feb 15 |
nicklas |
701 |
visible="<%=list.getMemberType() != Item.FILE%>"> |
6755 |
20 Feb 15 |
nicklas |
702 |
<jsp:include page="../../common/overview/overview.jsp"> |
6755 |
20 Feb 15 |
nicklas |
703 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6755 |
20 Feb 15 |
nicklas |
704 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6755 |
20 Feb 15 |
nicklas |
705 |
<jsp:param name="ID" value="<%=ID%>" /> |
6755 |
20 Feb 15 |
nicklas |
706 |
</jsp:include> |
6755 |
20 Feb 15 |
nicklas |
707 |
</t:tab> |
7166 |
07 Jun 16 |
nicklas |
708 |
<t:tab id="history" title="History" |
7166 |
07 Jun 16 |
nicklas |
709 |
tooltip="Displays a log with the history of this item" |
6742 |
17 Feb 15 |
nicklas |
710 |
visible="<%=ChangeHistoryUtil.showChangeHistoryTab(sc)%>"> |
6742 |
17 Feb 15 |
nicklas |
711 |
<jsp:include page="../../common/history/frameset.jsp"> |
6742 |
17 Feb 15 |
nicklas |
712 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
6742 |
17 Feb 15 |
nicklas |
713 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
6742 |
17 Feb 15 |
nicklas |
714 |
<jsp:param name="ID" value="<%=ID%>" /> |
6742 |
17 Feb 15 |
nicklas |
715 |
</jsp:include> |
6742 |
17 Feb 15 |
nicklas |
716 |
</t:tab> |
6742 |
17 Feb 15 |
nicklas |
717 |
</t:tabcontrol> |
6742 |
17 Feb 15 |
nicklas |
718 |
|
6742 |
17 Feb 15 |
nicklas |
719 |
</base:body> |
6742 |
17 Feb 15 |
nicklas |
720 |
</base:page> |
6742 |
17 Feb 15 |
nicklas |
721 |
<% |
6742 |
17 Feb 15 |
nicklas |
722 |
} |
6742 |
17 Feb 15 |
nicklas |
723 |
finally |
6742 |
17 Feb 15 |
nicklas |
724 |
{ |
6742 |
17 Feb 15 |
nicklas |
725 |
if (dc != null) dc.close(); |
6742 |
17 Feb 15 |
nicklas |
726 |
} |
6742 |
17 Feb 15 |
nicklas |
727 |
|
6742 |
17 Feb 15 |
nicklas |
728 |
%> |