Commit 335206db 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@308 b35dd754-fafc-0310-a699-88a17e54d16e
parent f534e6d8
......@@ -9,19 +9,11 @@
org.jivesoftware.messenger.*,
java.text.DateFormat,
java.text.NumberFormat,
org.jivesoftware.admin.*,
org.jivesoftware.messenger.user.User" %>
<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" />
<!-- Define BreadCrumbs -->
<c:set var="title" value="Session Details" />
<c:set var="breadcrumbs" value="${admin.breadCrumbs}" />
<c:set target="${breadcrumbs}" property="Home" value="main.jsp" />
<c:set target="${breadcrumbs}" property="Session Summary" value="session-summary.jsp" />
<c:set target="${breadcrumbs}" property="Summary Details" value="session-details.jsp" />
<c:set var="sbar" value="session" scope="page" />
<jsp:include page="top.jsp" flush="true" />
<% // Get parameters
String jid = ParamUtils.getParameter(request, "jid");
......@@ -33,18 +25,18 @@
}
// Get the session & address objects
SessionManager sessionManager = admin.getSessionManager();
SessionManager sessionManager = webManager.getSessionManager();
XMPPAddress address = XMPPAddress.parseJID(jid);
Session currentSess = sessionManager.getSession(address);
boolean isAnonymous = address.getName() == null || "".equals(address.getName());
// Get a presence manager
PresenceManager presenceManager = admin.getPresenceManager();
PresenceManager presenceManager = webManager.getPresenceManager();
// Get user object
User user = null;
if (!isAnonymous) {
user = admin.getUserManager().getUser(address.getName());
user = webManager.getUserManager().getUser(address.getName());
}
// Handle a "message" click:
......@@ -67,6 +59,16 @@
NumberFormat numFormatter = NumberFormat.getNumberInstance();
%>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Session Details";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "session-details.jsp"));
pageinfo.setSubPageID("session-details");
%>
<%@ include file="top.jsp" %>
<jsp:include page="title.jsp" flush="true" />
<p>
......
......@@ -31,20 +31,11 @@
%>
<%-- Define Administration Bean --%>
<jsp:useBean id="webManager" class="org.jivesoftware.util.WebManager" />
<% webManager.init(request, response, session, application, out ); %>
<% webManager.init(pageContext); %>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Send Administrative Message";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-message.jsp"));
pageinfo.setPageID("user-message");
%>
<jsp:include page="top.jsp" flush="true" />
<jsp:include page="title.jsp" flush="true" />
<%
......@@ -100,7 +91,9 @@
sessionManager.sendServerMessage(XMPPAddress.parseJID(jid),null,message);
}
}
if(username != null){
response.sendRedirect("user-message.jsp?success=true&username=" + username + "&tabs=" + tabs);
}
return;
}
}
......@@ -117,16 +110,24 @@
}
}
%>
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<% // Title of this page and breadcrumbs
String title = "Send Administrative Message";
pageinfo.setTitle(title);
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb("Main", "main.jsp"));
pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "user-message.jsp"));
pageinfo.setPageID("user-message");
%>
<%@ include file="top.jsp" %>
<jsp:include page="title.jsp" flush="true" />
<% if (tabs) { %>
<% if (tabs && username != null) { %>
<br>
<c:set var="tab" value="message" />
<%@ include file="user-tabs.jsp" %>
<% } %>
<% if (success) { %>
......@@ -158,7 +159,9 @@ function updateSelect(el) {
</script>
<form action="user-message.jsp" method="post" name="f">
<% if(username != null){ %>
<input type="hidden" name="username" value="<%= username %>">
<% } %>
<input type="hidden" name="tabs" value="<%= tabs %>">
<input type="hidden" name="send" value="true">
<% if (sess != null) { %>
......
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