Author: channa
Date: Thu Jan 17 22:51:58 2008
New Revision: 12455
Log:
Shifting user management tasks to the common taskbar include.
Modified:
trunk/mashup/java/modules/www/add_user.jsp
trunk/mashup/java/modules/www/taskbar.jsp
trunk/mashup/java/modules/www/user.jsp
Modified: trunk/mashup/java/modules/www/add_user.jsp
==============================================================================
--- trunk/mashup/java/modules/www/add_user.jsp (original)
+++ trunk/mashup/java/modules/www/add_user.jsp Thu Jan 17 22:51:58 2008
@@ -61,7 +61,13 @@
String editMode = request.getParameter("editmode");
String bounceback = request.getParameter("bounceback");
String title = "Add User";
-
+
+ //Setting variables required for the taskbar.jsp
+ String author = "";
+ String currentUser = RegistryUtils.getCurrentUser(registry);
+ String mashupServiceName = "";
+ String path = "";
+
if (bounceback == null) {
bounceback = "index.jsp";
} else {
Modified: trunk/mashup/java/modules/www/taskbar.jsp
==============================================================================
--- trunk/mashup/java/modules/www/taskbar.jsp (original)
+++ trunk/mashup/java/modules/www/taskbar.jsp Thu Jan 17 22:51:58 2008
@@ -19,7 +19,8 @@
<th>Tasks</th>
</tr>
<!--Tasks will be available only to logged in users-->
-<% if (RegistryUtils.isLoggedIn(registry)) { %>
+<%
+ if (RegistryUtils.isLoggedIn(registry)) { %>
<tr>
<td>
<ul>
@@ -185,6 +186,40 @@
<li>
<a href="stub_gen.jsp" target="_blank">Use the Java Script Stub
Generator</a>
</li>
+<!--<li>
+ <a href="#">Use the data service assistant</a>
+</li>-->
+<!--Will only be available for administrators -->
+<% if (RegistryUtils.isAdminRole(registry)) { %>
+<li>
+ <a href="add_user.jsp?firstcall=true">Add User</a>
+</li>
+<li>
+ <a href="manage_users.jsp">Manage Users</a>
+</li>
+<li>
+ <% if (RegistrationBean.isSelfRegistrationEnabled()) { %>
+ <a href="allow_guests.jsp?enable=false">Disallow Internet Guests</a>
+ <% } else { %>
+ <a href="allow_guests.jsp?enable=true">Allow Internet Guests</a>
+ <% } %>
+</li>
+<li>
+ <a href="log_reader.jsp">View Server Log</a>
+</li>
+<% } %>
+
+<% String linkedName = request.getParameter("name");
+ if (RegistryUtils.getCurrentUser(registry).equals(linkedName)) { %>
+<li>
+ Register your <a href="infocard.jsp">infocard</a>
+</li>
+<% } %>
+<!--
+<li>
+ <a href="#">Add virtual directory**</a>
+</li>
+-->
</ul>
</td>
</tr>
Modified: trunk/mashup/java/modules/www/user.jsp
==============================================================================
--- trunk/mashup/java/modules/www/user.jsp (original)
+++ trunk/mashup/java/modules/www/user.jsp Thu Jan 17 22:51:58 2008
@@ -60,6 +60,12 @@
<%@ include file="validate_login.jsp" %>
<%
+ //Setting variables required for the taskbar.jsp
+ String author = "";
+ String currentUser = RegistryUtils.getCurrentUser(registry);
+ String mashupServiceName = "";
+ String path = "";
+
Realm realm = (Realm) request.getSession().getServletContext().
getAttribute(RegistryConstants.REGISTRY_REALM);
@@ -168,70 +174,6 @@
<%@ include file="searchbox.jsp" %>
<div id="taskbar">
- <table width="100%" border="0" class="box" cellspacing="0" cellpadding="3">
- <tr>
- <th>Tasks</th>
- </tr>
- <tr>
- <td>
- <ul>
- <!--Will only be available for logged in users-->
- <% if (RegistryUtils.isLoggedIn(registry)) { %>
- <li>
- <a href="#"
-
onclick="WSO2.MashupUtils.showCreateMashupDialog('<%=RegistryUtils.getCurrentUser(registry)%>');">Create
- a new service</a>
- </li>
- <li>
- <a href="#"
- onclick="window.open('../scraper.html', 'remote',
'width=640,height=480')">Use
- the scraping assistant</a>
- </li>
- <li>
- <a href="stub_gen.jsp" target="_blank">Use the Java
Script Stub
- Generator</a>
- </li>
-
- <!--<li>
- <a href="#">Use the data service assistant</a>
- </li>-->
- <%}%>
-
- <!--Will only be available for administrators -->
- <% if (RegistryUtils.isAdminRole(registry)) { %>
- <li>
- <a href="add_user.jsp?firstcall=true">Add User</a>
- </li>
- <li>
- <a href="manage_users.jsp">Manage Users</a>
- </li>
- <li>
- <% if (RegistrationBean.isSelfRegistrationEnabled()) {
%>
- <a href="allow_guests.jsp?enable=false">Disallow
Internet Guests</a>
- <% } else { %>
- <a href="allow_guests.jsp?enable=true">Allow Internet
Guests</a>
- <% } %>
- </li>
- <li>
- <a href="log_reader.jsp">View Server Log</a>
- </li>
- <% } %>
-
- <% if
(RegistryUtils.getCurrentUser(registry).equals(memberName)) { %>
- <li>
- Register your <a href="infocard.jsp">infocard</a>
- </li>
- <% } %>
- <!--
- <li>
- <a href="#">Add virtual directory**</a>
- </li>
- -->
- </ul>
- </td>
- </tr>
- </table>
- <br/>
<%@ include file="taskbar.jsp" %>
</div>
<div id="content">
@@ -385,7 +327,7 @@
while (iter.hasNext()) {
QueryResult result = (QueryResult) iter.next();
String id = "id" + nextId;
- String path = result.getPath();
+ path = result.getPath();
%>
<tr class="results">
<td width="1" nowrap>
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev