204 |
18 Mar 05 |
nicklas |
1 |
<%-- $Id$ |
204 |
18 Mar 05 |
nicklas |
2 |
------------------------------------------------------------------ |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2005 Nicklas Nordborg, Gregory Vincic |
5413 |
20 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson, Gregory Vincic |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Nicklas Nordborg |
204 |
18 Mar 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/ |
204 |
18 Mar 05 |
nicklas |
9 |
|
204 |
18 Mar 05 |
nicklas |
10 |
BASE is free software; you can redistribute it and/or |
204 |
18 Mar 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 |
204 |
18 Mar 05 |
nicklas |
13 |
of the License, or (at your option) any later version. |
204 |
18 Mar 05 |
nicklas |
14 |
|
204 |
18 Mar 05 |
nicklas |
15 |
BASE is distributed in the hope that it will be useful, |
204 |
18 Mar 05 |
nicklas |
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
204 |
18 Mar 05 |
nicklas |
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
204 |
18 Mar 05 |
nicklas |
18 |
GNU General Public License for more details. |
204 |
18 Mar 05 |
nicklas |
19 |
|
204 |
18 Mar 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/>. |
204 |
18 Mar 05 |
nicklas |
22 |
------------------------------------------------------------------ |
204 |
18 Mar 05 |
nicklas |
23 |
|
204 |
18 Mar 05 |
nicklas |
24 |
This page is included from the <base:page> taglib to display the |
204 |
18 Mar 05 |
nicklas |
25 |
meny. |
204 |
18 Mar 05 |
nicklas |
26 |
|
204 |
18 Mar 05 |
nicklas |
27 |
@param name |
204 |
18 Mar 05 |
nicklas |
28 |
The name of the menu to display: |
204 |
18 Mar 05 |
nicklas |
29 |
- standard: The standard menu for a logged in user |
204 |
18 Mar 05 |
nicklas |
30 |
- login: The menu used on pages where no user is logged in |
204 |
18 Mar 05 |
nicklas |
31 |
- exception: Used on error pages, does not display a menu at all |
204 |
18 Mar 05 |
nicklas |
32 |
- auto: Will display either the "standard" or "login" menu |
204 |
18 Mar 05 |
nicklas |
33 |
|
204 |
18 Mar 05 |
nicklas |
34 |
@author Nicklas |
204 |
18 Mar 05 |
nicklas |
35 |
@version 2.0 |
204 |
18 Mar 05 |
nicklas |
36 |
--%> |
5426 |
24 Sep 10 |
nicklas |
37 |
<%@ page pageEncoding="UTF-8" session="false" |
7108 |
14 Mar 16 |
nicklas |
38 |
import="net.sf.basedb.core.Application" |
500 |
02 May 05 |
nicklas |
39 |
import="net.sf.basedb.core.SessionControl" |
500 |
02 May 05 |
nicklas |
40 |
import="net.sf.basedb.core.DbControl" |
2907 |
14 Nov 06 |
nicklas |
41 |
import="net.sf.basedb.core.BasicItem" |
2907 |
14 Nov 06 |
nicklas |
42 |
import="net.sf.basedb.core.Nameable" |
500 |
02 May 05 |
nicklas |
43 |
import="net.sf.basedb.core.Permission" |
500 |
02 May 05 |
nicklas |
44 |
import="net.sf.basedb.core.Item" |
2907 |
14 Nov 06 |
nicklas |
45 |
import="net.sf.basedb.core.ItemContext" |
500 |
02 May 05 |
nicklas |
46 |
import="net.sf.basedb.core.User" |
572 |
12 May 05 |
nicklas |
47 |
import="net.sf.basedb.core.Project" |
4338 |
17 Jun 08 |
nicklas |
48 |
import="net.sf.basedb.core.BioAssaySet" |
958 |
19 Jul 05 |
nicklas |
49 |
import="net.sf.basedb.core.Client" |
2907 |
14 Nov 06 |
nicklas |
50 |
import="net.sf.basedb.core.StringUtil" |
1418 |
07 Oct 05 |
nicklas |
51 |
import="net.sf.basedb.core.ItemQuery" |
623 |
19 May 05 |
nicklas |
52 |
import="net.sf.basedb.core.Include" |
1418 |
07 Oct 05 |
nicklas |
53 |
import="net.sf.basedb.core.ItemResultList" |
5474 |
03 Nov 10 |
nicklas |
54 |
import="net.sf.basedb.core.Type" |
7294 |
17 Feb 17 |
nicklas |
55 |
import="net.sf.basedb.core.Role" |
572 |
12 May 05 |
nicklas |
56 |
import="net.sf.basedb.core.query.Orders" |
5319 |
20 Apr 10 |
nicklas |
57 |
import="net.sf.basedb.core.query.Order" |
1418 |
07 Oct 05 |
nicklas |
58 |
import="net.sf.basedb.core.query.Hql" |
5474 |
03 Nov 10 |
nicklas |
59 |
import="net.sf.basedb.core.query.Restrictions" |
5474 |
03 Nov 10 |
nicklas |
60 |
import="net.sf.basedb.core.query.Expressions" |
373 |
07 Apr 05 |
nicklas |
61 |
import="net.sf.basedb.clients.web.Base" |
204 |
18 Mar 05 |
nicklas |
62 |
import="net.sf.basedb.clients.web.util.HTML" |
5409 |
16 Sep 10 |
nicklas |
63 |
import="net.sf.basedb.clients.web.resources.Bundle" |
7407 |
05 Oct 17 |
nicklas |
64 |
import="net.sf.basedb.util.EmailUtil" |
2753 |
20 Oct 06 |
nicklas |
65 |
import="net.sf.basedb.util.Values" |
5409 |
16 Sep 10 |
nicklas |
66 |
import="net.sf.basedb.util.resources.ResourceBundleWrapper" |
5409 |
16 Sep 10 |
nicklas |
67 |
import="net.sf.basedb.util.resources.ResourceBundleFactory" |
4187 |
20 Mar 08 |
nicklas |
68 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4187 |
20 Mar 08 |
nicklas |
69 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4187 |
20 Mar 08 |
nicklas |
70 |
import="net.sf.basedb.clients.web.extensions.menu.MenuItemAction" |
4187 |
20 Mar 08 |
nicklas |
71 |
import="net.sf.basedb.util.extensions.Extension" |
4187 |
20 Mar 08 |
nicklas |
72 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
4187 |
20 Mar 08 |
nicklas |
73 |
import="net.sf.basedb.util.extensions.ActionIterator" |
6401 |
28 Jan 14 |
nicklas |
74 |
import="net.sf.basedb.clients.web.extensions.DynamicActionAttributes" |
6401 |
28 Jan 14 |
nicklas |
75 |
import="net.sf.basedb.clients.web.extensions.DynamicActionAttribute" |
1405 |
06 Oct 05 |
gregory |
76 |
import="java.util.HashMap" |
4262 |
30 Apr 08 |
nicklas |
77 |
import="java.util.Map" |
1405 |
06 Oct 05 |
gregory |
78 |
import="java.util.ArrayList" |
4262 |
30 Apr 08 |
nicklas |
79 |
import="java.util.LinkedList" |
3492 |
14 Jun 07 |
nicklas |
80 |
import="java.util.List" |
3492 |
14 Jun 07 |
nicklas |
81 |
import="java.util.Arrays" |
4187 |
20 Mar 08 |
nicklas |
82 |
import="java.util.Iterator" |
5474 |
03 Nov 10 |
nicklas |
83 |
import="java.util.Set" |
5474 |
03 Nov 10 |
nicklas |
84 |
import="java.util.HashSet" |
204 |
18 Mar 05 |
nicklas |
85 |
%> |
204 |
18 Mar 05 |
nicklas |
86 |
<%@ taglib prefix="m" uri="/WEB-INF/menu.tld" %> |
6401 |
28 Jan 14 |
nicklas |
87 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
204 |
18 Mar 05 |
nicklas |
88 |
<% |
7158 |
25 May 16 |
nicklas |
89 |
SessionControl sc = null; |
7158 |
25 May 16 |
nicklas |
90 |
try |
7158 |
25 May 16 |
nicklas |
91 |
{ |
7158 |
25 May 16 |
nicklas |
92 |
sc = Application.isRunning() ? Base.getSessionControl(pageContext, false) : null; |
7158 |
25 May 16 |
nicklas |
93 |
} |
7158 |
25 May 16 |
nicklas |
94 |
catch (RuntimeException ex) |
7158 |
25 May 16 |
nicklas |
95 |
{} |
500 |
02 May 05 |
nicklas |
96 |
final String ID = sc == null ? "" : sc.getId(); |
3504 |
15 Jun 07 |
nicklas |
97 |
String name = Values.getString(request.getParameter("name"), "login"); |
500 |
02 May 05 |
nicklas |
98 |
final String root = request.getContextPath()+"/"; |
3504 |
15 Jun 07 |
nicklas |
99 |
if ("exception".equals(name) && sc != null && sc.isLoggedIn()) name = "standard"; |
3504 |
15 Jun 07 |
nicklas |
100 |
|
5409 |
16 Sep 10 |
nicklas |
101 |
final ResourceBundleWrapper common = ResourceBundleFactory.getResourceBundle(Bundle.COMMON, sc); |
5409 |
16 Sep 10 |
nicklas |
102 |
final ResourceBundleWrapper menu = ResourceBundleFactory.getResourceBundle(Bundle.MENU, sc); |
5409 |
16 Sep 10 |
nicklas |
103 |
|
3504 |
15 Jun 07 |
nicklas |
104 |
if ("login".equals(name)) |
204 |
18 Mar 05 |
nicklas |
105 |
{ |
204 |
18 Mar 05 |
nicklas |
106 |
} |
5319 |
20 Apr 10 |
nicklas |
107 |
else if ("projects".equals(name) && sc != null && sc.isLoggedIn()) |
5319 |
20 Apr 10 |
nicklas |
108 |
{ |
5319 |
20 Apr 10 |
nicklas |
109 |
// Projects menu |
5319 |
20 Apr 10 |
nicklas |
110 |
int activeProjectId = sc.getActiveProjectId(); |
5319 |
20 Apr 10 |
nicklas |
111 |
%> |
5319 |
20 Apr 10 |
nicklas |
112 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
113 |
id="menu.projects" |
5319 |
20 Apr 10 |
nicklas |
114 |
style="display: none" |
5319 |
20 Apr 10 |
nicklas |
115 |
> |
5319 |
20 Apr 10 |
nicklas |
116 |
<% |
7954 |
12 May 21 |
nicklas |
117 |
final DbControl dc = sc.newDbControl(":Projects menu"); |
5474 |
03 Nov 10 |
nicklas |
118 |
boolean menuSeparatorBeforeDeactivate = true; |
5319 |
20 Apr 10 |
nicklas |
119 |
try |
5319 |
20 Apr 10 |
nicklas |
120 |
{ |
5474 |
03 Nov 10 |
nicklas |
121 |
List<Project> projects = new ArrayList<Project>(); |
5474 |
03 Nov 10 |
nicklas |
122 |
int lastRecentActiveIndex = 0; |
5474 |
03 Nov 10 |
nicklas |
123 |
// 1. Load the most recently active projects |
5474 |
03 Nov 10 |
nicklas |
124 |
String tmp = sc.getUserClientSetting("projects.recentActive"); |
5474 |
03 Nov 10 |
nicklas |
125 |
Set<Integer> recentProjects = new HashSet<Integer>(); |
5474 |
03 Nov 10 |
nicklas |
126 |
if (tmp != null) |
5474 |
03 Nov 10 |
nicklas |
127 |
{ |
5474 |
03 Nov 10 |
nicklas |
128 |
for (String id : tmp.split(":")) |
5474 |
03 Nov 10 |
nicklas |
129 |
{ |
5474 |
03 Nov 10 |
nicklas |
130 |
try |
5474 |
03 Nov 10 |
nicklas |
131 |
{ |
5474 |
03 Nov 10 |
nicklas |
132 |
Project p = Project.getById(dc, Values.getInt(id)); |
5474 |
03 Nov 10 |
nicklas |
133 |
if (!p.isRemoved()) |
5474 |
03 Nov 10 |
nicklas |
134 |
{ |
5474 |
03 Nov 10 |
nicklas |
135 |
recentProjects.add(p.getId()); |
5474 |
03 Nov 10 |
nicklas |
136 |
projects.add(p); |
5474 |
03 Nov 10 |
nicklas |
137 |
lastRecentActiveIndex++; |
5474 |
03 Nov 10 |
nicklas |
138 |
} |
5474 |
03 Nov 10 |
nicklas |
139 |
} |
5474 |
03 Nov 10 |
nicklas |
140 |
catch (RuntimeException ex) |
5474 |
03 Nov 10 |
nicklas |
141 |
{} |
5474 |
03 Nov 10 |
nicklas |
142 |
} |
5474 |
03 Nov 10 |
nicklas |
143 |
} |
5474 |
03 Nov 10 |
nicklas |
144 |
|
5474 |
03 Nov 10 |
nicklas |
145 |
// 2. Load more projects |
5319 |
20 Apr 10 |
nicklas |
146 |
final ItemContext projectCC = sc.getCurrentContext(Item.PROJECT); |
5319 |
20 Apr 10 |
nicklas |
147 |
final ItemQuery<Project> projectQuery = Project.getQuery(); |
5319 |
20 Apr 10 |
nicklas |
148 |
projectQuery.include(Include.MINE, Include.SHARED); |
5474 |
03 Nov 10 |
nicklas |
149 |
projectQuery.restrict(Restrictions.not(Restrictions.in(Hql.property("id"), Expressions.parameter("projects")))); |
5474 |
03 Nov 10 |
nicklas |
150 |
projectQuery.setParameter("projects", recentProjects, Type.INT); |
5319 |
20 Apr 10 |
nicklas |
151 |
Order projectSortOrder = projectCC.getSortOrder(); |
5319 |
20 Apr 10 |
nicklas |
152 |
if (projectSortOrder != null) projectQuery.order(projectSortOrder); |
5319 |
20 Apr 10 |
nicklas |
153 |
projectQuery.order(Orders.asc(Hql.property("name"))); |
5319 |
20 Apr 10 |
nicklas |
154 |
projectQuery.setCacheResult(true); |
5474 |
03 Nov 10 |
nicklas |
155 |
projects.addAll(projectQuery.list(dc)); |
5474 |
03 Nov 10 |
nicklas |
156 |
boolean breakAt15 = projects.size() > 16; |
5319 |
20 Apr 10 |
nicklas |
157 |
int index = 0; |
5413 |
20 Sep 10 |
nicklas |
158 |
String thisIsTheActiveProject = menu.getString("activeproject.tooltip"); |
5413 |
20 Sep 10 |
nicklas |
159 |
String thisIsNotTheActiveProject = menu.getString("inactiveproject.tooltip"); |
5474 |
03 Nov 10 |
nicklas |
160 |
if (lastRecentActiveIndex > 0) |
5474 |
03 Nov 10 |
nicklas |
161 |
{ |
5474 |
03 Nov 10 |
nicklas |
162 |
%> |
5474 |
03 Nov 10 |
nicklas |
163 |
<m:menuitem |
5474 |
03 Nov 10 |
nicklas |
164 |
title="<%=menu.getString("recentprojects.title")%>" |
6617 |
24 Nov 14 |
nicklas |
165 |
subclass="menusection" |
5474 |
03 Nov 10 |
nicklas |
166 |
enabled="false" |
5474 |
03 Nov 10 |
nicklas |
167 |
/> |
5474 |
03 Nov 10 |
nicklas |
168 |
<m:menuseparator /> |
5474 |
03 Nov 10 |
nicklas |
169 |
<% |
5474 |
03 Nov 10 |
nicklas |
170 |
} |
5474 |
03 Nov 10 |
nicklas |
171 |
Set<Integer> shownProjects = new HashSet<Integer>(); |
5319 |
20 Apr 10 |
nicklas |
172 |
for (Project p : projects) |
5319 |
20 Apr 10 |
nicklas |
173 |
{ |
5474 |
03 Nov 10 |
nicklas |
174 |
if (index == 15 && breakAt15) break; |
5319 |
20 Apr 10 |
nicklas |
175 |
index++; |
5319 |
20 Apr 10 |
nicklas |
176 |
int projectId = p.getId(); |
5319 |
20 Apr 10 |
nicklas |
177 |
boolean active = activeProjectId == projectId; |
5474 |
03 Nov 10 |
nicklas |
178 |
String prefix = index <= lastRecentActiveIndex ? index + ". " : ""; |
5474 |
03 Nov 10 |
nicklas |
179 |
shownProjects.add(p.getId()); |
6201 |
07 Nov 12 |
nicklas |
180 |
String url = active ? |
6201 |
07 Nov 12 |
nicklas |
181 |
root+"my_base/projects/index.jsp?ID="+ID+"&cmd=ViewItem&item_id=" + projectId : |
6201 |
07 Nov 12 |
nicklas |
182 |
root+"my_base/projects/set_active.jsp?ID="+ID+"&project_id="+p.getId(); |
5319 |
20 Apr 10 |
nicklas |
183 |
%> |
5319 |
20 Apr 10 |
nicklas |
184 |
<m:menuitem |
5474 |
03 Nov 10 |
nicklas |
185 |
title="<%=prefix + HTML.encodeTags(p.getName())%>" |
6617 |
24 Nov 14 |
nicklas |
186 |
subclass="active" |
6201 |
07 Nov 12 |
nicklas |
187 |
url="<%=url%>" |
6201 |
07 Nov 12 |
nicklas |
188 |
data-popup="<%=active ? "" : "ActivateProject, 300, 200"%>" |
5946 |
03 Feb 12 |
nicklas |
189 |
icon="<%=active ? "checkedmenu.png" : null%>" |
5413 |
20 Sep 10 |
nicklas |
190 |
tooltip="<%=active ? thisIsTheActiveProject : thisIsNotTheActiveProject%>" |
5319 |
20 Apr 10 |
nicklas |
191 |
/> |
5319 |
20 Apr 10 |
nicklas |
192 |
<% |
5474 |
03 Nov 10 |
nicklas |
193 |
if (index == lastRecentActiveIndex) |
5474 |
03 Nov 10 |
nicklas |
194 |
{ |
5474 |
03 Nov 10 |
nicklas |
195 |
%> |
5474 |
03 Nov 10 |
nicklas |
196 |
<m:menuseparator /> |
5474 |
03 Nov 10 |
nicklas |
197 |
<% |
5474 |
03 Nov 10 |
nicklas |
198 |
menuSeparatorBeforeDeactivate = false; |
5474 |
03 Nov 10 |
nicklas |
199 |
} |
5474 |
03 Nov 10 |
nicklas |
200 |
else |
5474 |
03 Nov 10 |
nicklas |
201 |
{ |
5474 |
03 Nov 10 |
nicklas |
202 |
menuSeparatorBeforeDeactivate = true; |
5474 |
03 Nov 10 |
nicklas |
203 |
} |
5319 |
20 Apr 10 |
nicklas |
204 |
} |
5474 |
03 Nov 10 |
nicklas |
205 |
if (breakAt15) |
5319 |
20 Apr 10 |
nicklas |
206 |
{ |
5474 |
03 Nov 10 |
nicklas |
207 |
int more = projects.size() - 15; |
5319 |
20 Apr 10 |
nicklas |
208 |
%> |
5319 |
20 Apr 10 |
nicklas |
209 |
<m:menuitem |
5474 |
03 Nov 10 |
nicklas |
210 |
title="<%="…" + menu.getString("moreprojects.title", Integer.toString(more))%>" |
6201 |
07 Nov 12 |
nicklas |
211 |
url="<%=root+"my_base/projects/index.jsp?ID="+ID+"&cmd=UpdateContext&tmpfilter:INT:id=<>"+Values.getString(shownProjects, "|", true)%>" |
5413 |
20 Sep 10 |
nicklas |
212 |
tooltip="<%=menu.getString("moreprojects.tooltip")%>" |
5319 |
20 Apr 10 |
nicklas |
213 |
/> |
5319 |
20 Apr 10 |
nicklas |
214 |
<% |
5319 |
20 Apr 10 |
nicklas |
215 |
} |
5319 |
20 Apr 10 |
nicklas |
216 |
} |
5319 |
20 Apr 10 |
nicklas |
217 |
catch (Throwable t) |
5319 |
20 Apr 10 |
nicklas |
218 |
{ |
5319 |
20 Apr 10 |
nicklas |
219 |
t.printStackTrace(); |
5474 |
03 Nov 10 |
nicklas |
220 |
menuSeparatorBeforeDeactivate = false; |
5319 |
20 Apr 10 |
nicklas |
221 |
%> |
5413 |
20 Sep 10 |
nicklas |
222 |
<m:menuseparator /> |
5319 |
20 Apr 10 |
nicklas |
223 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
224 |
title="<%=menu.getString("projects.error.title")%>" |
5413 |
20 Sep 10 |
nicklas |
225 |
tooltip="<%=menu.getString("projects.error.tooltip", t.getMessage())%>" |
5319 |
20 Apr 10 |
nicklas |
226 |
enabled="false" |
5903 |
09 Dec 11 |
nicklas |
227 |
icon="error.png" |
5319 |
20 Apr 10 |
nicklas |
228 |
/> |
5319 |
20 Apr 10 |
nicklas |
229 |
<% |
5319 |
20 Apr 10 |
nicklas |
230 |
} |
5319 |
20 Apr 10 |
nicklas |
231 |
finally |
5319 |
20 Apr 10 |
nicklas |
232 |
{ |
5319 |
20 Apr 10 |
nicklas |
233 |
if (dc != null) dc.close(); |
5319 |
20 Apr 10 |
nicklas |
234 |
} |
5474 |
03 Nov 10 |
nicklas |
235 |
if (menuSeparatorBeforeDeactivate) |
5474 |
03 Nov 10 |
nicklas |
236 |
{ |
5474 |
03 Nov 10 |
nicklas |
237 |
%> |
5474 |
03 Nov 10 |
nicklas |
238 |
<m:menuseparator /> |
5474 |
03 Nov 10 |
nicklas |
239 |
<% |
5474 |
03 Nov 10 |
nicklas |
240 |
} |
5319 |
20 Apr 10 |
nicklas |
241 |
%> |
5474 |
03 Nov 10 |
nicklas |
242 |
<m:menuitem |
5474 |
03 Nov 10 |
nicklas |
243 |
title="<%="<i>- " + menu.getString("noactiveproject.title") + " -</i>"%>" |
6201 |
07 Nov 12 |
nicklas |
244 |
url="<%=root+"my_base/projects/set_active.jsp?ID="+ID%>" |
6201 |
07 Nov 12 |
nicklas |
245 |
data-popup="ActivateProject, 300, 200" |
5946 |
03 Feb 12 |
nicklas |
246 |
icon="<%=activeProjectId == 0 ? "checkedmenu.png" : null%>" |
5474 |
03 Nov 10 |
nicklas |
247 |
enabled="<%=activeProjectId != 0%>" |
5474 |
03 Nov 10 |
nicklas |
248 |
tooltip="<%=menu.getString("noactiveproject.tooltip", activeProjectId == 0)%>" |
5474 |
03 Nov 10 |
nicklas |
249 |
/> |
5319 |
20 Apr 10 |
nicklas |
250 |
</m:menu> |
5319 |
20 Apr 10 |
nicklas |
251 |
<% |
5319 |
20 Apr 10 |
nicklas |
252 |
} |
2912 |
15 Nov 06 |
nicklas |
253 |
else if ("recentItems".equals(name) && sc != null && sc.isLoggedIn()) |
2907 |
14 Nov 06 |
nicklas |
254 |
{ |
2907 |
14 Nov 06 |
nicklas |
255 |
// Recently used items menu |
3492 |
14 Jun 07 |
nicklas |
256 |
String stickyItems = Values.getString(sc.getUserClientSetting("menu.mostRecent"), |
2907 |
14 Nov 06 |
nicklas |
257 |
"EXPERIMENT:BIOASSAYSET:TRANSFORMATION"); |
2907 |
14 Nov 06 |
nicklas |
258 |
boolean loadNames = Values.getBoolean(sc.getUserClientSetting("menu.mostRecent.loadNames"), |
3500 |
15 Jun 07 |
nicklas |
259 |
true); |
3492 |
14 Jun 07 |
nicklas |
260 |
String recentItems = sc.getUserClientSetting("menu.mostRecent.viewed"); |
7954 |
12 May 21 |
nicklas |
261 |
DbControl dc = loadNames ? sc.newDbControl(":Recent items menu") : null; |
2907 |
14 Nov 06 |
nicklas |
262 |
try |
2907 |
14 Nov 06 |
nicklas |
263 |
{ |
2907 |
14 Nov 06 |
nicklas |
264 |
%> |
2907 |
14 Nov 06 |
nicklas |
265 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
266 |
id="menu.mostRecent" |
2907 |
14 Nov 06 |
nicklas |
267 |
style="display: none;" |
2907 |
14 Nov 06 |
nicklas |
268 |
> |
2907 |
14 Nov 06 |
nicklas |
269 |
<% |
2907 |
14 Nov 06 |
nicklas |
270 |
int numItems = 0; |
3492 |
14 Jun 07 |
nicklas |
271 |
// Recently viewed items |
3492 |
14 Jun 07 |
nicklas |
272 |
List<String> recentlyViewed = recentItems == null ? |
3492 |
14 Jun 07 |
nicklas |
273 |
new ArrayList<String>() : Arrays.asList(recentItems.split(":")); |
3492 |
14 Jun 07 |
nicklas |
274 |
if (recentlyViewed.size() > 0) |
2907 |
14 Nov 06 |
nicklas |
275 |
{ |
3492 |
14 Jun 07 |
nicklas |
276 |
%> |
3492 |
14 Jun 07 |
nicklas |
277 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
278 |
title="<%=menu.getString("recentitems.title")%>" |
6617 |
24 Nov 14 |
nicklas |
279 |
subclass="menusection" |
3492 |
14 Jun 07 |
nicklas |
280 |
enabled="false" |
3492 |
14 Jun 07 |
nicklas |
281 |
/> |
3492 |
14 Jun 07 |
nicklas |
282 |
<m:menuseparator /> |
3492 |
14 Jun 07 |
nicklas |
283 |
<% |
3492 |
14 Jun 07 |
nicklas |
284 |
for (String recent : recentlyViewed) |
2907 |
14 Nov 06 |
nicklas |
285 |
{ |
3857 |
17 Oct 07 |
jari |
286 |
try |
2907 |
14 Nov 06 |
nicklas |
287 |
{ |
3857 |
17 Oct 07 |
jari |
288 |
String[] tmp = recent.split("="); |
3857 |
17 Oct 07 |
jari |
289 |
Item itemType = Item.valueOf(tmp[0]); |
5413 |
20 Sep 10 |
nicklas |
290 |
String itemTextKey = "item." + itemType.name().toLowerCase(); |
5413 |
20 Sep 10 |
nicklas |
291 |
String itemText = common.getString(itemTextKey); |
5413 |
20 Sep 10 |
nicklas |
292 |
if (itemText == itemTextKey) itemText = itemType.toString(); |
3857 |
17 Oct 07 |
jari |
293 |
int itemId = Values.getInt(tmp[1], 0); |
3857 |
17 Oct 07 |
jari |
294 |
if (itemId != 0) |
2907 |
14 Nov 06 |
nicklas |
295 |
{ |
3857 |
17 Oct 07 |
jari |
296 |
String shortName = ""; |
3857 |
17 Oct 07 |
jari |
297 |
String fullName = ""; |
6201 |
07 Nov 12 |
nicklas |
298 |
int noEdit = 1; |
3857 |
17 Oct 07 |
jari |
299 |
if (loadNames) |
3492 |
14 Jun 07 |
nicklas |
300 |
{ |
3857 |
17 Oct 07 |
jari |
301 |
try |
3857 |
17 Oct 07 |
jari |
302 |
{ |
3857 |
17 Oct 07 |
jari |
303 |
BasicItem item = itemType.getById(dc, itemId); |
3857 |
17 Oct 07 |
jari |
304 |
fullName = ((Nameable)item).getName(); |
3857 |
17 Oct 07 |
jari |
305 |
shortName = HTML.encodeTags(StringUtil.trimString(fullName, 35)); |
6201 |
07 Nov 12 |
nicklas |
306 |
noEdit = item.hasPermission(Permission.WRITE) ? 0 : 1; |
3857 |
17 Oct 07 |
jari |
307 |
} |
3857 |
17 Oct 07 |
jari |
308 |
catch (Throwable t) |
3857 |
17 Oct 07 |
jari |
309 |
{ |
3857 |
17 Oct 07 |
jari |
310 |
continue; |
3857 |
17 Oct 07 |
jari |
311 |
} |
3492 |
14 Jun 07 |
nicklas |
312 |
} |
3857 |
17 Oct 07 |
jari |
313 |
else |
3492 |
14 Jun 07 |
nicklas |
314 |
{ |
5413 |
20 Sep 10 |
nicklas |
315 |
fullName = itemText + "; id=" + itemId; |
5413 |
20 Sep 10 |
nicklas |
316 |
shortName = itemText + " (id=" + itemId + ")"; |
3492 |
14 Jun 07 |
nicklas |
317 |
} |
3857 |
17 Oct 07 |
jari |
318 |
numItems++; |
3857 |
17 Oct 07 |
jari |
319 |
%> |
3857 |
17 Oct 07 |
jari |
320 |
<m:menuitem |
3857 |
17 Oct 07 |
jari |
321 |
title="<%=numItems + ". " + shortName%>" |
6201 |
07 Nov 12 |
nicklas |
322 |
subclass="auto-init" |
6201 |
07 Nov 12 |
nicklas |
323 |
data-auto-init="item-link" |
6201 |
07 Nov 12 |
nicklas |
324 |
data-item-type="<%=itemType.name() %>" |
6201 |
07 Nov 12 |
nicklas |
325 |
data-item-id="<%=itemId %>" |
6201 |
07 Nov 12 |
nicklas |
326 |
data-no-edit="<%=noEdit %>" |
5413 |
20 Sep 10 |
nicklas |
327 |
tooltip="<%=menu.getString("gotorecentitem.tooltip", fullName, itemText)%>" |
3857 |
17 Oct 07 |
jari |
328 |
/> |
3857 |
17 Oct 07 |
jari |
329 |
<% |
2907 |
14 Nov 06 |
nicklas |
330 |
} |
2907 |
14 Nov 06 |
nicklas |
331 |
} |
3857 |
17 Oct 07 |
jari |
332 |
catch (Throwable t) |
3857 |
17 Oct 07 |
jari |
333 |
{} |
2907 |
14 Nov 06 |
nicklas |
334 |
} |
2907 |
14 Nov 06 |
nicklas |
335 |
} |
3492 |
14 Jun 07 |
nicklas |
336 |
if (stickyItems != null && stickyItems.length() > 0) |
2907 |
14 Nov 06 |
nicklas |
337 |
{ |
3492 |
14 Jun 07 |
nicklas |
338 |
int numSticky = 0; |
3492 |
14 Jun 07 |
nicklas |
339 |
if (numItems > 0) |
3492 |
14 Jun 07 |
nicklas |
340 |
{ |
3492 |
14 Jun 07 |
nicklas |
341 |
%> |
3492 |
14 Jun 07 |
nicklas |
342 |
<m:menuseparator /> |
3492 |
14 Jun 07 |
nicklas |
343 |
<% |
3492 |
14 Jun 07 |
nicklas |
344 |
} |
2907 |
14 Nov 06 |
nicklas |
345 |
%> |
2907 |
14 Nov 06 |
nicklas |
346 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
347 |
title="<%=menu.getString("stickyitems.title")%>" |
6617 |
24 Nov 14 |
nicklas |
348 |
subclass="menusection" |
3492 |
14 Jun 07 |
nicklas |
349 |
enabled="false" |
2907 |
14 Nov 06 |
nicklas |
350 |
/> |
3492 |
14 Jun 07 |
nicklas |
351 |
<m:menuseparator /> |
2907 |
14 Nov 06 |
nicklas |
352 |
<% |
3492 |
14 Jun 07 |
nicklas |
353 |
// Sticky items |
3492 |
14 Jun 07 |
nicklas |
354 |
for (String recentItem : stickyItems.split(":")) |
3492 |
14 Jun 07 |
nicklas |
355 |
{ |
3857 |
17 Oct 07 |
jari |
356 |
try |
3492 |
14 Jun 07 |
nicklas |
357 |
{ |
4338 |
17 Jun 08 |
nicklas |
358 |
BasicItem item = null; |
3857 |
17 Oct 07 |
jari |
359 |
Item itemType = Item.valueOf(recentItem); |
3857 |
17 Oct 07 |
jari |
360 |
ItemContext cc = sc.getCurrentContext(itemType); |
5413 |
20 Sep 10 |
nicklas |
361 |
String itemTextKey = "item." + itemType.name().toLowerCase(); |
5413 |
20 Sep 10 |
nicklas |
362 |
String itemText = common.getString(itemTextKey); |
5413 |
20 Sep 10 |
nicklas |
363 |
if (itemText == itemTextKey) itemText = itemType.toString(); |
3857 |
17 Oct 07 |
jari |
364 |
if (cc.getId() != 0) |
3492 |
14 Jun 07 |
nicklas |
365 |
{ |
3857 |
17 Oct 07 |
jari |
366 |
String shortName = ""; |
3857 |
17 Oct 07 |
jari |
367 |
String fullName = ""; |
6201 |
07 Nov 12 |
nicklas |
368 |
int noEdit = 1; |
3857 |
17 Oct 07 |
jari |
369 |
if (loadNames) |
3492 |
14 Jun 07 |
nicklas |
370 |
{ |
3857 |
17 Oct 07 |
jari |
371 |
try |
3857 |
17 Oct 07 |
jari |
372 |
{ |
4338 |
17 Jun 08 |
nicklas |
373 |
item = itemType.getById(dc, cc.getId()); |
3857 |
17 Oct 07 |
jari |
374 |
fullName = ((Nameable)item).getName(); |
3857 |
17 Oct 07 |
jari |
375 |
shortName = ": " + HTML.encodeTags(StringUtil.trimString(fullName, 30)); |
6201 |
07 Nov 12 |
nicklas |
376 |
noEdit = item.hasPermission(Permission.WRITE) ? 0 : 1; |
3857 |
17 Oct 07 |
jari |
377 |
} |
3857 |
17 Oct 07 |
jari |
378 |
catch (Throwable t) |
3857 |
17 Oct 07 |
jari |
379 |
{ |
3857 |
17 Oct 07 |
jari |
380 |
continue; |
3857 |
17 Oct 07 |
jari |
381 |
} |
3492 |
14 Jun 07 |
nicklas |
382 |
} |
3857 |
17 Oct 07 |
jari |
383 |
else |
3492 |
14 Jun 07 |
nicklas |
384 |
{ |
5413 |
20 Sep 10 |
nicklas |
385 |
fullName = itemText + "; id=" + cc.getId(); |
3857 |
17 Oct 07 |
jari |
386 |
shortName = " (id=" + cc.getId() + ")"; |
3492 |
14 Jun 07 |
nicklas |
387 |
} |
3857 |
17 Oct 07 |
jari |
388 |
numItems++; |
3857 |
17 Oct 07 |
jari |
389 |
numSticky++; |
3492 |
14 Jun 07 |
nicklas |
390 |
%> |
3492 |
14 Jun 07 |
nicklas |
391 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
392 |
title="<%=itemText + shortName%>" |
6201 |
07 Nov 12 |
nicklas |
393 |
subclass="auto-init" |
6201 |
07 Nov 12 |
nicklas |
394 |
data-auto-init="item-link" |
6201 |
07 Nov 12 |
nicklas |
395 |
data-item-type="<%=itemType.name() %>" |
6201 |
07 Nov 12 |
nicklas |
396 |
data-item-id="<%=cc.getId() %>" |
6201 |
07 Nov 12 |
nicklas |
397 |
data-no-edit="<%=noEdit %>" |
5413 |
20 Sep 10 |
nicklas |
398 |
tooltip="<%=menu.getString("gotorecentitem.tooltip", fullName, itemText)%>" |
3492 |
14 Jun 07 |
nicklas |
399 |
/> |
3492 |
14 Jun 07 |
nicklas |
400 |
<% |
3857 |
17 Oct 07 |
jari |
401 |
if (itemType == Item.BIOASSAYSET) |
3857 |
17 Oct 07 |
jari |
402 |
{ |
3857 |
17 Oct 07 |
jari |
403 |
// Add menu for Experiment explorer as well |
3857 |
17 Oct 07 |
jari |
404 |
%> |
3857 |
17 Oct 07 |
jari |
405 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
406 |
title="<%=menu.getString("experimentexplorer.title", shortName)%>" |
6201 |
07 Nov 12 |
nicklas |
407 |
url="<%=root+"views/experiments/explorer/view/index.jsp?ID=" + ID + "&bioassayset_id="+cc.getId()%>" |
5413 |
20 Sep 10 |
nicklas |
408 |
tooltip="<%=menu.getString("experimentexplorer.tooltip")%>" |
4338 |
17 Jun 08 |
nicklas |
409 |
visible="<%=item == null || ((BioAssaySet)item).getNumSpots() > 0 %>" |
3857 |
17 Oct 07 |
jari |
410 |
/> |
3857 |
17 Oct 07 |
jari |
411 |
<% |
3857 |
17 Oct 07 |
jari |
412 |
} |
3492 |
14 Jun 07 |
nicklas |
413 |
} |
3492 |
14 Jun 07 |
nicklas |
414 |
} |
3857 |
17 Oct 07 |
jari |
415 |
catch (Throwable t) |
3857 |
17 Oct 07 |
jari |
416 |
{} |
3492 |
14 Jun 07 |
nicklas |
417 |
} |
3492 |
14 Jun 07 |
nicklas |
418 |
if (numSticky == 0) |
3492 |
14 Jun 07 |
nicklas |
419 |
{ |
3492 |
14 Jun 07 |
nicklas |
420 |
%> |
3492 |
14 Jun 07 |
nicklas |
421 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
422 |
title="<%="<i>- " + menu.getString("nostickyitems.title") + " -</i>"%>" |
3492 |
14 Jun 07 |
nicklas |
423 |
enabled="false" |
3492 |
14 Jun 07 |
nicklas |
424 |
/> |
3492 |
14 Jun 07 |
nicklas |
425 |
<% |
3492 |
14 Jun 07 |
nicklas |
426 |
} |
2907 |
14 Nov 06 |
nicklas |
427 |
} |
2907 |
14 Nov 06 |
nicklas |
428 |
%> |
2907 |
14 Nov 06 |
nicklas |
429 |
<m:menuseparator /> |
2907 |
14 Nov 06 |
nicklas |
430 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
431 |
title="<%=menu.getString("recentoptions.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
432 |
url="<%=root+"my_base/user/preferences.jsp?ID="+ID+"&page=mostRecent"%>" |
6201 |
07 Nov 12 |
nicklas |
433 |
data-popup="Preferences, 600, 400" |
5413 |
20 Sep 10 |
nicklas |
434 |
tooltip="<%=menu.getString("recentoptions.tooltip")%>" |
2907 |
14 Nov 06 |
nicklas |
435 |
/> |
2907 |
14 Nov 06 |
nicklas |
436 |
</m:menu> |
2907 |
14 Nov 06 |
nicklas |
437 |
<% |
2907 |
14 Nov 06 |
nicklas |
438 |
} |
2907 |
14 Nov 06 |
nicklas |
439 |
finally |
2907 |
14 Nov 06 |
nicklas |
440 |
{ |
2907 |
14 Nov 06 |
nicklas |
441 |
if (dc != null) dc.close(); |
2907 |
14 Nov 06 |
nicklas |
442 |
} |
2907 |
14 Nov 06 |
nicklas |
443 |
} |
216 |
22 Mar 05 |
nicklas |
444 |
else if ("standard".equals(name)) |
204 |
18 Mar 05 |
nicklas |
445 |
{ |
7954 |
12 May 21 |
nicklas |
446 |
final DbControl dc = sc.newDbControl(":Default menu"); |
2818 |
30 Oct 06 |
nicklas |
447 |
StringBuilder fillText = new StringBuilder(); |
369 |
05 Apr 05 |
nicklas |
448 |
try |
369 |
05 Apr 05 |
nicklas |
449 |
{ |
4738 |
04 Feb 09 |
martin |
450 |
Project activeProject = sc.getActiveProjectId() == 0 ? null : Project.getById(dc, sc.getActiveProjectId()); |
4738 |
04 Feb 09 |
martin |
451 |
if (activeProject == null) |
4738 |
04 Feb 09 |
martin |
452 |
{ |
6135 |
18 Sep 12 |
nicklas |
453 |
fillText.append("<img src=\""+root+"images/no_active_project.png\" alt=\"\"> "); |
6201 |
07 Nov 12 |
nicklas |
454 |
fillText.append("<span style=\"color:#FF0000;\" title=\"" + menu.getString("menu.projects.tooltip.0") + "\""); |
4738 |
04 Feb 09 |
martin |
455 |
} |
4738 |
04 Feb 09 |
martin |
456 |
else |
4738 |
04 Feb 09 |
martin |
457 |
{ |
6135 |
18 Sep 12 |
nicklas |
458 |
fillText.append("<img src=\""+root+"images/project.png\" alt=\"\"> "); |
6201 |
07 Nov 12 |
nicklas |
459 |
fillText.append("<span title=\"" + menu.getString("menu.projects.tooltip.1") + "\""); |
4738 |
04 Feb 09 |
martin |
460 |
} |
4738 |
04 Feb 09 |
martin |
461 |
|
6201 |
07 Nov 12 |
nicklas |
462 |
fillText.append(" class=\"link auto-init\" data-auto-init=\"menu-anchor\" data-menu-id=\"menu.projects\" data-align-right=\"1\">"); |
5970 |
17 Feb 12 |
nicklas |
463 |
fillText.append(activeProject == null ? "<i>" + menu.getString("noactiveproject.title") + "</i>" : HTML.encodeTags(activeProject.getName())); |
6201 |
07 Nov 12 |
nicklas |
464 |
fillText.append("<img src=\""+root+"images/sort_asc.png\" alt=\"▼\"></span><span class=\"menuseparator\"></span>"); |
4738 |
04 Feb 09 |
martin |
465 |
|
6201 |
07 Nov 12 |
nicklas |
466 |
fillText.append("<span id=\"page-reload\" class=\"link\" title=\"" + menu.getString("menu.refresh.tooltip") + "\">"); |
6201 |
07 Nov 12 |
nicklas |
467 |
fillText.append("<img src=\""+root+"images/refresh.png\" alt=\"Reload\"></span>"); |
6201 |
07 Nov 12 |
nicklas |
468 |
fillText.append("<span class=\"menuseparator\"></span>"); |
3017 |
11 Dec 06 |
martin |
469 |
|
6201 |
07 Nov 12 |
nicklas |
470 |
fillText.append("<span class=\"link auto-init\" title=\"").append(menu.getString("menu.recentitems.tooltip")).append("\""); |
6201 |
07 Nov 12 |
nicklas |
471 |
fillText.append(" data-auto-init=\"menu-anchor\" data-menu-id=\"menu.mostRecent\" data-align-right=\"1\">"); |
6201 |
07 Nov 12 |
nicklas |
472 |
fillText.append("<img src=\""+root+"images/recent.png\" alt=\"Recent\"><img src=\""+root+"images/sort_asc.png\" alt=\"▼\"></span>"); |
6201 |
07 Nov 12 |
nicklas |
473 |
fillText.append("<span class=\"menuseparator\"></span>"); |
2907 |
14 Nov 06 |
nicklas |
474 |
|
369 |
05 Apr 05 |
nicklas |
475 |
User user = User.getById(dc, sc.getLoggedInUserId()); |
6201 |
07 Nov 12 |
nicklas |
476 |
fillText.append("<img src=\""+root+"images/take_ownership.png\" alt=\"\"> "); |
6201 |
07 Nov 12 |
nicklas |
477 |
fillText.append("<span class=\"link auto-init\" title=\"").append(menu.getString("menu.user.tooltip")).append("\""); |
6201 |
07 Nov 12 |
nicklas |
478 |
fillText.append(" data-auto-init=\"menu-anchor\" data-menu-id=\"menu.switchuser\" data-align-right=\"1\">"); |
2818 |
30 Oct 06 |
nicklas |
479 |
fillText.append(HTML.encodeTags(user.getLogin())); |
6201 |
07 Nov 12 |
nicklas |
480 |
fillText.append(" (").append(user.getName()).append(")<img src=\""+root+"images/sort_asc.png\" alt=\"▼\"></span>"); |
6201 |
07 Nov 12 |
nicklas |
481 |
|
1460 |
13 Oct 05 |
gregory |
482 |
// Permission settings |
6742 |
17 Feb 15 |
nicklas |
483 |
final boolean hasItemLists = !sc.hasPermission(Permission.DENIED, Item.ITEMLIST); |
1405 |
06 Oct 05 |
gregory |
484 |
final boolean hasFiles = !sc.hasPermission(Permission.DENIED, Item.FILE); |
1405 |
06 Oct 05 |
gregory |
485 |
final boolean createFiles = sc.hasPermission(Permission.CREATE, Item.FILE); |
5361 |
14 Jun 10 |
nicklas |
486 |
final boolean hasFileServers = !sc.hasPermission(Permission.DENIED, Item.FILESERVER); |
1405 |
06 Oct 05 |
gregory |
487 |
|
1405 |
06 Oct 05 |
gregory |
488 |
final boolean hasProjects = !sc.hasPermission(Permission.DENIED, Item.PROJECT); |
1405 |
06 Oct 05 |
gregory |
489 |
final boolean createProjects = sc.hasPermission(Permission.CREATE, Item.PROJECT); |
5370 |
23 Jun 10 |
nicklas |
490 |
final boolean hasPermissionTemplates = !sc.hasPermission(Permission.DENIED, Item.PERMISSIONTEMPLATE); |
1405 |
06 Oct 05 |
gregory |
491 |
|
1405 |
06 Oct 05 |
gregory |
492 |
final boolean hasMessages = !sc.hasPermission(Permission.DENIED, Item.MESSAGE); |
1405 |
06 Oct 05 |
gregory |
493 |
final boolean createMessages = sc.hasPermission(Permission.CREATE, Item.MESSAGE); |
1405 |
06 Oct 05 |
gregory |
494 |
|
5685 |
04 Aug 11 |
nicklas |
495 |
final boolean hasPhysicalBioAssays = !sc.hasPermission(Permission.DENIED, Item.PHYSICALBIOASSAY); |
5685 |
04 Aug 11 |
nicklas |
496 |
final boolean hasDerivedBioAssays = !sc.hasPermission(Permission.DENIED, Item.DERIVEDBIOASSAY); |
1405 |
06 Oct 05 |
gregory |
497 |
|
1672 |
30 Nov 05 |
nicklas |
498 |
final boolean hasRawBioAssays = !sc.hasPermission(Permission.DENIED, Item.RAWBIOASSAY); |
1932 |
07 Feb 06 |
gregory |
499 |
final boolean createRawBioAssays = sc.hasPermission(Permission.CREATE, Item.RAWBIOASSAY); |
1675 |
01 Dec 05 |
nicklas |
500 |
final boolean hasExperiments = !sc.hasPermission(Permission.DENIED, Item.EXPERIMENT); |
1932 |
07 Feb 06 |
gregory |
501 |
final boolean createExperiments = sc.hasPermission(Permission.CREATE, Item.EXPERIMENT); |
2107 |
24 Mar 06 |
nicklas |
502 |
final boolean hasFormulas = !sc.hasPermission(Permission.DENIED, Item.FORMULA); |
2107 |
24 Mar 06 |
nicklas |
503 |
final boolean createFormulas = sc.hasPermission(Permission.CREATE, Item.FORMULA); |
1606 |
14 Nov 05 |
nicklas |
504 |
|
1606 |
14 Nov 05 |
nicklas |
505 |
final boolean hasReporters = !sc.hasPermission(Permission.DENIED, Item.REPORTER); |
2149 |
04 Apr 06 |
nicklas |
506 |
final boolean hasReporterLists = !sc.hasPermission(Permission.DENIED, Item.REPORTERLIST); |
1932 |
07 Feb 06 |
gregory |
507 |
final boolean createReporters = sc.hasPermission(Permission.CREATE, Item.REPORTER); |
1619 |
16 Nov 05 |
nicklas |
508 |
final boolean hasJobs = !sc.hasPermission(Permission.DENIED, Item.JOB); |
1663 |
24 Nov 05 |
nicklas |
509 |
final boolean hasSessions = !sc.hasPermission(Permission.DENIED, Item.SESSION); |
7407 |
05 Oct 17 |
nicklas |
510 |
final boolean hasDevices = !sc.hasPermission(Permission.DENIED, Item.USERDEVICE); |
7407 |
05 Oct 17 |
nicklas |
511 |
final boolean supportsDeviceVerification = EmailUtil.isEnabled() && |
7407 |
05 Oct 17 |
nicklas |
512 |
(user.getUseDeviceVerification() || sc.hasPermission(Permission.READ, Item.USERDEVICE)); |
500 |
02 May 05 |
nicklas |
513 |
%> |
1405 |
06 Oct 05 |
gregory |
514 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
515 |
id="menu.view" |
1405 |
06 Oct 05 |
gregory |
516 |
style="display: none" |
1405 |
06 Oct 05 |
gregory |
517 |
> |
572 |
12 May 05 |
nicklas |
518 |
<m:menuitem |
5409 |
16 Sep 10 |
nicklas |
519 |
title="<%=menu.getString("home.title")%>" |
5409 |
16 Sep 10 |
nicklas |
520 |
tooltip="<%=menu.getString("home.tooltip")%>" |
6201 |
07 Nov 12 |
nicklas |
521 |
url="<%=root+"my_base/index.jsp?ID="+ID%>" |
572 |
12 May 05 |
nicklas |
522 |
/> |
2213 |
04 May 06 |
nicklas |
523 |
<m:menuitem |
5409 |
16 Sep 10 |
nicklas |
524 |
title="<%=menu.getString("allitems.title")%>" |
5409 |
16 Sep 10 |
nicklas |
525 |
tooltip="<%=menu.getString("allitems.tooltip")%>" |
6201 |
07 Nov 12 |
nicklas |
526 |
url="<%=root+"views/items/index.jsp?ID="+ID%>" |
2902 |
14 Nov 06 |
nicklas |
527 |
/> |
2902 |
14 Nov 06 |
nicklas |
528 |
<m:menuitem |
6742 |
17 Feb 15 |
nicklas |
529 |
title="<%=menu.getString("itemlists.title")%>" |
6742 |
17 Feb 15 |
nicklas |
530 |
tooltip="<%=menu.getString("itemlists.tooltip", hasItemLists)%>" |
6742 |
17 Feb 15 |
nicklas |
531 |
url="<%=root+"views/itemlists/index.jsp?ID="+ID%>" |
6742 |
17 Feb 15 |
nicklas |
532 |
enabled="<%=hasItemLists%>" |
6742 |
17 Feb 15 |
nicklas |
533 |
/> |
6742 |
17 Feb 15 |
nicklas |
534 |
<m:menuitem |
5409 |
16 Sep 10 |
nicklas |
535 |
title="<%=menu.getString("trashcan.title")%>" |
5409 |
16 Sep 10 |
nicklas |
536 |
tooltip="<%=menu.getString("trashcan.tooltip")%>" |
6201 |
07 Nov 12 |
nicklas |
537 |
url="<%=root+"views/trashcan/index.jsp?ID="+ID%>" |
2213 |
04 May 06 |
nicklas |
538 |
/> |
2213 |
04 May 06 |
nicklas |
539 |
<m:menuseparator /> |
500 |
02 May 05 |
nicklas |
540 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
541 |
title="<%=common.getString("item.file+")%>" |
6201 |
07 Nov 12 |
nicklas |
542 |
url="<%=root+"filemanager/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
543 |
tooltip="<%=menu.getString("files.tooltip", hasFiles)%>" |
1794 |
19 Jan 06 |
nicklas |
544 |
enabled="<%=hasFiles%>" |
1794 |
19 Jan 06 |
nicklas |
545 |
/> |
5361 |
14 Jun 10 |
nicklas |
546 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
547 |
title="<%=common.getString("item.fileserver+")%>" |
6201 |
07 Nov 12 |
nicklas |
548 |
url="<%=root+"filemanager/fileservers/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
549 |
tooltip="<%=menu.getString("fileservers.tooltip", hasFileServers)%>" |
5361 |
14 Jun 10 |
nicklas |
550 |
enabled="<%=hasFileServers%>" |
5361 |
14 Jun 10 |
nicklas |
551 |
/> |
1405 |
06 Oct 05 |
gregory |
552 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
553 |
title="<%=common.getString("item.project+")%>" |
6201 |
07 Nov 12 |
nicklas |
554 |
url="<%=root+"my_base/projects/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
555 |
tooltip="<%=menu.getString("projects.tooltip", hasProjects)%>" |
1405 |
06 Oct 05 |
gregory |
556 |
enabled="<%=hasProjects%>" |
1405 |
06 Oct 05 |
gregory |
557 |
/> |
5370 |
23 Jun 10 |
nicklas |
558 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
559 |
title="<%=common.getString("item.permissiontemplate+")%>" |
6201 |
07 Nov 12 |
nicklas |
560 |
url="<%=root+"views/permissiontemplates/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
561 |
tooltip="<%=menu.getString("permissiontemplates.tooltip", hasPermissionTemplates)%>" |
5370 |
23 Jun 10 |
nicklas |
562 |
enabled="<%=hasPermissionTemplates%>" |
5370 |
23 Jun 10 |
nicklas |
563 |
/> |
1405 |
06 Oct 05 |
gregory |
564 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
565 |
title="<%=common.getString("item.message+")%>" |
6201 |
07 Nov 12 |
nicklas |
566 |
url="<%=root+"my_base/messages/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
567 |
tooltip="<%=menu.getString("messages.tooltip", hasMessages)%>" |
833 |
28 Jun 05 |
nicklas |
568 |
enabled="<%=hasMessages%>" |
833 |
28 Jun 05 |
nicklas |
569 |
/> |
1619 |
16 Nov 05 |
nicklas |
570 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
571 |
title="<%=common.getString("item.job+")%>" |
6201 |
07 Nov 12 |
nicklas |
572 |
url="<%=root+"views/jobs/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
573 |
tooltip="<%=menu.getString("jobs.tooltip", hasJobs)%>" |
1619 |
16 Nov 05 |
nicklas |
574 |
enabled="<%=hasJobs%>" |
1619 |
16 Nov 05 |
nicklas |
575 |
/> |
1405 |
06 Oct 05 |
gregory |
576 |
<m:menuseparator /> |
1405 |
06 Oct 05 |
gregory |
577 |
<m:menuitem |
5642 |
26 May 11 |
nicklas |
578 |
title="<%=common.getString("item.physicalbioassay+")%>" |
6201 |
07 Nov 12 |
nicklas |
579 |
url="<%=root+"views/physicalbioassays/index.jsp?ID="+ID%>" |
5642 |
26 May 11 |
nicklas |
580 |
tooltip="<%=menu.getString("physicalbioassays.tooltip", hasPhysicalBioAssays)%>" |
5642 |
26 May 11 |
nicklas |
581 |
enabled="<%=hasPhysicalBioAssays%>" |
1405 |
06 Oct 05 |
gregory |
582 |
/> |
1405 |
06 Oct 05 |
gregory |
583 |
<m:menuitem |
5685 |
04 Aug 11 |
nicklas |
584 |
title="<%=common.getString("item.derivedbioassay+")%>" |
6201 |
07 Nov 12 |
nicklas |
585 |
url="<%=root+"views/derivedbioassays/index.jsp?ID="+ID%>" |
5685 |
04 Aug 11 |
nicklas |
586 |
tooltip="<%=menu.getString("derivedbioassays.tooltip", hasDerivedBioAssays)%>" |
5685 |
04 Aug 11 |
nicklas |
587 |
enabled="<%=hasDerivedBioAssays%>" |
5657 |
16 Jun 11 |
nicklas |
588 |
/> |
5657 |
16 Jun 11 |
nicklas |
589 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
590 |
title="<%=common.getString("item.rawbioassay+")%>" |
6201 |
07 Nov 12 |
nicklas |
591 |
url="<%=root+"views/rawbioassays/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
592 |
tooltip="<%=menu.getString("rawbioassays.tooltip", hasRawBioAssays)%>" |
1672 |
30 Nov 05 |
nicklas |
593 |
enabled="<%=hasRawBioAssays%>" |
1672 |
30 Nov 05 |
nicklas |
594 |
/> |
1675 |
01 Dec 05 |
nicklas |
595 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
596 |
title="<%=common.getString("item.experiment+")%>" |
6201 |
07 Nov 12 |
nicklas |
597 |
url="<%=root+"views/experiments/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
598 |
tooltip="<%=menu.getString("experiments.tooltip", hasExperiments)%>" |
1675 |
01 Dec 05 |
nicklas |
599 |
enabled="<%=hasExperiments%>" |
1675 |
01 Dec 05 |
nicklas |
600 |
/> |
2107 |
24 Mar 06 |
nicklas |
601 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
602 |
title="<%=common.getString("item.formula+")%>" |
6201 |
07 Nov 12 |
nicklas |
603 |
url="<%=root+"views/formulas/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
604 |
tooltip="<%=menu.getString("formulas.tooltip", hasFormulas)%>" |
2107 |
24 Mar 06 |
nicklas |
605 |
enabled="<%=hasFormulas%>" |
2107 |
24 Mar 06 |
nicklas |
606 |
/> |
1606 |
14 Nov 05 |
nicklas |
607 |
<m:menuseparator /> |
1606 |
14 Nov 05 |
nicklas |
608 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
609 |
title="<%=common.getString("item.reporter+")%>" |
6201 |
07 Nov 12 |
nicklas |
610 |
url="<%=root+"views/reporters/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
611 |
tooltip="<%=menu.getString("reporters.tooltip", hasReporters)%>" |
1606 |
14 Nov 05 |
nicklas |
612 |
enabled="<%=hasReporters%>" |
1606 |
14 Nov 05 |
nicklas |
613 |
/> |
2149 |
04 Apr 06 |
nicklas |
614 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
615 |
title="<%=common.getString("item.reporterlist+")%>" |
6201 |
07 Nov 12 |
nicklas |
616 |
url="<%=root+"views/reporterlists/index.jsp?ID="+ID%>" |
5409 |
16 Sep 10 |
nicklas |
617 |
tooltip="<%=menu.getString("reporterlists.tooltip", hasReporterLists)%>" |
2149 |
04 Apr 06 |
nicklas |
618 |
enabled="<%=hasReporterLists%>" |
2149 |
04 Apr 06 |
nicklas |
619 |
/> |
1405 |
06 Oct 05 |
gregory |
620 |
</m:menu> |
1405 |
06 Oct 05 |
gregory |
621 |
|
1405 |
06 Oct 05 |
gregory |
622 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
623 |
id="menu.base" |
1405 |
06 Oct 05 |
gregory |
624 |
style="display: none" |
1405 |
06 Oct 05 |
gregory |
625 |
> |
572 |
12 May 05 |
nicklas |
626 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
627 |
subid="menu.projects" |
5413 |
20 Sep 10 |
nicklas |
628 |
title="<%=menu.getString("menu.projects")%>" |
5413 |
20 Sep 10 |
nicklas |
629 |
tooltip="<%=menu.getString("menu.projects.tooltip", activeProject != null)%>" |
572 |
12 May 05 |
nicklas |
630 |
enabled="<%=hasProjects%>" |
572 |
12 May 05 |
nicklas |
631 |
/> |
572 |
12 May 05 |
nicklas |
632 |
<m:menuseparator /> |
500 |
02 May 05 |
nicklas |
633 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
634 |
title="<%=menu.getString("contactinfo.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
635 |
url="<%=root+"my_base/user/settings.jsp?ID="+ID+"&page=contact"%>" |
6201 |
07 Nov 12 |
nicklas |
636 |
data-popup="Settings, 600, 400" |
5413 |
20 Sep 10 |
nicklas |
637 |
tooltip="<%=menu.getString("contactinfo.tooltip")%>" |
500 |
02 May 05 |
nicklas |
638 |
/> |
500 |
02 May 05 |
nicklas |
639 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
640 |
title="<%=menu.getString("password.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
641 |
url="<%=root+"my_base/user/settings.jsp?ID="+ID+"&page=password"%>" |
6201 |
07 Nov 12 |
nicklas |
642 |
data-popup="Settings, 600, 400" |
5413 |
20 Sep 10 |
nicklas |
643 |
tooltip="<%=menu.getString("password.tooltip")%>" |
500 |
02 May 05 |
nicklas |
644 |
/> |
572 |
12 May 05 |
nicklas |
645 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
646 |
title="<%=menu.getString("other.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
647 |
url="<%=root+"my_base/user/settings.jsp?ID="+ID+"&page=other"%>" |
6201 |
07 Nov 12 |
nicklas |
648 |
data-popup="Settings, 600, 400" |
5413 |
20 Sep 10 |
nicklas |
649 |
tooltip="<%=menu.getString("other.tooltip")%>" |
572 |
12 May 05 |
nicklas |
650 |
/> |
553 |
11 May 05 |
nicklas |
651 |
<m:menuseparator /> |
500 |
02 May 05 |
nicklas |
652 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
653 |
title="<%=menu.getString("preferences.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
654 |
url="<%=root+"my_base/user/preferences.jsp?ID="+ID%>" |
6201 |
07 Nov 12 |
nicklas |
655 |
data-popup="Preferences, 600, 400" |
5413 |
20 Sep 10 |
nicklas |
656 |
tooltip="<%=menu.getString("preferences.tooltip")%>" |
500 |
02 May 05 |
nicklas |
657 |
/> |
966 |
20 Jul 05 |
nicklas |
658 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
659 |
title="<%=menu.getString("reloadpermissions.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
660 |
url="<%=root+"my_base/user/submit_user.jsp?ID="+ID+"&cmd=ReloadPermissions"%>" |
6201 |
07 Nov 12 |
nicklas |
661 |
data-popup="ReloadPermissions, 300, 200" |
5413 |
20 Sep 10 |
nicklas |
662 |
tooltip="<%=menu.getString("reloadpermissions.tooltip")%>" |
966 |
20 Jul 05 |
nicklas |
663 |
/> |
4376 |
04 Jul 08 |
nicklas |
664 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
665 |
title="<%=menu.getString("resetlistsettings.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
666 |
url="<%=root+"my_base/user/reset_filters.jsp?ID="+ID%>" |
6201 |
07 Nov 12 |
nicklas |
667 |
data-popup="ResetFilter, 450, 300" |
5413 |
20 Sep 10 |
nicklas |
668 |
tooltip="<%=menu.getString("resetlistsettings.tooltip")%>" |
4376 |
04 Jul 08 |
nicklas |
669 |
/> |
572 |
12 May 05 |
nicklas |
670 |
<m:menuseparator /> |
553 |
11 May 05 |
nicklas |
671 |
<m:menuitem |
7407 |
05 Oct 17 |
nicklas |
672 |
title="<%=common.getString("item.userdevice+")%>" |
7407 |
05 Oct 17 |
nicklas |
673 |
url="<%=root+"views/devices/index.jsp?ID="+ID%>" |
7407 |
05 Oct 17 |
nicklas |
674 |
tooltip="<%=menu.getString("devices.tooltip", hasDevices)%>" |
7815 |
05 Jun 20 |
nicklas |
675 |
enabled="<%=hasDevices%>" |
7407 |
05 Oct 17 |
nicklas |
676 |
/> |
7407 |
05 Oct 17 |
nicklas |
677 |
<m:menuitem |
7407 |
05 Oct 17 |
nicklas |
678 |
title="<%=common.getString("item.session+")%>" |
7407 |
05 Oct 17 |
nicklas |
679 |
url="<%=root+"views/sessions/index.jsp?ID="+ID%>" |
7407 |
05 Oct 17 |
nicklas |
680 |
tooltip="<%=menu.getString("sessions.tooltip", hasSessions)%>" |
7407 |
05 Oct 17 |
nicklas |
681 |
enabled="<%=hasSessions%>" |
7407 |
05 Oct 17 |
nicklas |
682 |
/> |
7407 |
05 Oct 17 |
nicklas |
683 |
<m:menuseparator /> |
7407 |
05 Oct 17 |
nicklas |
684 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
685 |
title="<%=menu.getString("logout.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
686 |
url="<%=root+"logout.jsp?ID="+ID%>" |
6201 |
07 Nov 12 |
nicklas |
687 |
data-popup="Logout, 300, 200" |
5413 |
20 Sep 10 |
nicklas |
688 |
tooltip="<%=menu.getString("logout.tooltip")%>" |
553 |
11 May 05 |
nicklas |
689 |
/> |
572 |
12 May 05 |
nicklas |
690 |
</m:menu> |
572 |
12 May 05 |
nicklas |
691 |
<% |
4695 |
09 Dec 08 |
martin |
692 |
// BioLIMS - menu |
5632 |
17 May 11 |
nicklas |
693 |
final boolean hasTags = !sc.hasPermission(Permission.DENIED, Item.TAG); |
5632 |
17 May 11 |
nicklas |
694 |
final boolean createTags = sc.hasPermission(Permission.CREATE, Item.TAG); |
4695 |
09 Dec 08 |
martin |
695 |
|
4695 |
09 Dec 08 |
martin |
696 |
final boolean hasBioSources = !sc.hasPermission(Permission.DENIED, Item.BIOSOURCE); |
4695 |
09 Dec 08 |
martin |
697 |
final boolean createBioSources = sc.hasPermission(Permission.CREATE, Item.BIOSOURCE); |
4695 |
09 Dec 08 |
martin |
698 |
|
4695 |
09 Dec 08 |
martin |
699 |
final boolean hasSamples = !sc.hasPermission(Permission.DENIED, Item.SAMPLE); |
4695 |
09 Dec 08 |
martin |
700 |
final boolean createSamples = sc.hasPermission(Permission.CREATE, Item.SAMPLE); |
4695 |
09 Dec 08 |
martin |
701 |
|
4695 |
09 Dec 08 |
martin |
702 |
final boolean hasExtracts = !sc.hasPermission(Permission.DENIED, Item.EXTRACT); |
4695 |
09 Dec 08 |
martin |
703 |
final boolean createExtracts = sc.hasPermission(Permission.CREATE, Item.EXTRACT); |
4695 |
09 Dec 08 |
martin |
704 |
|
4695 |
09 Dec 08 |
martin |
705 |
final boolean hasBioPlates = !sc.hasPermission(Permission.DENIED, Item.BIOPLATE); |
4695 |
09 Dec 08 |
martin |
706 |
final boolean createBioPlates = sc.hasPermission(Permission.CREATE, Item.BIOPLATE); |
5262 |
08 Mar 10 |
nicklas |
707 |
final boolean hasBioPlateTypes = !sc.hasPermission(Permission.DENIED, Item.BIOPLATETYPE); |
5525 |
06 Dec 10 |
nicklas |
708 |
final boolean hasBioPlateEventTypes = !sc.hasPermission(Permission.DENIED, Item.BIOPLATEEVENTTYPE); |
6991 |
02 Nov 15 |
nicklas |
709 |
|
6991 |
02 Nov 15 |
nicklas |
710 |
final boolean hasKits = !sc.hasPermission(Permission.DENIED, Item.KIT); |
6991 |
02 Nov 15 |
nicklas |
711 |
|
5632 |
17 May 11 |
nicklas |
712 |
final boolean hasBioLims = hasTags || hasBioSources || hasSamples || hasExtracts || |
6991 |
02 Nov 15 |
nicklas |
713 |
hasBioPlates || hasBioPlateTypes || hasBioPlateEventTypes || |
6991 |
02 Nov 15 |
nicklas |
714 |
hasKits; |
4695 |
09 Dec 08 |
martin |
715 |
|
4695 |
09 Dec 08 |
martin |
716 |
if (hasBioLims) |
4695 |
09 Dec 08 |
martin |
717 |
{ |
4695 |
09 Dec 08 |
martin |
718 |
%> |
4695 |
09 Dec 08 |
martin |
719 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
720 |
id="menu.biolims" |
4695 |
09 Dec 08 |
martin |
721 |
style="display: none" |
4695 |
09 Dec 08 |
martin |
722 |
> |
4695 |
09 Dec 08 |
martin |
723 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
724 |
title="<%=common.getString("item.biosource+")%>" |
6201 |
07 Nov 12 |
nicklas |
725 |
url="<%=root+"biomaterials/biosources/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
726 |
tooltip="<%=menu.getString("biosources.tooltip", hasBioSources)%>" |
4695 |
09 Dec 08 |
martin |
727 |
enabled="<%=hasBioSources%>" |
4695 |
09 Dec 08 |
martin |
728 |
/> |
4695 |
09 Dec 08 |
martin |
729 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
730 |
title="<%=common.getString("item.sample+")%>" |
6201 |
07 Nov 12 |
nicklas |
731 |
url="<%=root+"biomaterials/samples/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
732 |
tooltip="<%=menu.getString("samples.tooltip", hasSamples)%>" |
4695 |
09 Dec 08 |
martin |
733 |
enabled="<%=hasSamples%>" |
4695 |
09 Dec 08 |
martin |
734 |
/> |
4695 |
09 Dec 08 |
martin |
735 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
736 |
title="<%=common.getString("item.extract+")%>" |
6201 |
07 Nov 12 |
nicklas |
737 |
url="<%=root+"biomaterials/extracts/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
738 |
tooltip="<%=menu.getString("extracts.tooltip", hasExtracts)%>" |
4695 |
09 Dec 08 |
martin |
739 |
enabled="<%=hasExtracts%>" |
4695 |
09 Dec 08 |
martin |
740 |
/> |
6991 |
02 Nov 15 |
nicklas |
741 |
<m:menuseparator /> |
4695 |
09 Dec 08 |
martin |
742 |
<m:menuitem |
5632 |
17 May 11 |
nicklas |
743 |
title="<%=common.getString("item.tag+")%>" |
6201 |
07 Nov 12 |
nicklas |
744 |
url="<%=root+"biomaterials/tags/index.jsp?ID="+ID%>" |
5632 |
17 May 11 |
nicklas |
745 |
tooltip="<%=menu.getString("tags.tooltip", hasTags)%>" |
5632 |
17 May 11 |
nicklas |
746 |
enabled="<%=hasTags%>" |
4695 |
09 Dec 08 |
martin |
747 |
/> |
6991 |
02 Nov 15 |
nicklas |
748 |
<m:menuitem |
6991 |
02 Nov 15 |
nicklas |
749 |
title="<%=common.getString("item.kit+")%>" |
6991 |
02 Nov 15 |
nicklas |
750 |
url="<%=root+"biomaterials/kits/index.jsp?ID="+ID%>" |
6991 |
02 Nov 15 |
nicklas |
751 |
tooltip="<%=menu.getString("kits.tooltip", hasKits)%>" |
6991 |
02 Nov 15 |
nicklas |
752 |
enabled="<%=hasKits%>" |
6991 |
02 Nov 15 |
nicklas |
753 |
/> |
4695 |
09 Dec 08 |
martin |
754 |
<m:menuseparator /> |
4695 |
09 Dec 08 |
martin |
755 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
756 |
title="<%=common.getString("item.bioplate+")%>" |
6201 |
07 Nov 12 |
nicklas |
757 |
url="<%=root+"biomaterials/bioplates/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
758 |
tooltip="<%=menu.getString("bioplates.tooltip", hasBioPlates)%>" |
4704 |
11 Dec 08 |
martin |
759 |
enabled="<%=hasBioPlates%>" |
4704 |
11 Dec 08 |
martin |
760 |
/> |
4704 |
11 Dec 08 |
martin |
761 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
762 |
title="<%=common.getString("item.bioplatetype+")%>" |
6201 |
07 Nov 12 |
nicklas |
763 |
url="<%=root+"biomaterials/bioplatetypes/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
764 |
tooltip="<%=menu.getString("bioplatetypes.tooltip", hasBioPlateTypes)%>" |
5262 |
08 Mar 10 |
nicklas |
765 |
enabled="<%=hasBioPlateTypes%>" |
5262 |
08 Mar 10 |
nicklas |
766 |
/> |
5262 |
08 Mar 10 |
nicklas |
767 |
<m:menuitem |
5525 |
06 Dec 10 |
nicklas |
768 |
title="<%=common.getString("item.bioplateeventtype+")%>" |
6201 |
07 Nov 12 |
nicklas |
769 |
url="<%=root+"biomaterials/bioplateeventtypes/index.jsp?ID="+ID%>" |
5525 |
06 Dec 10 |
nicklas |
770 |
tooltip="<%=menu.getString("bioplateeventtypes.tooltip", hasBioPlateEventTypes)%>" |
5525 |
06 Dec 10 |
nicklas |
771 |
enabled="<%=hasBioPlateEventTypes%>" |
4695 |
09 Dec 08 |
martin |
772 |
/> |
4695 |
09 Dec 08 |
martin |
773 |
</m:menu> |
4695 |
09 Dec 08 |
martin |
774 |
<% |
4695 |
09 Dec 08 |
martin |
775 |
} |
4695 |
09 Dec 08 |
martin |
776 |
|
890 |
07 Jul 05 |
nicklas |
777 |
// Array LIMS - menu |
890 |
07 Jul 05 |
nicklas |
778 |
final boolean hasPlateGeometries = sc.hasPermission(Permission.READ, Item.PLATEGEOMETRY); |
1652 |
22 Nov 05 |
nicklas |
779 |
final boolean hasPlateTypes = !sc.hasPermission(Permission.DENIED, Item.PLATETYPE); |
1652 |
22 Nov 05 |
nicklas |
780 |
final boolean hasPlates = !sc.hasPermission(Permission.DENIED, Item.PLATE); |
1652 |
22 Nov 05 |
nicklas |
781 |
final boolean hasPlateMappings = !sc.hasPermission(Permission.DENIED, Item.PLATEMAPPING); |
1652 |
22 Nov 05 |
nicklas |
782 |
final boolean hasArraySlides = !sc.hasPermission(Permission.DENIED, Item.ARRAYSLIDE); |
1666 |
25 Nov 05 |
nicklas |
783 |
final boolean hasArrayBatches = !sc.hasPermission(Permission.DENIED, Item.ARRAYBATCH); |
1652 |
22 Nov 05 |
nicklas |
784 |
final boolean hasArrayDesigns = !sc.hasPermission(Permission.DENIED, Item.ARRAYDESIGN); |
1652 |
22 Nov 05 |
nicklas |
785 |
final boolean hasLims = hasPlateGeometries || hasPlateTypes || hasPlates || hasPlateMappings || |
1666 |
25 Nov 05 |
nicklas |
786 |
hasArraySlides || hasArrayBatches || hasArrayDesigns; |
890 |
07 Jul 05 |
nicklas |
787 |
if (hasLims) |
890 |
07 Jul 05 |
nicklas |
788 |
{ |
890 |
07 Jul 05 |
nicklas |
789 |
%> |
890 |
07 Jul 05 |
nicklas |
790 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
791 |
id="menu.lims" |
890 |
07 Jul 05 |
nicklas |
792 |
style="display: none" |
890 |
07 Jul 05 |
nicklas |
793 |
> |
890 |
07 Jul 05 |
nicklas |
794 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
795 |
title="<%=common.getString("item.plategeometry+")%>" |
6201 |
07 Nov 12 |
nicklas |
796 |
url="<%=root+"lims/geometries/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
797 |
tooltip="<%=menu.getString("plategeometries.tooltip", hasPlateGeometries)%>" |
890 |
07 Jul 05 |
nicklas |
798 |
enabled="<%=hasPlateGeometries%>" |
890 |
07 Jul 05 |
nicklas |
799 |
/> |
891 |
07 Jul 05 |
nicklas |
800 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
801 |
title="<%=common.getString("item.platetype+")%>" |
6201 |
07 Nov 12 |
nicklas |
802 |
url="<%=root+"lims/platetypes/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
803 |
tooltip="<%=menu.getString("platetypes.tooltip", hasPlateTypes)%>" |
891 |
07 Jul 05 |
nicklas |
804 |
enabled="<%=hasPlateTypes%>" |
891 |
07 Jul 05 |
nicklas |
805 |
/> |
892 |
07 Jul 05 |
nicklas |
806 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
807 |
title="<%=common.getString("item.plate+")%>" |
6201 |
07 Nov 12 |
nicklas |
808 |
url="<%=root+"lims/plates/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
809 |
tooltip="<%=menu.getString("plates.tooltip", hasPlates)%>" |
1652 |
22 Nov 05 |
nicklas |
810 |
enabled="<%=hasPlates%>" |
1652 |
22 Nov 05 |
nicklas |
811 |
/> |
1652 |
22 Nov 05 |
nicklas |
812 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
813 |
title="<%=common.getString("item.platemapping+")%>" |
6201 |
07 Nov 12 |
nicklas |
814 |
url="<%=root+"lims/platemappings/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
815 |
tooltip="<%=menu.getString("platetypes.tooltip", hasPlateTypes)%>" |
892 |
07 Jul 05 |
nicklas |
816 |
enabled="<%=hasPlateTypes%>" |
892 |
07 Jul 05 |
nicklas |
817 |
/> |
890 |
07 Jul 05 |
nicklas |
818 |
<m:menuseparator /> |
1460 |
13 Oct 05 |
gregory |
819 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
820 |
title="<%=common.getString("item.arraydesign+")%>" |
6201 |
07 Nov 12 |
nicklas |
821 |
url="<%=root+"lims/arraydesigns/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
822 |
tooltip="<%=menu.getString("arraydesigns.tooltip", hasArrayDesigns)%>" |
1460 |
13 Oct 05 |
gregory |
823 |
enabled="<%=hasArrayDesigns%>" |
1460 |
13 Oct 05 |
gregory |
824 |
/> |
1460 |
13 Oct 05 |
gregory |
825 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
826 |
title="<%=common.getString("item.arraybatch+")%>" |
6201 |
07 Nov 12 |
nicklas |
827 |
url="<%=root+"lims/arraybatches/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
828 |
tooltip="<%=menu.getString("arraybatches.tooltip", hasArrayBatches)%>" |
1666 |
25 Nov 05 |
nicklas |
829 |
enabled="<%=hasArrayBatches%>" |
1666 |
25 Nov 05 |
nicklas |
830 |
/> |
1666 |
25 Nov 05 |
nicklas |
831 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
832 |
title="<%=common.getString("item.arrayslide+")%>" |
6201 |
07 Nov 12 |
nicklas |
833 |
url="<%=root+"lims/arrayslides/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
834 |
tooltip="<%=menu.getString("arrayslides.tooltip", hasArraySlides)%>" |
1460 |
13 Oct 05 |
gregory |
835 |
enabled="<%=hasArraySlides%>" |
1460 |
13 Oct 05 |
gregory |
836 |
/> |
890 |
07 Jul 05 |
nicklas |
837 |
</m:menu> |
890 |
07 Jul 05 |
nicklas |
838 |
<% |
890 |
07 Jul 05 |
nicklas |
839 |
} |
700 |
01 Jun 05 |
nicklas |
840 |
// Administrate -> Types menu |
700 |
01 Jun 05 |
nicklas |
841 |
final boolean hasQuotaTypes = sc.hasPermission(Permission.READ, Item.QUOTATYPE); |
700 |
01 Jun 05 |
nicklas |
842 |
final boolean hasMimeTypes = sc.hasPermission(Permission.READ, Item.MIMETYPE); |
2515 |
14 Aug 06 |
nicklas |
843 |
final boolean hasAnnotationTypeCategories = !sc.hasPermission(Permission.DENIED, Item.ANNOTATIONTYPECATEGORY); |
945 |
15 Jul 05 |
nicklas |
844 |
final boolean hasAnnotationTypes = !sc.hasPermission(Permission.DENIED, Item.ANNOTATIONTYPE); |
1604 |
14 Nov 05 |
nicklas |
845 |
final boolean hasReporterTypes = !sc.hasPermission(Permission.DENIED, Item.REPORTERTYPE); |
2658 |
22 Sep 06 |
nicklas |
846 |
final boolean hasExtraValueTypes = !sc.hasPermission(Permission.DENIED, Item.EXTRAVALUETYPE); |
4543 |
22 Sep 08 |
nicklas |
847 |
final boolean hasQuantities = !sc.hasPermission(Permission.DENIED, Item.QUANTITY); |
5630 |
13 May 11 |
nicklas |
848 |
final boolean hasItemSubtypes = sc.hasPermission(Permission.READ, Item.ITEMSUBTYPE); |
5630 |
13 May 11 |
nicklas |
849 |
final boolean hasTypes = hasMimeTypes || hasQuotaTypes || |
5630 |
13 May 11 |
nicklas |
850 |
hasAnnotationTypeCategories || hasAnnotationTypes || |
5630 |
13 May 11 |
nicklas |
851 |
hasReporterTypes || hasExtraValueTypes || hasQuantities || hasItemSubtypes; |
700 |
01 Jun 05 |
nicklas |
852 |
if (hasTypes) |
700 |
01 Jun 05 |
nicklas |
853 |
{ |
700 |
01 Jun 05 |
nicklas |
854 |
%> |
700 |
01 Jun 05 |
nicklas |
855 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
856 |
id="menu.types" |
700 |
01 Jun 05 |
nicklas |
857 |
style="display: none" |
700 |
01 Jun 05 |
nicklas |
858 |
> |
700 |
01 Jun 05 |
nicklas |
859 |
<m:menuitem |
5630 |
13 May 11 |
nicklas |
860 |
title="<%=common.getString("item.itemsubtype+")%>" |
6201 |
07 Nov 12 |
nicklas |
861 |
url="<%=root+"admin/itemsubtypes/index.jsp?ID="+ID%>" |
5630 |
13 May 11 |
nicklas |
862 |
tooltip="<%=menu.getString("itemsubtypes.tooltip", hasItemSubtypes)%>" |
5630 |
13 May 11 |
nicklas |
863 |
enabled="<%=hasItemSubtypes%>" |
700 |
01 Jun 05 |
nicklas |
864 |
/> |
5631 |
16 May 11 |
nicklas |
865 |
<m:menuseparator /> |
700 |
01 Jun 05 |
nicklas |
866 |
<m:menuitem |
5630 |
13 May 11 |
nicklas |
867 |
title="<%=common.getString("item.annotationtype+")%>" |
6201 |
07 Nov 12 |
nicklas |
868 |
url="<%=root+"admin/annotationtypes/index.jsp?ID="+ID%>" |
5630 |
13 May 11 |
nicklas |
869 |
tooltip="<%=menu.getString("annotationtypes.tooltip", hasAnnotationTypes)%>" |
5630 |
13 May 11 |
nicklas |
870 |
enabled="<%=hasAnnotationTypes%>" |
705 |
01 Jun 05 |
nicklas |
871 |
/> |
705 |
01 Jun 05 |
nicklas |
872 |
<m:menuitem |
5630 |
13 May 11 |
nicklas |
873 |
title="<%=common.getString("item.annotationtypecategory+")%>" |
6201 |
07 Nov 12 |
nicklas |
874 |
url="<%=root+"admin/annotationtypecategories/index.jsp?ID="+ID%>" |
5630 |
13 May 11 |
nicklas |
875 |
tooltip="<%=menu.getString("annotationtypecategories.tooltip", hasAnnotationTypeCategories)%>" |
5630 |
13 May 11 |
nicklas |
876 |
enabled="<%=hasAnnotationTypeCategories%>" |
700 |
01 Jun 05 |
nicklas |
877 |
/> |
5630 |
13 May 11 |
nicklas |
878 |
<m:menuseparator /> |
700 |
01 Jun 05 |
nicklas |
879 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
880 |
title="<%=common.getString("item.mimetype+")%>" |
6201 |
07 Nov 12 |
nicklas |
881 |
url="<%=root+"admin/mimetypes/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
882 |
tooltip="<%=menu.getString("mimetypes.tooltip", hasMimeTypes)%>" |
700 |
01 Jun 05 |
nicklas |
883 |
enabled="<%=hasMimeTypes%>" |
700 |
01 Jun 05 |
nicklas |
884 |
/> |
700 |
01 Jun 05 |
nicklas |
885 |
<m:menuitem |
5630 |
13 May 11 |
nicklas |
886 |
title="<%=common.getString("item.quotatype+")%>" |
6201 |
07 Nov 12 |
nicklas |
887 |
url="<%=root+"admin/quotatypes/index.jsp?ID="+ID%>" |
5630 |
13 May 11 |
nicklas |
888 |
tooltip="<%=menu.getString("quotatypes.tooltip", hasQuotaTypes)%>" |
5630 |
13 May 11 |
nicklas |
889 |
enabled="<%=hasQuotaTypes%>" |
700 |
01 Jun 05 |
nicklas |
890 |
/> |
700 |
01 Jun 05 |
nicklas |
891 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
892 |
title="<%=common.getString("item.reportertype+")%>" |
6201 |
07 Nov 12 |
nicklas |
893 |
url="<%=root+"admin/reportertypes/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
894 |
tooltip="<%=menu.getString("reportertypes.tooltip", hasReporterTypes)%>" |
1604 |
14 Nov 05 |
nicklas |
895 |
enabled="<%=hasReporterTypes%>" |
1604 |
14 Nov 05 |
nicklas |
896 |
/> |
2658 |
22 Sep 06 |
nicklas |
897 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
898 |
title="<%=common.getString("item.extravaluetype+")%>" |
6201 |
07 Nov 12 |
nicklas |
899 |
url="<%=root+"admin/extravaluetypes/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
900 |
tooltip="<%=menu.getString("extravaluetypes.tooltip", hasExtraValueTypes)%>" |
2658 |
22 Sep 06 |
nicklas |
901 |
enabled="<%=hasExtraValueTypes%>" |
2658 |
22 Sep 06 |
nicklas |
902 |
/> |
5630 |
13 May 11 |
nicklas |
903 |
<m:menuseparator /> |
5630 |
13 May 11 |
nicklas |
904 |
<m:menuitem |
5630 |
13 May 11 |
nicklas |
905 |
title="<%=menu.getString("units+quantities.title")%>" |
6201 |
07 Nov 12 |
nicklas |
906 |
url="<%=root+"admin/quantities/index.jsp?ID="+ID%>" |
5630 |
13 May 11 |
nicklas |
907 |
tooltip="<%=menu.getString("units+quantities.tooltip", hasQuantities)%>" |
5630 |
13 May 11 |
nicklas |
908 |
enabled="<%=hasQuantities%>" |
5630 |
13 May 11 |
nicklas |
909 |
/> |
700 |
01 Jun 05 |
nicklas |
910 |
</m:menu> |
700 |
01 Jun 05 |
nicklas |
911 |
<% |
700 |
01 Jun 05 |
nicklas |
912 |
} |
3820 |
12 Oct 07 |
nicklas |
913 |
// Administrate -> Platforms menu |
3820 |
12 Oct 07 |
nicklas |
914 |
final boolean hasPlatforms = sc.hasPermission(Permission.READ, Item.PLATFORM); |
3820 |
12 Oct 07 |
nicklas |
915 |
final boolean hasFileSetMemberTypes = sc.hasPermission(Permission.READ, Item.DATAFILETYPE); |
3820 |
12 Oct 07 |
nicklas |
916 |
final boolean hasTopPlatforms = hasPlatforms || hasFileSetMemberTypes; |
3820 |
12 Oct 07 |
nicklas |
917 |
if (hasTopPlatforms) |
3820 |
12 Oct 07 |
nicklas |
918 |
{ |
3820 |
12 Oct 07 |
nicklas |
919 |
%> |
3820 |
12 Oct 07 |
nicklas |
920 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
921 |
id="menu.platforms" |
3820 |
12 Oct 07 |
nicklas |
922 |
style="display: none" |
3820 |
12 Oct 07 |
nicklas |
923 |
> |
3820 |
12 Oct 07 |
nicklas |
924 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
925 |
title="<%=common.getString("item.platform+")%>" |
6201 |
07 Nov 12 |
nicklas |
926 |
url="<%=root+"admin/platforms/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
927 |
tooltip="<%=menu.getString("platforms.tooltip", hasPlatforms)%>" |
3820 |
12 Oct 07 |
nicklas |
928 |
enabled="<%=hasPlatforms%>" |
3820 |
12 Oct 07 |
nicklas |
929 |
/> |
3820 |
12 Oct 07 |
nicklas |
930 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
931 |
title="<%=common.getString("item.datafiletype+")%>" |
6201 |
07 Nov 12 |
nicklas |
932 |
url="<%=root+"admin/datafiletypes/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
933 |
tooltip="<%=menu.getString("datafiletypes.tooltip", hasFileSetMemberTypes)%>" |
3820 |
12 Oct 07 |
nicklas |
934 |
enabled="<%=hasFileSetMemberTypes%>" |
3820 |
12 Oct 07 |
nicklas |
935 |
/> |
3820 |
12 Oct 07 |
nicklas |
936 |
</m:menu> |
3820 |
12 Oct 07 |
nicklas |
937 |
<% |
3820 |
12 Oct 07 |
nicklas |
938 |
} |
1342 |
15 Sep 05 |
nicklas |
939 |
// Plugins menu |
1382 |
27 Sep 05 |
nicklas |
940 |
final boolean hasPluginTypes = !sc.hasPermission(Permission.DENIED, Item.PLUGINTYPE); |
1342 |
15 Sep 05 |
nicklas |
941 |
final boolean hasPluginDefinitions = !sc.hasPermission(Permission.DENIED, Item.PLUGINDEFINITION); |
1342 |
15 Sep 05 |
nicklas |
942 |
final boolean hasPluginConfigurations = !sc.hasPermission(Permission.DENIED, Item.PLUGINCONFIGURATION); |
2629 |
08 Sep 06 |
nicklas |
943 |
final boolean hasJobAgents = sc.hasPermission(Permission.READ, Item.JOBAGENT); |
2629 |
08 Sep 06 |
nicklas |
944 |
final boolean hasPlugins = hasPluginTypes || hasPluginDefinitions || |
2629 |
08 Sep 06 |
nicklas |
945 |
hasPluginConfigurations || hasJobAgents; |
1342 |
15 Sep 05 |
nicklas |
946 |
|
1342 |
15 Sep 05 |
nicklas |
947 |
if (hasPlugins) |
1342 |
15 Sep 05 |
nicklas |
948 |
{ |
1342 |
15 Sep 05 |
nicklas |
949 |
%> |
1342 |
15 Sep 05 |
nicklas |
950 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
951 |
id="menu.plugins" |
1342 |
15 Sep 05 |
nicklas |
952 |
style="display: none" |
1342 |
15 Sep 05 |
nicklas |
953 |
> |
5616 |
27 Apr 11 |
nicklas |
954 |
<m:menuitem |
5616 |
27 Apr 11 |
nicklas |
955 |
title="<%=menu.getString("installedextensions.title")%>" |
6201 |
07 Nov 12 |
nicklas |
956 |
url="<%=root+"admin/extensions/index.jsp?ID="+ID%>" |
5616 |
27 Apr 11 |
nicklas |
957 |
tooltip="<%=menu.getString("installedextensions.tooltip")%>" |
5616 |
27 Apr 11 |
nicklas |
958 |
/> |
5616 |
27 Apr 11 |
nicklas |
959 |
<m:menuseparator /> |
1342 |
15 Sep 05 |
nicklas |
960 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
961 |
title="<%=menu.getString("plugintypes.title")%>" |
6201 |
07 Nov 12 |
nicklas |
962 |
url="<%=root+"admin/plugintypes/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
963 |
tooltip="<%=menu.getString("plugintypes.tooltip", hasPluginTypes)%>" |
1382 |
27 Sep 05 |
nicklas |
964 |
enabled="<%=hasPluginTypes%>" |
1382 |
27 Sep 05 |
nicklas |
965 |
/> |
1382 |
27 Sep 05 |
nicklas |
966 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
967 |
title="<%=menu.getString("plugindefinitions.title")%>" |
6201 |
07 Nov 12 |
nicklas |
968 |
url="<%=root+"admin/plugindefinitions/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
969 |
tooltip="<%=menu.getString("plugindefinitions.tooltip", hasPluginDefinitions)%>" |
1342 |
15 Sep 05 |
nicklas |
970 |
enabled="<%=hasPluginDefinitions%>" |
1342 |
15 Sep 05 |
nicklas |
971 |
/> |
1342 |
15 Sep 05 |
nicklas |
972 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
973 |
title="<%=menu.getString("pluginconfigurations.title")%>" |
6201 |
07 Nov 12 |
nicklas |
974 |
url="<%=root+"admin/pluginconfigurations/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
975 |
tooltip="<%=menu.getString("pluginconfigurations.tooltip", hasPluginConfigurations)%>" |
1342 |
15 Sep 05 |
nicklas |
976 |
enabled="<%=hasPluginConfigurations%>" |
1342 |
15 Sep 05 |
nicklas |
977 |
/> |
2629 |
08 Sep 06 |
nicklas |
978 |
<m:menuseparator /> |
2629 |
08 Sep 06 |
nicklas |
979 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
980 |
title="<%=common.getString("item.jobagent+")%>" |
6201 |
07 Nov 12 |
nicklas |
981 |
url="<%=root+"admin/jobagents/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
982 |
tooltip="<%=menu.getString("jobagents.tooltip", hasJobAgents)%>" |
2629 |
08 Sep 06 |
nicklas |
983 |
enabled="<%=hasJobAgents%>" |
2629 |
08 Sep 06 |
nicklas |
984 |
/> |
1342 |
15 Sep 05 |
nicklas |
985 |
</m:menu> |
1342 |
15 Sep 05 |
nicklas |
986 |
<% |
1342 |
15 Sep 05 |
nicklas |
987 |
} |
572 |
12 May 05 |
nicklas |
988 |
// Administrate menu |
4903 |
24 Apr 09 |
nicklas |
989 |
final boolean hasUsers = !sc.hasPermission(Permission.DENIED, Item.USER); |
4903 |
24 Apr 09 |
nicklas |
990 |
final boolean hasGroups = !sc.hasPermission(Permission.DENIED, Item.GROUP); |
572 |
12 May 05 |
nicklas |
991 |
final boolean hasRoles = sc.hasPermission(Permission.READ, Item.ROLE); |
572 |
12 May 05 |
nicklas |
992 |
final boolean hasQuota = sc.hasPermission(Permission.READ, Item.QUOTA); |
2237 |
11 May 06 |
nicklas |
993 |
final boolean hasSoftware = !sc.hasPermission(Permission.DENIED, Item.SOFTWARE); |
2237 |
11 May 06 |
nicklas |
994 |
final boolean hasHardware = !sc.hasPermission(Permission.DENIED, Item.HARDWARE); |
2237 |
11 May 06 |
nicklas |
995 |
final boolean hasProtocols = !sc.hasPermission(Permission.DENIED, Item.PROTOCOL); |
572 |
12 May 05 |
nicklas |
996 |
final boolean hasClients = sc.hasPermission(Permission.READ, Item.CLIENT); |
572 |
12 May 05 |
nicklas |
997 |
final boolean hasNews = sc.hasPermission(Permission.READ, Item.NEWS); |
5877 |
16 Nov 11 |
nicklas |
998 |
final boolean hasReporterCloneTemplates = !sc.hasPermission(Permission.DENIED, Item.REPORTERCLONETEMPLATE); |
2927 |
16 Nov 06 |
nicklas |
999 |
final boolean hasDiskUsage = sc.hasPermission(Permission.READ, Item.DISKUSAGE); |
2927 |
16 Nov 06 |
nicklas |
1000 |
final Client currentClient = Client.getById(dc, sc.getClientId()); |
958 |
19 Jul 05 |
nicklas |
1001 |
final boolean hasServer = currentClient.hasPermission(Permission.WRITE); |
1342 |
15 Sep 05 |
nicklas |
1002 |
|
634 |
23 May 05 |
nicklas |
1003 |
final boolean hasAdministrate = |
1342 |
15 Sep 05 |
nicklas |
1004 |
hasUsers || hasGroups || hasRoles || hasQuota || hasTypes || hasPlugins || |
5877 |
16 Nov 11 |
nicklas |
1005 |
hasSoftware || hasHardware || hasProtocols || hasClients || hasNews || hasReporterCloneTemplates || |
3820 |
12 Oct 07 |
nicklas |
1006 |
hasDiskUsage || hasServer || hasTopPlatforms; |
634 |
23 May 05 |
nicklas |
1007 |
|
572 |
12 May 05 |
nicklas |
1008 |
if (hasAdministrate) |
572 |
12 May 05 |
nicklas |
1009 |
{ |
572 |
12 May 05 |
nicklas |
1010 |
%> |
572 |
12 May 05 |
nicklas |
1011 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
1012 |
id="menu.administrate" |
572 |
12 May 05 |
nicklas |
1013 |
style="display: none" |
572 |
12 May 05 |
nicklas |
1014 |
> |
572 |
12 May 05 |
nicklas |
1015 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1016 |
title="<%=common.getString("item.user+")%>" |
6201 |
07 Nov 12 |
nicklas |
1017 |
url="<%=root+"admin/users/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1018 |
tooltip="<%=menu.getString("users.tooltip", hasUsers)%>" |
572 |
12 May 05 |
nicklas |
1019 |
enabled="<%=hasUsers%>" |
572 |
12 May 05 |
nicklas |
1020 |
/> |
572 |
12 May 05 |
nicklas |
1021 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1022 |
title="<%=common.getString("item.group+")%>" |
6201 |
07 Nov 12 |
nicklas |
1023 |
url="<%=root+"admin/groups/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1024 |
tooltip="<%=menu.getString("groups.tooltip", hasGroups)%>" |
572 |
12 May 05 |
nicklas |
1025 |
enabled="<%=hasGroups%>" |
572 |
12 May 05 |
nicklas |
1026 |
/> |
572 |
12 May 05 |
nicklas |
1027 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1028 |
title="<%=common.getString("item.role+")%>" |
6201 |
07 Nov 12 |
nicklas |
1029 |
url="<%=root+"admin/roles/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1030 |
tooltip="<%=menu.getString("roles.tooltip", hasRoles)%>" |
572 |
12 May 05 |
nicklas |
1031 |
enabled="<%=hasRoles%>" |
572 |
12 May 05 |
nicklas |
1032 |
/> |
572 |
12 May 05 |
nicklas |
1033 |
<m:menuseparator /> |
1342 |
15 Sep 05 |
nicklas |
1034 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1035 |
subid="menu.plugins" |
5413 |
20 Sep 10 |
nicklas |
1036 |
title="<%=menu.getString("menu.plugins")%>" |
5413 |
20 Sep 10 |
nicklas |
1037 |
tooltip="<%=menu.getString("menu.plugins.tooltip")%>" |
1342 |
15 Sep 05 |
nicklas |
1038 |
enabled="<%=hasPlugins%>" |
1342 |
15 Sep 05 |
nicklas |
1039 |
/> |
1342 |
15 Sep 05 |
nicklas |
1040 |
<m:menuseparator /> |
572 |
12 May 05 |
nicklas |
1041 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1042 |
title="<%=common.getString("item.quota+")%>" |
6201 |
07 Nov 12 |
nicklas |
1043 |
url="<%=root+"admin/quota/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1044 |
tooltip="<%=menu.getString("quota.tooltip", hasQuota)%>" |
572 |
12 May 05 |
nicklas |
1045 |
enabled="<%=hasQuota%>" |
572 |
12 May 05 |
nicklas |
1046 |
/> |
572 |
12 May 05 |
nicklas |
1047 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1048 |
title="<%=common.getString("item.software+")%>" |
6201 |
07 Nov 12 |
nicklas |
1049 |
url="<%=root+"admin/software/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1050 |
tooltip="<%=menu.getString("software.tooltip", hasSoftware)%>" |
700 |
01 Jun 05 |
nicklas |
1051 |
enabled="<%=hasSoftware%>" |
572 |
12 May 05 |
nicklas |
1052 |
/> |
572 |
12 May 05 |
nicklas |
1053 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1054 |
title="<%=common.getString("item.hardware+")%>" |
6201 |
07 Nov 12 |
nicklas |
1055 |
url="<%=root+"admin/hardware/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1056 |
tooltip="<%=menu.getString("hardware.tooltip", hasHardware)%>" |
700 |
01 Jun 05 |
nicklas |
1057 |
enabled="<%=hasHardware%>" |
700 |
01 Jun 05 |
nicklas |
1058 |
/> |
700 |
01 Jun 05 |
nicklas |
1059 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1060 |
title="<%=common.getString("item.protocol+")%>" |
6201 |
07 Nov 12 |
nicklas |
1061 |
url="<%=root+"admin/protocols/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1062 |
tooltip="<%=menu.getString("protocols.tooltip", hasProtocols)%>" |
2100 |
22 Mar 06 |
martin |
1063 |
enabled="<%=hasProtocols%>" |
706 |
01 Jun 05 |
nicklas |
1064 |
/> |
706 |
01 Jun 05 |
nicklas |
1065 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1066 |
title="<%=common.getString("item.client+")%>" |
6201 |
07 Nov 12 |
nicklas |
1067 |
url="<%=root+"admin/clients/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1068 |
tooltip="<%=menu.getString("clients.tooltip", hasClients)%>" |
572 |
12 May 05 |
nicklas |
1069 |
enabled="<%=hasClients%>" |
572 |
12 May 05 |
nicklas |
1070 |
/> |
572 |
12 May 05 |
nicklas |
1071 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1072 |
title="<%=common.getString("item.news+")%>" |
6201 |
07 Nov 12 |
nicklas |
1073 |
url="<%=root+"admin/news/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1074 |
tooltip="<%=menu.getString("news.tooltip", hasNews)%>" |
572 |
12 May 05 |
nicklas |
1075 |
enabled="<%=hasNews%>" |
572 |
12 May 05 |
nicklas |
1076 |
/> |
5877 |
16 Nov 11 |
nicklas |
1077 |
<m:menuitem |
5877 |
16 Nov 11 |
nicklas |
1078 |
title="<%=common.getString("item.reporterclonetemplate+")%>" |
6201 |
07 Nov 12 |
nicklas |
1079 |
url="<%=root+"admin/reporterclonetemplates/index.jsp?ID="+ID%>" |
5877 |
16 Nov 11 |
nicklas |
1080 |
tooltip="<%=menu.getString("reporterclonetemplates.tooltip", hasReporterCloneTemplates)%>" |
5877 |
16 Nov 11 |
nicklas |
1081 |
enabled="<%=hasReporterCloneTemplates%>" |
5877 |
16 Nov 11 |
nicklas |
1082 |
/> |
634 |
23 May 05 |
nicklas |
1083 |
<m:menuseparator /> |
700 |
01 Jun 05 |
nicklas |
1084 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1085 |
subid="menu.platforms" |
5413 |
20 Sep 10 |
nicklas |
1086 |
title="<%=menu.getString("menu.platforms")%>" |
5413 |
20 Sep 10 |
nicklas |
1087 |
tooltip="<%=menu.getString("menu.platforms.tooltip")%>" |
3820 |
12 Oct 07 |
nicklas |
1088 |
enabled="<%=hasTopPlatforms%>" |
3820 |
12 Oct 07 |
nicklas |
1089 |
/> |
3820 |
12 Oct 07 |
nicklas |
1090 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1091 |
subid="menu.types" |
5413 |
20 Sep 10 |
nicklas |
1092 |
title="<%=menu.getString("menu.types")%>" |
5413 |
20 Sep 10 |
nicklas |
1093 |
tooltip="<%=menu.getString("menu.types.tooltip")%>" |
700 |
01 Jun 05 |
nicklas |
1094 |
enabled="<%=hasTypes%>" |
700 |
01 Jun 05 |
nicklas |
1095 |
/> |
700 |
01 Jun 05 |
nicklas |
1096 |
<m:menuseparator /> |
634 |
23 May 05 |
nicklas |
1097 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1098 |
title="<%=common.getString("item.diskusage+")%>" |
6201 |
07 Nov 12 |
nicklas |
1099 |
url="<%=root+"admin/diskusage/index.jsp?ID="+ID%>" |
5413 |
20 Sep 10 |
nicklas |
1100 |
tooltip="<%=menu.getString("diskusage.tooltip", hasDiskUsage)%>" |
2927 |
16 Nov 06 |
nicklas |
1101 |
enabled="<%=hasDiskUsage%>" |
2927 |
16 Nov 06 |
nicklas |
1102 |
/> |
2927 |
16 Nov 06 |
nicklas |
1103 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1104 |
title="<%=menu.getString("serversettings.title")+"…"%>" |
6201 |
07 Nov 12 |
nicklas |
1105 |
url="<%=root+"admin/server/configure.jsp?ID="+ID%>" |
6201 |
07 Nov 12 |
nicklas |
1106 |
data-popup="ServerSettings, 600, 400" |
5413 |
20 Sep 10 |
nicklas |
1107 |
tooltip="<%=menu.getString("serversettings.tooltip", hasServer)%>" |
634 |
23 May 05 |
nicklas |
1108 |
enabled="<%=hasServer%>" |
634 |
23 May 05 |
nicklas |
1109 |
/> |
4567 |
07 Oct 08 |
nicklas |
1110 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1111 |
title="<%=menu.getString("broadcast.title")+"…"%>" |
6201 |
07 Nov 12 |
nicklas |
1112 |
url="<%=root+"admin/server/broadcast.jsp?ID="+ID%>" |
6201 |
07 Nov 12 |
nicklas |
1113 |
data-popup="BroadcastMessage, 600, 400" |
5413 |
20 Sep 10 |
nicklas |
1114 |
tooltip="<%=menu.getString("broadcast.tooltip", hasServer)%>" |
4567 |
07 Oct 08 |
nicklas |
1115 |
enabled="<%=hasServer%>" |
4567 |
07 Oct 08 |
nicklas |
1116 |
/> |
1890 |
02 Feb 06 |
nicklas |
1117 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1118 |
title="<%=menu.getString("services.title")%>" |
5413 |
20 Sep 10 |
nicklas |
1119 |
tooltip="<%=menu.getString("services.tooltip", hasServer)%>" |
6201 |
07 Nov 12 |
nicklas |
1120 |
url="<%=root+"admin/services/index.jsp?ID="+ID%>" |
4320 |
29 May 08 |
nicklas |
1121 |
enabled="<%=hasServer%>" |
4320 |
29 May 08 |
nicklas |
1122 |
/> |
572 |
12 May 05 |
nicklas |
1123 |
</m:menu> |
572 |
12 May 05 |
nicklas |
1124 |
<% |
572 |
12 May 05 |
nicklas |
1125 |
} |
572 |
12 May 05 |
nicklas |
1126 |
// Help menu |
1960 |
10 Feb 06 |
martin |
1127 |
final String helplink = Values.getStringOrNull(sc.getClientDefaultSetting("server.links.help")); |
1960 |
10 Feb 06 |
martin |
1128 |
final String faqlink = Values.getStringOrNull(sc.getClientDefaultSetting("server.links.faq")); |
1960 |
10 Feb 06 |
martin |
1129 |
final String reportbuglink = Values.getStringOrNull(sc.getClientDefaultSetting("server.links.reportbug")); |
572 |
12 May 05 |
nicklas |
1130 |
%> |
6141 |
20 Sep 12 |
nicklas |
1131 |
<m:menu id="menu.help" style="display: none"> |
1960 |
10 Feb 06 |
martin |
1132 |
<m:menuitem |
1960 |
10 Feb 06 |
martin |
1133 |
visible="<%=HTML.isValidUrl(helplink)%>" |
5409 |
16 Sep 10 |
nicklas |
1134 |
title="<%=menu.getString("menu.help") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
1135 |
url="<%=helplink%>" |
6201 |
07 Nov 12 |
nicklas |
1136 |
data-target="Help" |
500 |
02 May 05 |
nicklas |
1137 |
/> |
1960 |
10 Feb 06 |
martin |
1138 |
<m:menuitem |
1960 |
10 Feb 06 |
martin |
1139 |
visible="<%=HTML.isValidUrl(faqlink)%>" |
5409 |
16 Sep 10 |
nicklas |
1140 |
title="<%=menu.getString("faq.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
1141 |
url="<%=faqlink%>" |
6201 |
07 Nov 12 |
nicklas |
1142 |
data-target="FAQ" |
5409 |
16 Sep 10 |
nicklas |
1143 |
tooltip="<%=menu.getString("faq.tooltip") %>" |
1960 |
10 Feb 06 |
martin |
1144 |
/> |
572 |
12 May 05 |
nicklas |
1145 |
<m:menuseparator /> |
1960 |
10 Feb 06 |
martin |
1146 |
|
1960 |
10 Feb 06 |
martin |
1147 |
<m:menuitem |
5409 |
16 Sep 10 |
nicklas |
1148 |
title="<%=menu.getString("about.title") + "…"%>" |
7998 |
10 Aug 21 |
nicklas |
1149 |
url="<%=root+"info/about.jsp?ID="+ID%>" |
7998 |
10 Aug 21 |
nicklas |
1150 |
data-popup="About, 650, 450" |
500 |
02 May 05 |
nicklas |
1151 |
/> |
1960 |
10 Feb 06 |
martin |
1152 |
<m:menuitem |
5409 |
16 Sep 10 |
nicklas |
1153 |
title="<%=menu.getString("license.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
1154 |
url="<%=root+"info/about.jsp?ID="+ID+"&page=license"%>" |
7998 |
10 Aug 21 |
nicklas |
1155 |
data-popup="About, 650, 450" |
1383 |
27 Sep 05 |
nicklas |
1156 |
/> |
1960 |
10 Feb 06 |
martin |
1157 |
<m:menuitem |
1960 |
10 Feb 06 |
martin |
1158 |
visible="<%=HTML.isValidUrl(reportbuglink)%>" |
5409 |
16 Sep 10 |
nicklas |
1159 |
title="<%=menu.getString("bugreport.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
1160 |
url="<%=reportbuglink%>" |
6201 |
07 Nov 12 |
nicklas |
1161 |
data-target="ReportBug" |
5409 |
16 Sep 10 |
nicklas |
1162 |
tooltip="<%=menu.getString("bugreport.tooltip")%>" |
572 |
12 May 05 |
nicklas |
1163 |
/> |
572 |
12 May 05 |
nicklas |
1164 |
<m:menuseparator /> |
1960 |
10 Feb 06 |
martin |
1165 |
<m:menuitem |
5409 |
16 Sep 10 |
nicklas |
1166 |
title="<%=menu.getString("basesite.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
1167 |
url="http://base.thep.lu.se" |
6201 |
07 Nov 12 |
nicklas |
1168 |
data-target="basesite" |
5409 |
16 Sep 10 |
nicklas |
1169 |
tooltip="<%=menu.getString("basesite.tooltip")%>" |
572 |
12 May 05 |
nicklas |
1170 |
/> |
500 |
02 May 05 |
nicklas |
1171 |
</m:menu> |
500 |
02 May 05 |
nicklas |
1172 |
<% |
2818 |
30 Oct 06 |
nicklas |
1173 |
//Switch user/logout menu |
2818 |
30 Oct 06 |
nicklas |
1174 |
final boolean hasImpersonate = |
2818 |
30 Oct 06 |
nicklas |
1175 |
!sc.isImpersonated() && sc.hasSystemPermission(Permission.ACT_AS_ANOTHER_USER); |
7294 |
17 Feb 17 |
nicklas |
1176 |
|
7294 |
17 Feb 17 |
nicklas |
1177 |
List<Role> roles = null; |
7294 |
17 Feb 17 |
nicklas |
1178 |
Set<Integer> roleIds = sc.getAllRoles(); |
7294 |
17 Feb 17 |
nicklas |
1179 |
if (roleIds != null && roleIds.size() > 0) |
7294 |
17 Feb 17 |
nicklas |
1180 |
{ |
7294 |
17 Feb 17 |
nicklas |
1181 |
ItemQuery<Role> roleQuery = Role.getQuery(); |
7294 |
17 Feb 17 |
nicklas |
1182 |
roleQuery.restrict(Restrictions.in(Hql.property("id"), Expressions.parameter("roles"))); |
7294 |
17 Feb 17 |
nicklas |
1183 |
roleQuery.setParameter("roles", roleIds, Type.INT); |
7294 |
17 Feb 17 |
nicklas |
1184 |
roleQuery.order(Orders.asc(Hql.property("name"))); |
7294 |
17 Feb 17 |
nicklas |
1185 |
roles = roleQuery.list(dc); |
7294 |
17 Feb 17 |
nicklas |
1186 |
} |
2818 |
30 Oct 06 |
nicklas |
1187 |
%> |
2818 |
30 Oct 06 |
nicklas |
1188 |
<m:menu |
6141 |
20 Sep 12 |
nicklas |
1189 |
id="menu.switchuser" |
2818 |
30 Oct 06 |
nicklas |
1190 |
style="display: none;" |
2818 |
30 Oct 06 |
nicklas |
1191 |
> |
2818 |
30 Oct 06 |
nicklas |
1192 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1193 |
title="<%=menu.getString("switchuser.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
1194 |
url="<%=root+"switch.jsp?ID="+ID%>" |
7531 |
26 Nov 18 |
nicklas |
1195 |
data-popup="Switch, 540, 360" |
5413 |
20 Sep 10 |
nicklas |
1196 |
tooltip="<%=menu.getString("switchuser.tooltip")%>" |
2818 |
30 Oct 06 |
nicklas |
1197 |
/> |
2818 |
30 Oct 06 |
nicklas |
1198 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1199 |
title="<%=menu.getString("impersonate.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
1200 |
url="<%=root+"impersonate.jsp?ID="+ID%>" |
6607 |
19 Nov 14 |
nicklas |
1201 |
data-popup="Impersonate, 480, 320" |
5413 |
20 Sep 10 |
nicklas |
1202 |
tooltip="<%=menu.getString("impersonate.tooltip")%>" |
2818 |
30 Oct 06 |
nicklas |
1203 |
visible="<%=hasImpersonate%>" |
2818 |
30 Oct 06 |
nicklas |
1204 |
/> |
2818 |
30 Oct 06 |
nicklas |
1205 |
<m:menuitem |
5413 |
20 Sep 10 |
nicklas |
1206 |
title="<%=menu.getString("logout.title") + "…"%>" |
6201 |
07 Nov 12 |
nicklas |
1207 |
url="<%=root+"logout.jsp?ID="+ID%>" |
6607 |
19 Nov 14 |
nicklas |
1208 |
data-popup="Logout, 360, 240" |
5413 |
20 Sep 10 |
nicklas |
1209 |
tooltip="<%=menu.getString("logout.tooltip")%>" |
2818 |
30 Oct 06 |
nicklas |
1210 |
/> |
7294 |
17 Feb 17 |
nicklas |
1211 |
<% |
7294 |
17 Feb 17 |
nicklas |
1212 |
if (roles != null && roles.size() > 0) |
7294 |
17 Feb 17 |
nicklas |
1213 |
{ |
7294 |
17 Feb 17 |
nicklas |
1214 |
%> |
7294 |
17 Feb 17 |
nicklas |
1215 |
<m:menuseparator /> |
7294 |
17 Feb 17 |
nicklas |
1216 |
<m:menuitem |
7294 |
17 Feb 17 |
nicklas |
1217 |
title="<%=menu.getString("myroles.title")%>" |
7294 |
17 Feb 17 |
nicklas |
1218 |
subclass="menusection" |
7294 |
17 Feb 17 |
nicklas |
1219 |
enabled="false" |
7294 |
17 Feb 17 |
nicklas |
1220 |
/> |
7294 |
17 Feb 17 |
nicklas |
1221 |
<m:menuseparator /> |
7294 |
17 Feb 17 |
nicklas |
1222 |
<% |
7294 |
17 Feb 17 |
nicklas |
1223 |
for (Role r : roles) |
7294 |
17 Feb 17 |
nicklas |
1224 |
{ |
7294 |
17 Feb 17 |
nicklas |
1225 |
boolean isInactive = sc.isRoleInactive(r.getId()); |
7294 |
17 Feb 17 |
nicklas |
1226 |
%> |
7294 |
17 Feb 17 |
nicklas |
1227 |
<m:menuitem |
7295 |
20 Feb 17 |
nicklas |
1228 |
title="<%=HTML.encodeTags(r.getName()) %>" |
7294 |
17 Feb 17 |
nicklas |
1229 |
tooltip="<%=menu.getString("myroles.tooltip", isInactive)%>" |
7294 |
17 Feb 17 |
nicklas |
1230 |
icon="<%=isInactive ? "option_unselected.png" : "option_selected.png"%>" |
7294 |
17 Feb 17 |
nicklas |
1231 |
url="<%=root+"my_base/toggle_active_role.jsp?ID="+ID+"&role_id="+r.getId()%>" |
7294 |
17 Feb 17 |
nicklas |
1232 |
data-popup="ActivateRole, 300, 200" |
7294 |
17 Feb 17 |
nicklas |
1233 |
/> |
7294 |
17 Feb 17 |
nicklas |
1234 |
<% |
7294 |
17 Feb 17 |
nicklas |
1235 |
} |
7295 |
20 Feb 17 |
nicklas |
1236 |
%> |
7295 |
20 Feb 17 |
nicklas |
1237 |
<m:menuseparator /> |
7295 |
20 Feb 17 |
nicklas |
1238 |
<m:menuitem |
7295 |
20 Feb 17 |
nicklas |
1239 |
title="<%=menu.getString("myroles.options") + "…"%>" |
7295 |
20 Feb 17 |
nicklas |
1240 |
url="<%=root+"my_base/user/preferences.jsp?ID="+ID+"&page=inactiveRoles"%>" |
7295 |
20 Feb 17 |
nicklas |
1241 |
data-popup="Preferences, 600, 400" |
7295 |
20 Feb 17 |
nicklas |
1242 |
tooltip="<%=menu.getString("myroles.options.tooltip")%>" |
7295 |
20 Feb 17 |
nicklas |
1243 |
/> |
7295 |
20 Feb 17 |
nicklas |
1244 |
<% |
7294 |
17 Feb 17 |
nicklas |
1245 |
} |
7294 |
17 Feb 17 |
nicklas |
1246 |
%> |
2818 |
30 Oct 06 |
nicklas |
1247 |
</m:menu> |
2818 |
30 Oct 06 |
nicklas |
1248 |
<% |
4187 |
20 Mar 08 |
nicklas |
1249 |
// Extensions menu |
6401 |
28 Jan 14 |
nicklas |
1250 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext); |
7605 |
26 Feb 19 |
nicklas |
1251 |
ExtensionsInvoker<MenuItemAction> invoker = ExtensionsControl.useExtensions(jspContext, |
4187 |
20 Mar 08 |
nicklas |
1252 |
"net.sf.basedb.clients.web.menu.extensions"); |
4187 |
20 Mar 08 |
nicklas |
1253 |
ExtensionsControl ec = ExtensionsControl.get(dc); |
4262 |
30 Apr 08 |
nicklas |
1254 |
ActionIterator<MenuItemAction> it = invoker.iterate(); |
4262 |
30 Apr 08 |
nicklas |
1255 |
Map<String, List<MenuItemAction>> menus = new HashMap<String, List<MenuItemAction>>(); |
4298 |
13 May 08 |
nicklas |
1256 |
menus.put("extensions", new LinkedList<MenuItemAction>()); |
5616 |
27 Apr 11 |
nicklas |
1257 |
int numExtensionMenues = 0; |
4262 |
30 Apr 08 |
nicklas |
1258 |
while (it.hasNext()) |
4262 |
30 Apr 08 |
nicklas |
1259 |
{ |
4262 |
30 Apr 08 |
nicklas |
1260 |
MenuItemAction action = it.next(); |
4262 |
30 Apr 08 |
nicklas |
1261 |
String menuId = action.getMenuId(); |
4262 |
30 Apr 08 |
nicklas |
1262 |
menuId = menuId == null ? "extensions" : "extensions." + menuId; |
4262 |
30 Apr 08 |
nicklas |
1263 |
List<MenuItemAction> actions = menus.get(menuId); |
4262 |
30 Apr 08 |
nicklas |
1264 |
if (actions == null) |
4262 |
30 Apr 08 |
nicklas |
1265 |
{ |
4262 |
30 Apr 08 |
nicklas |
1266 |
actions = new LinkedList<MenuItemAction>(); |
4262 |
30 Apr 08 |
nicklas |
1267 |
menus.put(menuId, actions); |
4262 |
30 Apr 08 |
nicklas |
1268 |
} |
4262 |
30 Apr 08 |
nicklas |
1269 |
actions.add(action); |
4262 |
30 Apr 08 |
nicklas |
1270 |
} |
4262 |
30 Apr 08 |
nicklas |
1271 |
for (Map.Entry<String, List<MenuItemAction>> entry : menus.entrySet()) |
4262 |
30 Apr 08 |
nicklas |
1272 |
{ |
4262 |
30 Apr 08 |
nicklas |
1273 |
String menuId = entry.getKey(); |
4262 |
30 Apr 08 |
nicklas |
1274 |
List<MenuItemAction> actions = entry.getValue(); |
5616 |
27 Apr 11 |
nicklas |
1275 |
if (actions.size() == 0) continue; |
4262 |
30 Apr 08 |
nicklas |
1276 |
%> |
6141 |
20 Sep 12 |
nicklas |
1277 |
<m:menu id="<%="menu."+menuId%>" style="display: none;"> |
4187 |
20 Mar 08 |
nicklas |
1278 |
<% |
4262 |
30 Apr 08 |
nicklas |
1279 |
for (MenuItemAction action : actions) |
4187 |
20 Mar 08 |
nicklas |
1280 |
{ |
5616 |
27 Apr 11 |
nicklas |
1281 |
numExtensionMenues++; |
6401 |
28 Jan 14 |
nicklas |
1282 |
Iterator<DynamicActionAttribute> dynamicAttributes = |
6401 |
28 Jan 14 |
nicklas |
1283 |
action instanceof DynamicActionAttributes ? |
6401 |
28 Jan 14 |
nicklas |
1284 |
((DynamicActionAttributes)action).getDynamicActionAttributes() : null; |
4262 |
30 Apr 08 |
nicklas |
1285 |
if (action.getType() == MenuItemAction.MenuType.SEPARATOR) |
4187 |
20 Mar 08 |
nicklas |
1286 |
{ |
4187 |
20 Mar 08 |
nicklas |
1287 |
%> |
6401 |
28 Jan 14 |
nicklas |
1288 |
<m:menuseparator |
6401 |
28 Jan 14 |
nicklas |
1289 |
id="<%=action.getId() %>" |
6401 |
28 Jan 14 |
nicklas |
1290 |
subclass="<%=action.getClazz() %>" |
6401 |
28 Jan 14 |
nicklas |
1291 |
style="<%=action.getStyle()%>" |
6401 |
28 Jan 14 |
nicklas |
1292 |
visible="<%=action.isVisible()%>" |
6401 |
28 Jan 14 |
nicklas |
1293 |
dynamic="<%=dynamicAttributes%>" |
6401 |
28 Jan 14 |
nicklas |
1294 |
/> |
4187 |
20 Mar 08 |
nicklas |
1295 |
<% |
4187 |
20 Mar 08 |
nicklas |
1296 |
} |
4262 |
30 Apr 08 |
nicklas |
1297 |
else if (action.getType() == MenuItemAction.MenuType.MENUITEM) |
4187 |
20 Mar 08 |
nicklas |
1298 |
{ |
6652 |
09 Dec 14 |
nicklas |
1299 |
%> |
6652 |
09 Dec 14 |
nicklas |
1300 |
<m:menuitem |
6652 |
09 Dec 14 |
nicklas |
1301 |
id="<%=action.getId() %>" |
6652 |
09 Dec 14 |
nicklas |
1302 |
subclass="<%=action.getClazz() %>" |
6652 |
09 Dec 14 |
nicklas |
1303 |
style="<%=action.getStyle()%>" |
6652 |
09 Dec 14 |
nicklas |
1304 |
title="<%=action.getTitle()%>" |
6652 |
09 Dec 14 |
nicklas |
1305 |
icon="<%=action.getIcon()%>" |
6652 |
09 Dec 14 |
nicklas |
1306 |
tooltip="<%=action.getTooltip()%>" |
6652 |
09 Dec 14 |
nicklas |
1307 |
enabled="<%=action.isEnabled()%>" |
6652 |
09 Dec 14 |
nicklas |
1308 |
visible="<%=action.isVisible()%>" |
6652 |
09 Dec 14 |
nicklas |
1309 |
dynamic="<%=dynamicAttributes%>" |
6652 |
09 Dec 14 |
nicklas |
1310 |
/> |
6652 |
09 Dec 14 |
nicklas |
1311 |
<% |
4187 |
20 Mar 08 |
nicklas |
1312 |
} |
4262 |
30 Apr 08 |
nicklas |
1313 |
else if (action.getType() == MenuItemAction.MenuType.SUBMENU) |
4262 |
30 Apr 08 |
nicklas |
1314 |
{ |
4262 |
30 Apr 08 |
nicklas |
1315 |
%> |
4262 |
30 Apr 08 |
nicklas |
1316 |
<m:submenu |
6401 |
28 Jan 14 |
nicklas |
1317 |
id="<%=action.getId() %>" |
6401 |
28 Jan 14 |
nicklas |
1318 |
subclass="<%=action.getClazz() %>" |
6141 |
20 Sep 12 |
nicklas |
1319 |
subid="<%="menu.extensions." + action.getSubmenuId()%>" |
4262 |
30 Apr 08 |
nicklas |
1320 |
style="<%=action.getStyle()%>" |
4262 |
30 Apr 08 |
nicklas |
1321 |
title="<%=action.getTitle()%>" |
4262 |
30 Apr 08 |
nicklas |
1322 |
icon="<%=action.getIcon()%>" |
4262 |
30 Apr 08 |
nicklas |
1323 |
tooltip="<%=action.getTooltip()%>" |
4262 |
30 Apr 08 |
nicklas |
1324 |
enabled="<%=action.isEnabled()%>" |
4262 |
30 Apr 08 |
nicklas |
1325 |
visible="<%=action.isVisible()%>" |
6401 |
28 Jan 14 |
nicklas |
1326 |
dynamic="<%=dynamicAttributes%>" |
4262 |
30 Apr 08 |
nicklas |
1327 |
/> |
4262 |
30 Apr 08 |
nicklas |
1328 |
<% |
4262 |
30 Apr 08 |
nicklas |
1329 |
} |
4187 |
20 Mar 08 |
nicklas |
1330 |
} |
4187 |
20 Mar 08 |
nicklas |
1331 |
%> |
4262 |
30 Apr 08 |
nicklas |
1332 |
</m:menu> |
4262 |
30 Apr 08 |
nicklas |
1333 |
<% |
4262 |
30 Apr 08 |
nicklas |
1334 |
} |
572 |
12 May 05 |
nicklas |
1335 |
// Main menu |
572 |
12 May 05 |
nicklas |
1336 |
%> |
6401 |
28 Jan 14 |
nicklas |
1337 |
<ext:scripts context="<%=jspContext%>" /> |
6401 |
28 Jan 14 |
nicklas |
1338 |
<ext:stylesheets context="<%=jspContext%>" /> |
1960 |
10 Feb 06 |
martin |
1339 |
<m:menu |
1960 |
10 Feb 06 |
martin |
1340 |
type="horizontal" |
1960 |
10 Feb 06 |
martin |
1341 |
id="menubar" |
7943 |
04 May 21 |
nicklas |
1342 |
style="top: 0px; left: 0px; right: 0px; z-index: 99;" |
1960 |
10 Feb 06 |
martin |
1343 |
open="click" |
2818 |
30 Oct 06 |
nicklas |
1344 |
filltext="<%=fillText.toString()%>" |
572 |
12 May 05 |
nicklas |
1345 |
> |
1960 |
10 Feb 06 |
martin |
1346 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1347 |
subid="menu.base" |
5409 |
16 Sep 10 |
nicklas |
1348 |
title="<%=menu.getString("menu.base")%>" |
572 |
12 May 05 |
nicklas |
1349 |
/> |
838 |
28 Jun 05 |
nicklas |
1350 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1351 |
subid="menu.view" |
5409 |
16 Sep 10 |
nicklas |
1352 |
title="<%=menu.getString("menu.view")%>" |
838 |
28 Jun 05 |
nicklas |
1353 |
/> |
4695 |
09 Dec 08 |
martin |
1354 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1355 |
subid="menu.biolims" |
5409 |
16 Sep 10 |
nicklas |
1356 |
title="<%=menu.getString("menu.biolims")%>" |
4695 |
09 Dec 08 |
martin |
1357 |
/> |
890 |
07 Jul 05 |
nicklas |
1358 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1359 |
subid="menu.lims" |
5409 |
16 Sep 10 |
nicklas |
1360 |
title="<%=menu.getString("menu.arraylims")%>" |
890 |
07 Jul 05 |
nicklas |
1361 |
/> |
1960 |
10 Feb 06 |
martin |
1362 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1363 |
subid="menu.administrate" |
5409 |
16 Sep 10 |
nicklas |
1364 |
title="<%=menu.getString("menu.administrate")%>" |
1960 |
10 Feb 06 |
martin |
1365 |
visible="<%=hasAdministrate%>" |
572 |
12 May 05 |
nicklas |
1366 |
/> |
1960 |
10 Feb 06 |
martin |
1367 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1368 |
subid="menu.extensions" |
5409 |
16 Sep 10 |
nicklas |
1369 |
title="<%=menu.getString("menu.extensions")%>" |
5616 |
27 Apr 11 |
nicklas |
1370 |
visible="<%=numExtensionMenues > 0 %>" |
4187 |
20 Mar 08 |
nicklas |
1371 |
/> |
4187 |
20 Mar 08 |
nicklas |
1372 |
<m:submenu |
6141 |
20 Sep 12 |
nicklas |
1373 |
subid="menu.help" |
5409 |
16 Sep 10 |
nicklas |
1374 |
title="<%=menu.getString("menu.help")%>" |
572 |
12 May 05 |
nicklas |
1375 |
/> |
5918 |
21 Dec 11 |
nicklas |
1376 |
</m:menu> |
572 |
12 May 05 |
nicklas |
1377 |
<% |
500 |
02 May 05 |
nicklas |
1378 |
} |
572 |
12 May 05 |
nicklas |
1379 |
finally |
572 |
12 May 05 |
nicklas |
1380 |
{ |
572 |
12 May 05 |
nicklas |
1381 |
if (dc != null) dc.close(); |
572 |
12 May 05 |
nicklas |
1382 |
} |
1960 |
10 Feb 06 |
martin |
1383 |
|
204 |
18 Mar 05 |
nicklas |
1384 |
} |
204 |
18 Mar 05 |
nicklas |
1385 |
%> |
472 |
27 Apr 05 |
nicklas |
1386 |
|
472 |
27 Apr 05 |
nicklas |
1387 |
|