509 |
03 May 05 |
nicklas |
1 |
<%-- $Id$ |
509 |
03 May 05 |
nicklas |
2 |
------------------------------------------------------------------ |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2005 Nicklas Nordborg |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Nicklas Nordborg |
509 |
03 May 05 |
nicklas |
6 |
|
2304 |
22 May 06 |
jari |
7 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
8 |
Available at http://base.thep.lu.se/ |
509 |
03 May 05 |
nicklas |
9 |
|
509 |
03 May 05 |
nicklas |
10 |
BASE is free software; you can redistribute it and/or |
509 |
03 May 05 |
nicklas |
11 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
12 |
as published by the Free Software Foundation; either version 3 |
509 |
03 May 05 |
nicklas |
13 |
of the License, or (at your option) any later version. |
509 |
03 May 05 |
nicklas |
14 |
|
509 |
03 May 05 |
nicklas |
15 |
BASE is distributed in the hope that it will be useful, |
509 |
03 May 05 |
nicklas |
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
509 |
03 May 05 |
nicklas |
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
509 |
03 May 05 |
nicklas |
18 |
GNU General Public License for more details. |
509 |
03 May 05 |
nicklas |
19 |
|
509 |
03 May 05 |
nicklas |
20 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
21 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
509 |
03 May 05 |
nicklas |
22 |
------------------------------------------------------------------ |
509 |
03 May 05 |
nicklas |
23 |
|
509 |
03 May 05 |
nicklas |
24 |
|
509 |
03 May 05 |
nicklas |
25 |
@author Nicklas |
509 |
03 May 05 |
nicklas |
26 |
@version 2.0 |
509 |
03 May 05 |
nicklas |
27 |
--%> |
5426 |
24 Sep 10 |
nicklas |
28 |
<%@ page pageEncoding="UTF-8" session="false" |
509 |
03 May 05 |
nicklas |
29 |
import="net.sf.basedb.core.SessionControl" |
509 |
03 May 05 |
nicklas |
30 |
import="net.sf.basedb.core.DbControl" |
531 |
09 May 05 |
nicklas |
31 |
import="net.sf.basedb.core.SystemItems" |
509 |
03 May 05 |
nicklas |
32 |
import="net.sf.basedb.core.Item" |
2434 |
27 Jun 06 |
nicklas |
33 |
import="net.sf.basedb.core.Type" |
1959 |
09 Feb 06 |
nicklas |
34 |
import="net.sf.basedb.core.ItemContext" |
3890 |
30 Oct 07 |
nicklas |
35 |
import="net.sf.basedb.core.Include" |
509 |
03 May 05 |
nicklas |
36 |
import="net.sf.basedb.core.Permission" |
509 |
03 May 05 |
nicklas |
37 |
import="net.sf.basedb.core.Group" |
509 |
03 May 05 |
nicklas |
38 |
import="net.sf.basedb.core.User" |
509 |
03 May 05 |
nicklas |
39 |
import="net.sf.basedb.core.Quota" |
563 |
12 May 05 |
nicklas |
40 |
import="net.sf.basedb.core.QuotaType" |
1959 |
09 Feb 06 |
nicklas |
41 |
import="net.sf.basedb.core.Location" |
1418 |
07 Oct 05 |
nicklas |
42 |
import="net.sf.basedb.core.ItemQuery" |
1418 |
07 Oct 05 |
nicklas |
43 |
import="net.sf.basedb.core.ItemResultList" |
515 |
03 May 05 |
nicklas |
44 |
import="net.sf.basedb.core.PermissionDeniedException" |
509 |
03 May 05 |
nicklas |
45 |
import="net.sf.basedb.core.query.Orders" |
1418 |
07 Oct 05 |
nicklas |
46 |
import="net.sf.basedb.core.query.Hql" |
2434 |
27 Jun 06 |
nicklas |
47 |
import="net.sf.basedb.core.query.Restrictions" |
2434 |
27 Jun 06 |
nicklas |
48 |
import="net.sf.basedb.core.query.Expressions" |
509 |
03 May 05 |
nicklas |
49 |
import="net.sf.basedb.clients.web.Base" |
509 |
03 May 05 |
nicklas |
50 |
import="net.sf.basedb.clients.web.util.HTML" |
2753 |
20 Oct 06 |
nicklas |
51 |
import="net.sf.basedb.util.Values" |
5506 |
19 Nov 10 |
nicklas |
52 |
import="net.sf.basedb.core.plugin.GuiContext" |
5506 |
19 Nov 10 |
nicklas |
53 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
5506 |
19 Nov 10 |
nicklas |
54 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
5506 |
19 Nov 10 |
nicklas |
55 |
import="net.sf.basedb.clients.web.extensions.edit.EditUtil" |
7604 |
25 Feb 19 |
nicklas |
56 |
import="net.sf.basedb.clients.web.extensions.tabcontrol.TabAction" |
5506 |
19 Nov 10 |
nicklas |
57 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
6224 |
15 Jan 13 |
nicklas |
58 |
import="net.sf.basedb.util.json.JsonUtil" |
6224 |
15 Jan 13 |
nicklas |
59 |
import="net.sf.basedb.util.json.NameableConverter" |
2434 |
27 Jun 06 |
nicklas |
60 |
import="java.util.Arrays" |
6224 |
15 Jan 13 |
nicklas |
61 |
import="org.json.simple.JSONArray" |
6291 |
11 Jun 13 |
nicklas |
62 |
import="org.json.simple.JSONObject" |
509 |
03 May 05 |
nicklas |
63 |
%> |
509 |
03 May 05 |
nicklas |
64 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
509 |
03 May 05 |
nicklas |
65 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
6147 |
21 Sep 12 |
nicklas |
66 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
509 |
03 May 05 |
nicklas |
67 |
<% |
1959 |
09 Feb 06 |
nicklas |
68 |
final Item itemType = Item.GROUP; |
1959 |
09 Feb 06 |
nicklas |
69 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1959 |
09 Feb 06 |
nicklas |
70 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
1959 |
09 Feb 06 |
nicklas |
71 |
final int itemId = cc.getId(); |
509 |
03 May 05 |
nicklas |
72 |
final String ID = sc.getId(); |
509 |
03 May 05 |
nicklas |
73 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
74 |
final DbControl dc = sc.newDbControl(":Edit "+itemType); |
509 |
03 May 05 |
nicklas |
75 |
try |
509 |
03 May 05 |
nicklas |
76 |
{ |
509 |
03 May 05 |
nicklas |
77 |
String title = null; |
509 |
03 May 05 |
nicklas |
78 |
Group group = null; |
1959 |
09 Feb 06 |
nicklas |
79 |
|
1959 |
09 Feb 06 |
nicklas |
80 |
boolean isEveryone = false; |
3467 |
08 Jun 07 |
nicklas |
81 |
boolean isDefault = false; |
5077 |
26 Aug 09 |
nicklas |
82 |
boolean hiddenMembers = false; |
1986 |
14 Feb 06 |
nicklas |
83 |
final QuotaType total = QuotaType.getById(dc, SystemItems.getId(QuotaType.TOTAL)); |
1966 |
10 Feb 06 |
nicklas |
84 |
Quota currentQuota = null; |
1959 |
09 Feb 06 |
nicklas |
85 |
|
1966 |
10 Feb 06 |
nicklas |
86 |
// Query to retrieve child groups |
1966 |
10 Feb 06 |
nicklas |
87 |
ItemQuery<Group> groupQuery = null; |
1966 |
10 Feb 06 |
nicklas |
88 |
// Query to retrieve user members |
1966 |
10 Feb 06 |
nicklas |
89 |
ItemQuery<User> userQuery = null; |
1966 |
10 Feb 06 |
nicklas |
90 |
|
1959 |
09 Feb 06 |
nicklas |
91 |
if (itemId == 0) |
509 |
03 May 05 |
nicklas |
92 |
{ |
509 |
03 May 05 |
nicklas |
93 |
title = "Create group"; |
1959 |
09 Feb 06 |
nicklas |
94 |
cc.removeObject("item"); |
1966 |
10 Feb 06 |
nicklas |
95 |
if (cc.getPropertyFilter("quota.name") != null) |
1966 |
10 Feb 06 |
nicklas |
96 |
{ |
1966 |
10 Feb 06 |
nicklas |
97 |
currentQuota = Base.getFirstMatching(dc, Quota.getQuery(), "name", cc.getPropertyFilter("quota.name")); |
1966 |
10 Feb 06 |
nicklas |
98 |
} |
2434 |
27 Jun 06 |
nicklas |
99 |
String[] selected = request.getParameterValues("user_id"); |
2434 |
27 Jun 06 |
nicklas |
100 |
if (selected != null) |
2434 |
27 Jun 06 |
nicklas |
101 |
{ |
2434 |
27 Jun 06 |
nicklas |
102 |
userQuery = User.getQuery(); |
3890 |
30 Oct 07 |
nicklas |
103 |
userQuery.include(Include.ALL); |
2434 |
27 Jun 06 |
nicklas |
104 |
userQuery.restrict(Restrictions.in(Hql.property("id"), Expressions.parameter("selected"))); |
2434 |
27 Jun 06 |
nicklas |
105 |
userQuery.setParameter("selected", Arrays.asList(Values.getInt(selected)), Type.INT); |
2434 |
27 Jun 06 |
nicklas |
106 |
} |
3467 |
08 Jun 07 |
nicklas |
107 |
isDefault = Values.getBoolean(cc.getPropertyValue("default"), false); |
5077 |
26 Aug 09 |
nicklas |
108 |
hiddenMembers = Values.getBoolean(cc.getPropertyValue("hiddenMembers"), false); |
509 |
03 May 05 |
nicklas |
109 |
} |
509 |
03 May 05 |
nicklas |
110 |
else |
509 |
03 May 05 |
nicklas |
111 |
{ |
1959 |
09 Feb 06 |
nicklas |
112 |
group = Group.getById(dc, itemId); |
6224 |
15 Jan 13 |
nicklas |
113 |
group.checkPermission(Permission.WRITE); |
1959 |
09 Feb 06 |
nicklas |
114 |
cc.setObject("item", group); |
517 |
03 May 05 |
nicklas |
115 |
title = "Edit group -- " + HTML.encodeTags(group.getName()); |
1959 |
09 Feb 06 |
nicklas |
116 |
isEveryone = Group.EVERYONE.equals(group.getSystemId()); |
3467 |
08 Jun 07 |
nicklas |
117 |
isDefault = group.isDefault(); |
5077 |
26 Aug 09 |
nicklas |
118 |
hiddenMembers = group.hasHiddenMembers(); |
1966 |
10 Feb 06 |
nicklas |
119 |
|
1966 |
10 Feb 06 |
nicklas |
120 |
try |
1966 |
10 Feb 06 |
nicklas |
121 |
{ |
1966 |
10 Feb 06 |
nicklas |
122 |
currentQuota = group.getQuota(); |
1966 |
10 Feb 06 |
nicklas |
123 |
} |
1966 |
10 Feb 06 |
nicklas |
124 |
catch (PermissionDeniedException ex) |
1966 |
10 Feb 06 |
nicklas |
125 |
{} |
1959 |
09 Feb 06 |
nicklas |
126 |
|
1966 |
10 Feb 06 |
nicklas |
127 |
groupQuery = group.getGroups(); |
3890 |
30 Oct 07 |
nicklas |
128 |
groupQuery.include(Include.ALL); |
1966 |
10 Feb 06 |
nicklas |
129 |
groupQuery.order(Orders.asc(Hql.property("name"))); |
1966 |
10 Feb 06 |
nicklas |
130 |
userQuery = group.getUsers(); |
3890 |
30 Oct 07 |
nicklas |
131 |
userQuery.include(Include.ALL); |
1966 |
10 Feb 06 |
nicklas |
132 |
userQuery.order(Orders.asc(Hql.property("name"))); |
509 |
03 May 05 |
nicklas |
133 |
} |
1959 |
09 Feb 06 |
nicklas |
134 |
|
515 |
03 May 05 |
nicklas |
135 |
final boolean readQuota = sc.hasPermission(Permission.READ, Item.QUOTA); |
635 |
23 May 05 |
nicklas |
136 |
final boolean useQuota = sc.hasPermission(Permission.USE, Item.QUOTA); |
635 |
23 May 05 |
nicklas |
137 |
final boolean useUsers = sc.hasPermission(Permission.WRITE, Item.USER); |
515 |
03 May 05 |
nicklas |
138 |
final boolean writeGroups = sc.hasPermission(Permission.WRITE, Item.GROUP); |
635 |
23 May 05 |
nicklas |
139 |
final boolean writeMembers = useUsers && writeGroups; |
1959 |
09 Feb 06 |
nicklas |
140 |
|
509 |
03 May 05 |
nicklas |
141 |
// Query to retrieve quota |
1418 |
07 Oct 05 |
nicklas |
142 |
final ItemQuery<Quota> quotaQuery = Quota.getQuery(); |
3890 |
30 Oct 07 |
nicklas |
143 |
quotaQuery.include(Include.ALL); |
1418 |
07 Oct 05 |
nicklas |
144 |
quotaQuery.order(Orders.asc(Hql.property("name"))); |
959 |
19 Jul 05 |
nicklas |
145 |
quotaQuery.setCacheResult(true); |
6224 |
15 Jan 13 |
nicklas |
146 |
|
6291 |
11 Jun 13 |
nicklas |
147 |
// Load user members as JSON objects |
6291 |
11 Jun 13 |
nicklas |
148 |
JSONObject jsonUsers = new JSONObject(); |
6291 |
11 Jun 13 |
nicklas |
149 |
jsonUsers.put("itemType", "USER"); |
6291 |
11 Jun 13 |
nicklas |
150 |
jsonUsers.put("name", "Users"); |
6291 |
11 Jun 13 |
nicklas |
151 |
if (userQuery != null) |
6224 |
15 Jan 13 |
nicklas |
152 |
{ |
7604 |
25 Feb 19 |
nicklas |
153 |
jsonUsers.put("items", JsonUtil.toArray(userQuery.iterate(dc), new NameableConverter<User>())); |
6224 |
15 Jan 13 |
nicklas |
154 |
} |
509 |
03 May 05 |
nicklas |
155 |
|
6291 |
11 Jun 13 |
nicklas |
156 |
// Load group members as JSON objects |
6291 |
11 Jun 13 |
nicklas |
157 |
JSONObject jsonGroups = new JSONObject(); |
6291 |
11 Jun 13 |
nicklas |
158 |
jsonGroups.put("itemType", "GROUP"); |
6291 |
11 Jun 13 |
nicklas |
159 |
jsonGroups.put("name", "Groups"); |
6291 |
11 Jun 13 |
nicklas |
160 |
if (groupQuery != null) |
6224 |
15 Jan 13 |
nicklas |
161 |
{ |
7604 |
25 Feb 19 |
nicklas |
162 |
jsonGroups.put("items", JsonUtil.toArray(groupQuery.iterate(dc), new NameableConverter<Group>())); |
6224 |
15 Jan 13 |
nicklas |
163 |
} |
6291 |
11 Jun 13 |
nicklas |
164 |
|
6291 |
11 Jun 13 |
nicklas |
165 |
JSONArray jsonMembers = new JSONArray(); |
6291 |
11 Jun 13 |
nicklas |
166 |
jsonMembers.add(jsonUsers); |
6291 |
11 Jun 13 |
nicklas |
167 |
jsonMembers.add(jsonGroups); |
6224 |
15 Jan 13 |
nicklas |
168 |
|
5506 |
19 Nov 10 |
nicklas |
169 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, GuiContext.item(itemType), group); |
7604 |
25 Feb 19 |
nicklas |
170 |
ExtensionsInvoker<TabAction> invoker = EditUtil.useEditExtensions(jspContext); |
509 |
03 May 05 |
nicklas |
171 |
%> |
6224 |
15 Jan 13 |
nicklas |
172 |
<base:page type="popup" title="<%=title%>" id="edit-page"> |
6291 |
11 Jun 13 |
nicklas |
173 |
<base:head scripts="tabcontrol-2.js,linkitems-2.js,~groups.js" styles="tabcontrol.css"> |
5506 |
19 Nov 10 |
nicklas |
174 |
<ext:scripts context="<%=jspContext%>" /> |
5506 |
19 Nov 10 |
nicklas |
175 |
<ext:stylesheets context="<%=jspContext%>" /> |
509 |
03 May 05 |
nicklas |
176 |
</base:head> |
6224 |
15 Jan 13 |
nicklas |
177 |
<base:body> |
5921 |
10 Jan 12 |
nicklas |
178 |
<h1><%=title%> <base:help tabcontrol="settings" /></h1> |
5921 |
10 Jan 12 |
nicklas |
179 |
|
6162 |
10 Oct 12 |
nicklas |
180 |
<form action="index.jsp?ID=<%=ID%>" method="post" name="group"> |
1959 |
09 Feb 06 |
nicklas |
181 |
<input type="hidden" name="cmd" value="UpdateItem"> |
1959 |
09 Feb 06 |
nicklas |
182 |
|
5921 |
10 Jan 12 |
nicklas |
183 |
<t:tabcontrol id="settings" |
5921 |
10 Jan 12 |
nicklas |
184 |
subclass="content dialogtabcontrol" |
5506 |
19 Nov 10 |
nicklas |
185 |
position="bottom" remember="<%=group != null%>" |
5506 |
19 Nov 10 |
nicklas |
186 |
extensions="<%=invoker%>"> |
6224 |
15 Jan 13 |
nicklas |
187 |
<t:tab id="info" title="Group" helpid="group.edit"> |
6412 |
04 Feb 14 |
nicklas |
188 |
<table class="fullform input100"> |
509 |
03 May 05 |
nicklas |
189 |
<tr> |
5921 |
10 Jan 12 |
nicklas |
190 |
<th>Name</th> |
6224 |
15 Jan 13 |
nicklas |
191 |
<td><input class="text required auto-init" data-auto-init="<%=group == null ? "focus-select" : "focus" %>" |
6224 |
15 Jan 13 |
nicklas |
192 |
type="text" name="name" |
1959 |
09 Feb 06 |
nicklas |
193 |
value="<%=HTML.encodeTags(group == null ? Values.getString(cc.getPropertyValue("name"), "New group") : group.getName())%>" |
5921 |
10 Jan 12 |
nicklas |
194 |
maxlength="<%=Group.MAX_NAME_LENGTH%>"></td> |
5921 |
10 Jan 12 |
nicklas |
195 |
<td></td> |
509 |
03 May 05 |
nicklas |
196 |
</tr> |
3467 |
08 Jun 07 |
nicklas |
197 |
<tr> |
5921 |
10 Jan 12 |
nicklas |
198 |
<th>Default</th> |
3467 |
08 Jun 07 |
nicklas |
199 |
<td> |
5812 |
17 Oct 11 |
nicklas |
200 |
<input type="radio" name="is_default" id="defaultNo" value="0" <%=!isDefault ? "checked" : ""%>><label for="defaultNo">no</label> |
5812 |
17 Oct 11 |
nicklas |
201 |
<input type="radio" name="is_default" id="defaultYes" value="1" <%=isDefault ? "checked" : ""%>><label for="defaultYes">yes</label> |
509 |
03 May 05 |
nicklas |
202 |
</td> |
5921 |
10 Jan 12 |
nicklas |
203 |
<td></td> |
3467 |
08 Jun 07 |
nicklas |
204 |
</tr> |
5077 |
26 Aug 09 |
nicklas |
205 |
<tr> |
5921 |
10 Jan 12 |
nicklas |
206 |
<th>Hidden members</th> |
5077 |
26 Aug 09 |
nicklas |
207 |
<td> |
5812 |
17 Oct 11 |
nicklas |
208 |
<input type="radio" name="hidden_members" id="hiddenNo" value="0" <%=!hiddenMembers ? "checked" : ""%>><label for="hiddenNo">no</label> |
5812 |
17 Oct 11 |
nicklas |
209 |
<input type="radio" name="hidden_members" id="hiddenYes" value="1" <%=hiddenMembers ? "checked" : ""%>><label for="hiddenYes">yes</label> |
5077 |
26 Aug 09 |
nicklas |
210 |
</td> |
5921 |
10 Jan 12 |
nicklas |
211 |
<td></td> |
5077 |
26 Aug 09 |
nicklas |
212 |
</tr> |
5921 |
10 Jan 12 |
nicklas |
213 |
<tr> |
5921 |
10 Jan 12 |
nicklas |
214 |
<th>Quota</th> |
509 |
03 May 05 |
nicklas |
215 |
<td> |
1959 |
09 Feb 06 |
nicklas |
216 |
<select name="quota_id" <%=isEveryone || !useQuota ? "disabled readonly class=\"disabled\"" : ""%>> |
509 |
03 May 05 |
nicklas |
217 |
<% |
515 |
03 May 05 |
nicklas |
218 |
if (!readQuota) |
515 |
03 May 05 |
nicklas |
219 |
{ |
515 |
03 May 05 |
nicklas |
220 |
%> |
515 |
03 May 05 |
nicklas |
221 |
<option value="-1">- denied - |
515 |
03 May 05 |
nicklas |
222 |
<% |
515 |
03 May 05 |
nicklas |
223 |
} |
563 |
12 May 05 |
nicklas |
224 |
else |
509 |
03 May 05 |
nicklas |
225 |
{ |
509 |
03 May 05 |
nicklas |
226 |
%> |
563 |
12 May 05 |
nicklas |
227 |
<option value="0">- none - |
509 |
03 May 05 |
nicklas |
228 |
<% |
1959 |
09 Feb 06 |
nicklas |
229 |
ItemResultList<Quota> quotas = quotaQuery.list(dc); |
959 |
19 Jul 05 |
nicklas |
230 |
for (Quota quota : quotas) |
563 |
12 May 05 |
nicklas |
231 |
{ |
2197 |
27 Apr 06 |
nicklas |
232 |
boolean current = quota.equals(currentQuota); |
3890 |
30 Oct 07 |
nicklas |
233 |
if (!current && quota.isRemoved()) continue; |
2197 |
27 Apr 06 |
nicklas |
234 |
int id = quota.getId(); |
563 |
12 May 05 |
nicklas |
235 |
long totalBytes = quota.getQuotaValue(total, Location.PRIMARY); |
563 |
12 May 05 |
nicklas |
236 |
String fTotal = totalBytes == Quota.UNLIMITED ? "unlimited" : Values.formatBytes(totalBytes); |
563 |
12 May 05 |
nicklas |
237 |
%> |
2197 |
27 Apr 06 |
nicklas |
238 |
<option |
2197 |
27 Apr 06 |
nicklas |
239 |
value="<%=current && group != null ? -id : id%>" |
2197 |
27 Apr 06 |
nicklas |
240 |
<%=current ? "selected" : ""%> |
2197 |
27 Apr 06 |
nicklas |
241 |
><%=HTML.encodeTags(quota.getName())%> (<%=fTotal%> total) |
563 |
12 May 05 |
nicklas |
242 |
<% |
563 |
12 May 05 |
nicklas |
243 |
} |
509 |
03 May 05 |
nicklas |
244 |
} |
509 |
03 May 05 |
nicklas |
245 |
%> |
6147 |
21 Sep 12 |
nicklas |
246 |
</select> |
509 |
03 May 05 |
nicklas |
247 |
</td> |
5921 |
10 Jan 12 |
nicklas |
248 |
<td></td> |
509 |
03 May 05 |
nicklas |
249 |
</tr> |
5921 |
10 Jan 12 |
nicklas |
250 |
<tr class="dynamic"> |
5921 |
10 Jan 12 |
nicklas |
251 |
<th>Description</th> |
5921 |
10 Jan 12 |
nicklas |
252 |
<td> |
6217 |
14 Dec 12 |
nicklas |
253 |
<textarea class="text" rows="6" name="description" id="description" |
3467 |
08 Jun 07 |
nicklas |
254 |
><%=HTML.encodeTags(group == null ? cc.getPropertyValue("description") : group.getDescription())%></textarea> |
3467 |
08 Jun 07 |
nicklas |
255 |
</td> |
5921 |
10 Jan 12 |
nicklas |
256 |
<td style="width: 20px;"> |
6215 |
13 Dec 12 |
nicklas |
257 |
<base:zoom textarea="description" title="Description" /> |
5921 |
10 Jan 12 |
nicklas |
258 |
</td> |
3467 |
08 Jun 07 |
nicklas |
259 |
</tr> |
509 |
03 May 05 |
nicklas |
260 |
</table> |
509 |
03 May 05 |
nicklas |
261 |
</t:tab> |
509 |
03 May 05 |
nicklas |
262 |
|
2434 |
27 Jun 06 |
nicklas |
263 |
<t:tab id="members" title="Members" tooltip="Add/remove members of this group" |
6224 |
15 Jan 13 |
nicklas |
264 |
helpid="group.edit.membership"> |
6412 |
04 Feb 14 |
nicklas |
265 |
<table class="fullform input100"> |
5921 |
10 Jan 12 |
nicklas |
266 |
<tr class="dynamic"> |
5921 |
10 Jan 12 |
nicklas |
267 |
<th>Members</th> |
5921 |
10 Jan 12 |
nicklas |
268 |
<td> |
5921 |
10 Jan 12 |
nicklas |
269 |
<div class="selectionlist"> |
5921 |
10 Jan 12 |
nicklas |
270 |
<table> |
5921 |
10 Jan 12 |
nicklas |
271 |
<tr> |
5921 |
10 Jan 12 |
nicklas |
272 |
<td> |
6291 |
11 Jun 13 |
nicklas |
273 |
<select name="members" id="members" |
6291 |
11 Jun 13 |
nicklas |
274 |
class="auto-init" data-auto-init="link-container" |
6291 |
11 Jun 13 |
nicklas |
275 |
data-initial-items="<%=HTML.encodeTags(jsonMembers.toJSONString()) %>" |
6291 |
11 Jun 13 |
nicklas |
276 |
data-initial-action="<%=group == null ? 1 : 0%>" |
6291 |
11 Jun 13 |
nicklas |
277 |
size="14" multiple <%=isEveryone || !writeMembers ? "disabled readonly class=\"disabled\"" : ""%>> |
5921 |
10 Jan 12 |
nicklas |
278 |
</select> |
5921 |
10 Jan 12 |
nicklas |
279 |
</td> |
5921 |
10 Jan 12 |
nicklas |
280 |
<td style="vertical-align: top;"> |
5921 |
10 Jan 12 |
nicklas |
281 |
|
5921 |
10 Jan 12 |
nicklas |
282 |
<base:buttongroup vertical="true"> |
5921 |
10 Jan 12 |
nicklas |
283 |
<base:button |
6224 |
15 Jan 13 |
nicklas |
284 |
id="btnAddUsers" |
6291 |
11 Jun 13 |
nicklas |
285 |
subclass="leftaligned auto-init" |
6291 |
11 Jun 13 |
nicklas |
286 |
data-auto-init="add-link" |
6291 |
11 Jun 13 |
nicklas |
287 |
data-list-id="members" |
6291 |
11 Jun 13 |
nicklas |
288 |
data-item-type="USER" |
5921 |
10 Jan 12 |
nicklas |
289 |
style="width: 12em;" |
5921 |
10 Jan 12 |
nicklas |
290 |
title="Add users…" |
5921 |
10 Jan 12 |
nicklas |
291 |
tooltip="Add users to this group" |
5921 |
10 Jan 12 |
nicklas |
292 |
disabled="<%=isEveryone || !writeMembers %>" |
5921 |
10 Jan 12 |
nicklas |
293 |
/> |
5921 |
10 Jan 12 |
nicklas |
294 |
<base:button |
6224 |
15 Jan 13 |
nicklas |
295 |
id="btnAddGroups" |
6291 |
11 Jun 13 |
nicklas |
296 |
subclass="leftaligned auto-init" |
6291 |
11 Jun 13 |
nicklas |
297 |
data-auto-init="add-link" |
6291 |
11 Jun 13 |
nicklas |
298 |
data-list-id="members" |
6291 |
11 Jun 13 |
nicklas |
299 |
data-item-type="GROUP" |
6291 |
11 Jun 13 |
nicklas |
300 |
data-exclude="<%=group==null ? 0 : group.getId() %>" |
5921 |
10 Jan 12 |
nicklas |
301 |
style="width: 12em;" |
5921 |
10 Jan 12 |
nicklas |
302 |
title="Add groups…" |
5921 |
10 Jan 12 |
nicklas |
303 |
tooltip="Add child groups to this group" |
5921 |
10 Jan 12 |
nicklas |
304 |
disabled="<%=isEveryone || !writeMembers %>" |
5921 |
10 Jan 12 |
nicklas |
305 |
/> |
5921 |
10 Jan 12 |
nicklas |
306 |
<base:button |
6224 |
15 Jan 13 |
nicklas |
307 |
id="btnRemoveMembers" |
6291 |
11 Jun 13 |
nicklas |
308 |
subclass="leftaligned auto-init" |
6291 |
11 Jun 13 |
nicklas |
309 |
data-auto-init="remove-link" |
6291 |
11 Jun 13 |
nicklas |
310 |
data-list-id="members" |
5921 |
10 Jan 12 |
nicklas |
311 |
style="width: 12em;" |
5921 |
10 Jan 12 |
nicklas |
312 |
title="Remove" |
5921 |
10 Jan 12 |
nicklas |
313 |
tooltip="Remove the selected items from this group" |
5921 |
10 Jan 12 |
nicklas |
314 |
disabled="<%=isEveryone || !writeMembers%>" |
5921 |
10 Jan 12 |
nicklas |
315 |
/> |
5921 |
10 Jan 12 |
nicklas |
316 |
</base:buttongroup> |
5921 |
10 Jan 12 |
nicklas |
317 |
</td> |
5921 |
10 Jan 12 |
nicklas |
318 |
</tr> |
5921 |
10 Jan 12 |
nicklas |
319 |
</table> |
5921 |
10 Jan 12 |
nicklas |
320 |
</div> |
5921 |
10 Jan 12 |
nicklas |
321 |
</td> |
5921 |
10 Jan 12 |
nicklas |
322 |
</tr> |
522 |
04 May 05 |
nicklas |
323 |
</table> |
509 |
03 May 05 |
nicklas |
324 |
</t:tab> |
509 |
03 May 05 |
nicklas |
325 |
</t:tabcontrol> |
5921 |
10 Jan 12 |
nicklas |
326 |
</form> |
5921 |
10 Jan 12 |
nicklas |
327 |
|
5921 |
10 Jan 12 |
nicklas |
328 |
<div class="legend"> |
5946 |
03 Feb 12 |
nicklas |
329 |
<base:icon image="required.png" />= required information |
5921 |
10 Jan 12 |
nicklas |
330 |
</div> |
1959 |
09 Feb 06 |
nicklas |
331 |
|
5921 |
10 Jan 12 |
nicklas |
332 |
<base:buttongroup subclass="dialogbuttons"> |
6224 |
15 Jan 13 |
nicklas |
333 |
<base:button id="btnSave" title="Save" /> |
6224 |
15 Jan 13 |
nicklas |
334 |
<base:button id="close" title="Cancel" /> |
5921 |
10 Jan 12 |
nicklas |
335 |
</base:buttongroup> |
509 |
03 May 05 |
nicklas |
336 |
</base:body> |
509 |
03 May 05 |
nicklas |
337 |
</base:page> |
509 |
03 May 05 |
nicklas |
338 |
<% |
509 |
03 May 05 |
nicklas |
339 |
} |
509 |
03 May 05 |
nicklas |
340 |
finally |
509 |
03 May 05 |
nicklas |
341 |
{ |
509 |
03 May 05 |
nicklas |
342 |
if (dc != null) dc.close(); |
509 |
03 May 05 |
nicklas |
343 |
} |
509 |
03 May 05 |
nicklas |
344 |
%> |