Commit cde93bc2 authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Updating to new admin ui


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@303 b35dd754-fafc-0310-a699-88a17e54d16e
parent d8e99631
......@@ -108,14 +108,15 @@
</p>
<% } %>
<form name="f" action="user-create.jsp" method="post">
<table class="box" cellpadding="3" cellspacing="1" border="0" width="600">
<form name="f" action="user-create.jsp" method="post">
<tr><td class="text" colspan="2">
Use the form below to create a new user in the system.
</td></tr>
<tr class="jive-even">
<td>
<td>
Username: *
</td>
<td>
......
<%@ taglib uri="core" prefix="c"%><%--
<%@ taglib uri="core" prefix="c"%>
<%--
- $RCSfile$
- $Revision$
- $Date$
......@@ -6,10 +7,11 @@
<%@ page import="org.jivesoftware.util.*,
org.jivesoftware.messenger.user.*"
org.jivesoftware.messenger.user.*,
org.jivesoftware.admin.*"
%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<% webManager.init(request, response, session, application, out ); %>
<% // Get parameters //
......@@ -24,13 +26,13 @@
}
// Load the user object
User user = admin.getUserManager().getUser(username);
User user = webManager.getUserManager().getUser(username);
// Handle a user delete:
if (delete) {
admin.getUserManager().deleteUser(user);
webManager.getUserManager().deleteUser(user);
// Deleted your own user account, force login
if (username.equals(admin.getAuthToken().getUsername())){
if (username.equals(webManager.getAuthToken().getUsername())){
session.removeAttribute("jive.admin.authToken");
response.sendRedirect("login.jsp");
}
......@@ -47,15 +49,18 @@
<c:set var="sbar" value="users" scope="page" />
<!-- Define BreadCrumbs -->
<c:set var="title" value="Delete User" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="User Summary" value="user-summary.jsp" />
<c:set target="${breadcrumbs}" property="User Properties" value="user-properties.jsp?userID=${param.userID}" />
<c:set target="${breadcrumbs}" property="${title}" value="user-delete.jsp?userID=${param.userID}" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Change Password";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-password.jsp?username="+username));
pageinfo.setSubPageID("user-delete");
pageinfo.setExtraParams("username="+username);
%>
<c:set var="tab" value="delete" />
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
......
......@@ -8,10 +8,11 @@
org.jivesoftware.messenger.user.*,
org.jivesoftware.messenger.*,
java.text.DateFormat,
org.jivesoftware.admin.*,
java.util.HashMap,
java.util.Map"
%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<jsp:useBean id="userData" class="org.jivesoftware.messenger.user.spi.UserPrivateData" />
<% // Get parameters
......@@ -28,10 +29,10 @@
}
// Load the user object
User user = admin.getUserManager().getUser(username);
User user = webManager.getUserManager().getUser(username);
// Get a private data manager //
final PrivateStore privateStore = admin.getPrivateStore();
final PrivateStore privateStore = webManager.getPrivateStore();
userData.setState( user.getUsername(), privateStore );
// Handle a save
......@@ -58,20 +59,21 @@
<c:set var="sbar" value="users" scope="page" />
<!-- Define BreadCrumbs -->
<c:set var="title" value="Edit User Properties" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="User Summary" value="user-summary.jsp" />
<c:set target="${breadcrumbs}" property="User Properties" value="user-properties.jsp?userID=${param.userID}" />
<c:set var="tab" value="edit" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Edit User";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-summary.jsp"));
pageinfo.setSubPageID("user-edit");
pageinfo.setExtraParams("username="+username);
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<c:set var="tab" value="edit" />
<%@ include file="user-tabs.jsp" %>
<br>
<% if (success) { %>
<p class="jive-success-text">
......@@ -80,18 +82,21 @@
<% } %>
<table cellpadding="3" cellspacing="1" border="0" width="600">
<form action="user-edit-form.jsp">
<table class="box" cellpadding="3" cellspacing="1" border="0" width="600">
<tr class="tableHeaderBlue"><td colspan="2" align="center">Edit User Properties for <%= user.getUsername() %></td></tr>
<tr><td class="text" colspan="2">
<tr><td colspan="2">
Use the form below to edit user properties.
</td></tr>
</table>
<table cellpadding="3" cellspacing="1" border="0">
<input type="hidden" name="username" value="<%= username %>">
<input type="hidden" name="save" value="true">
<tr class="jive-odd">
<tr>
<td>
Username:
</td>
......@@ -99,8 +104,8 @@ Use the form below to edit user properties.
<%= user.getUsername() %>
</td>
</tr>
<tr class="jive-odd">
<td class="jive-label">
<tr>
<td>
Name:
</td>
<td>
......@@ -116,7 +121,7 @@ Use the form below to edit user properties.
<% } %>
</td>
</tr>
<tr class="jive-even">
<tr>
<td>
Email:
</td>
......
......@@ -8,7 +8,8 @@
org.jivesoftware.messenger.user.UserManager,
java.text.DateFormat,
org.jivesoftware.messenger.auth.AuthFactory,
org.jivesoftware.messenger.user.*"
org.jivesoftware.messenger.user.*,
org.jivesoftware.admin.AdminPageBean"
%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
......@@ -46,20 +47,18 @@
%>
<c:set var="sbar" value="users" scope="page" />
<!-- Define BreadCrumbs -->
<c:set var="title" value="User Password" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="User Summary" value="user-summary.jsp" />
<c:set target="${breadcrumbs}" property="User Properties" value="user-properties.jsp?userID=${param.userID}" />
<c:set target="${breadcrumbs}" property="${title}" value="user-password.jsp?userID=${param.userID}" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Change Password";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-password.jsp?username="+username));
pageinfo.setSubPageID("user-edit-password");
pageinfo.setExtraParams("username="+username);
%>
<c:set var="tab" value="pass" />
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<%@ include file="user-tabs.jsp" %>
<br>
......@@ -72,46 +71,46 @@
</p>
<% } %>
<table cellpadding="3" cellspacing="1" border="0" width="600">
<form action="user-password.jsp" name="passform">
<table class="box" cellpadding="3" cellspacing="1" border="0" width="600">
<tr class="tableHeaderBlue"><td colspan="2" align="center">Change Password For <%= user.getUsername() %></td></tr>
<tr><td colspan="2" class="text">
Use the form below to change the user's password
</td></tr>
</table>
<table cellpadding="3" cellspacing="1" border="0">
<input type="hidden" name="username" value="<%= username %>">
<tr class="jive-even">
<td class="jive-label">
<tr>
<td class="c1">
User ID:
</td>
<td>
<td class="c2">
<%= user.getUsername() %>
</td>
</tr>
<tr class="jive-odd">
<td>
<tr>
<td class="c1">
Username:
</td>
<td>
<td class="c2">
<%= user.getUsername() %>
</td>
</tr>
<tr class="jive-even">
<td class="jive-label">
<tr>
<td class="c1">
New Password:
</td>
<td>
<td clas="c2">
<input type="password" name="password" value="" size="20" maxlength="50">
</td>
</tr>
<tr class="jive-odd">
<td>
<tr>
<td class="c1">
Confirm New Password:
</td>
<td>
<td class="c2">
<input type="password" name="passwordConfirm" value="" size="20" maxlength="50">
</td>
</tr>
......
......@@ -8,9 +8,10 @@
org.jivesoftware.messenger.user.*,
java.text.DateFormat,
java.util.Iterator,
org.jivesoftware.admin.*,
org.jivesoftware.messenger.*"
%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<jsp:useBean id="userData" class="org.jivesoftware.messenger.user.spi.UserPrivateData" />
......@@ -49,42 +50,42 @@
// Load the user object
User user = null;
try {
user = admin.getUserManager().getUser(username);
user = webManager.getUserManager().getUser(username);
}
catch (UserNotFoundException unfe) {
user = admin.getUserManager().getUser(username);
user = webManager.getUserManager().getUser(username);
}
// Date formatter for dates
DateFormat formatter = DateFormat.getDateInstance(DateFormat.MEDIUM);
%>
<%
// Get a private data manager //
final PrivateStore privateStore = admin.getPrivateStore();
final PrivateStore privateStore = webManager.getPrivateStore();
userData.setState( user.getUsername(), privateStore );
String nickname = userData.getProperty( "nickname" );
if(nickname == null){
nickname = "";
}
%>
<c:set var="sbar" value="users" scope="page" />
<!-- Define BreadCrumbs -->
<c:set var="title" value="User Properties" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="User Summary" value="user-summary.jsp" />
<c:set target="${breadcrumbs}" property="${title}" value="user-properties.jsp?userID=${param.userID}" />
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "User Properties";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-properties.jsp"));
pageinfo.setSubPageID("user-properties");
pageinfo.setExtraParams("username="+username);
%>
<c:set var="tab" value="props" />
<jsp:include page="top.jsp" flush="true" />
<%@ include file="top.jsp" %>
<jsp:include page="title.jsp" flush="true" />
<%@ include file="user-tabs.jsp" %>
<br/>
<table class="box" cellpadding="3" cellspacing="1" border="0" width="600">
<tr class="tableHeaderBlue"><td colspan="2" align="center">User Properties For <%= user.getUsername() %></td></tr>
<tr><td class="text" colspan="2">
Below is a summary of user properties. Use the tabs above to do things like edit user properties,
send the user a message (if they're online) or delete the user.
......
......@@ -10,21 +10,10 @@
org.jivesoftware.admin.*,
java.util.Map" %>
<%-- Define Administration Bean --%>
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager" />
<% admin.init(request, response, session, application, out ); %>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<% webManager.init(request, response, session, application, out ); %>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "User Search";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-search.jsp"));
pageinfo.setPageID("user-search");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<%
<%
// Get parameters
boolean search = ParamUtils.getBooleanParameter(request,"search");
......@@ -41,7 +30,7 @@
if (search) {
User user = null;
try {
user = admin.getUserManager().getUser(username);
user = webManager.getUserManager().getUser(username);
}
catch (Exception e2) {
errors.put("username","username");
......@@ -53,6 +42,18 @@
}
}
%>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "User Search";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-search.jsp"));
pageinfo.setPageID("user-search");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<% if (errors.size() > 0) { %>
<p class="jive-error-text">
......@@ -60,8 +61,8 @@
</p>
<% } %>
<form name="f" action="user-search.jsp">
<table cellpadding="3" cellspacing="1" border="0" width="600">
<form name="f" action="user-search.jsp">
<tr><td class="text" colspan="2">
Use the form below to search for users in the system.
......
......@@ -84,11 +84,11 @@ Sorted by User ID
<% } %>
<table cellpadding="3" cellspacing="1" border="0" width="600">
<table cellpadding="3" cellspacing="0" border="0" width="600">
<tr class="tableHeader"><td colspan="7" align="left">List Of Users</td></tr>
</table>
<table class="box" cellpadding="3" cellspacing="1" border="0" width="600">
<tr class="tableHeaderBlue">
<table class="jive-table" cellpadding="3" cellspacing="0" border="0" width="600">
<tr >
<th>&nbsp;</th>
<th>Online</th>
<th>Username</th>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment