[jboss-svn-commits] JBoss Portal SVN: r5424 - in trunk/core/src: main/org/jboss/portal/core/portlet/role resources/portal-core-war/WEB-INF/jsp/role resources/portal-core-war/WEB-INF/jsp/user
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Oct 11 16:30:29 EDT 2006
Author: roy.russo at jboss.com
Date: 2006-10-11 16:30:21 -0400 (Wed, 11 Oct 2006)
New Revision: 5424
Modified:
trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/role/editListRoleMembers.jsp
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/role/menu.jsp
trunk/core/src/resources/portal-core-war/WEB-INF/jsp/user/listUsers.jsp
Log:
JBPORTAL-1074 - ui/functionality enhancements to roleportlet.
Modified: trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java 2006-10-11 19:27:56 UTC (rev 5423)
+++ trunk/core/src/main/org/jboss/portal/core/portlet/role/RolePortlet.java 2006-10-11 20:30:21 UTC (rev 5424)
@@ -292,21 +292,16 @@
DelegateContext rowCtx = null;
for (int i = 0; i < Math.min(usersArray.length, usersPerPage); i++)
{
- int oddeven = i % 2;
User user = usersArray[i];
- if (oddeven == 0)
- {
- rowCtx = ctx.next("row");
- }
+ rowCtx = ctx.next("row");
+ rowCtx.put("fullname", getFullName(bundle, user));
+ rowCtx.put("username", user.getUserName());
- rowCtx.put("fullname" + oddeven, getFullName(bundle, user));
- rowCtx.put("username" + oddeven, user.getUserName());
-
//
Iterator itRoles = roleModule.getRoles(user).iterator();
while (itRoles.hasNext())
{
- DelegateContext rolesCtx = rowCtx.next("roles" + oddeven);
+ DelegateContext rolesCtx = rowCtx.next("roles");
rolesCtx.put("name", ((Role)itRoles.next()).getDisplayName());
}
@@ -314,7 +309,7 @@
editURL.setParameter(getOperationName(), OP_SHOWADDROLESTOUSER);
editURL.setParameter("userid", "" + user.getId());
- rowCtx.put("editURL" + oddeven, editURL.toString());
+ rowCtx.put("editURL", editURL.toString());
}
if (offset != 0)
@@ -341,6 +336,30 @@
nextCtx.put("link", nextPageLink.toString());
}
+ try
+ {
+ Set roles = roleModule.findRoles();
+ Iterator i = roles.iterator();
+ DelegateContext roleCtxs = null;
+ while (i.hasNext())
+ {
+ Role arole = (Role)i.next();
+ roleCtxs = ctx.next("rolelist");
+ String aroleId = arole.getId().toString();
+ roleCtxs.put("id", aroleId);
+ roleCtxs.put("displayname", arole.getDisplayName());
+ if (aroleId.equals(roleID))
+ {
+ roleCtxs.put("selected", "selected");
+ }
+ }
+ }
+ catch (IdentityException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
ctx.put("usernamefilter", usernameFilter);
req.setAttribute(PortalJsp.CTX_REQUEST, ctx);
}
Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/role/editListRoleMembers.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/role/editListRoleMembers.jsp 2006-10-11 19:27:56 UTC (rev 5423)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/role/editListRoleMembers.jsp 2006-10-11 20:30:21 UTC (rev 5424)
@@ -1,44 +1,80 @@
<%@ page language="java" extends="org.jboss.portal.core.servlet.jsp.PortalJsp" %>
<%@ taglib uri="/WEB-INF/portal-lib.tld" prefix="n" %>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
-<%@ page isELIgnored ="false" %>
+<%@ page isELIgnored="false" %>
<portlet:defineObjects/>
-<div align="center">
-<font class="portlet-font">${n:i18n("ROLE_EDIT_USER")}: ${n:out("displayname")}</font>
-<br>
+<p>${n:i18n("ROLE_EDIT_USER")}: ${n:out("displayname")}</p>
-<table width="80">
-<tr>
-<td><n:if ctx="previouspage"><a href="${n:out("previouspage.link")}"><img src="<%= renderRequest.getContextPath() %>/images/role/previous.gif" border="0" align="absmiddle" alt="${n:i18n("PREVIOUSPAGE")}"/></a></n:if></td>
-<td>
-<a href="<portlet:renderURL windowState="maximized"><portlet:param name="op" value="showMainEditRoleMembers"/></portlet:renderURL>"><img src="<%= renderRequest.getContextPath() %>/images/role/back.gif" border="0" align="absmiddle" alt="${n:i18n("ROLE_MAINLIST")}"/></a>
-</td>
-<td><n:if ctx="nextpage"><a href="${n:out("nextpage.link")}"><img src="<%= renderRequest.getContextPath() %>/images/role/next.gif" border="0" align="absmiddle" alt="${n:i18n("NEXTPAGE")}"/></a></n:if></td>
-</tr></table>
+<hr/>
-<br>
+<p></p>
-<table cellpadding="2" cellspacing="2" width="100%">
- <tr class="portlet-section-alternate">
- <th>${n:i18n("LIST_FULLNAME")}</th>
- <th>${n:i18n("LIST_USERNAME")}</th>
- <th>${n:i18n("LIST_ROLES")}</th>
- <th>${n:i18n("LIST_ACTIONS")}</th>
- </tr>
- <n:iterate ctx="row">
- <tr class="portlet-section-body">
- <td>${n:out("row.fullname0")}</td>
- <td>${n:out("row.username0")}</td>
- <td><n:iterate ctx="roles0">${n:out("row.roles0.name")}<br /></n:iterate></td>
- <td><a href="${n:out("row.editURL0")}">${n:i18n("LIST_ACTIONEDITROLES")}</a></td>
- </tr>
- <tr class="portlet-section-alternate">
- <td>${n:out("row.fullname1")}</td>
- <td>${n:out("row.username1")}</td>
- <td><n:iterate ctx="roles1">${n:out("row.roles1.name")}<br /></n:iterate></td>
- <td><a href="${n:out("row.editURL1")}">${n:i18n("LIST_ACTIONEDITROLES")}</a></td>
- </tr>
- </n:iterate>
+<table width="100%" border="0" cellspacing="0" class="portlet-table-body">
+ <tr>
+ <td nowrap="nowrap" class="portlet-table-header">${n:i18n("LIST_FULLNAME")}</td>
+ <td nowrap="nowrap" class="portlet-table-header">${n:i18n("LIST_USERNAME")}</td>
+ <td nowrap="nowrap" class="portlet-table-header">${n:i18n("LIST_ROLES")}</td>
+ <td nowrap="nowrap" class="portlet-table-header">${n:i18n("LIST_ACTIONS")}</td>
+ </tr>
+ <n:iterate ctx="row">
+ <tr class="portlet-section-body">
+ <td nowrap="nowrap" class="portlet-table-text">${n:out("row.fullname")}</td>
+ <td nowrap="nowrap" class="portlet-table-text">${n:out("row.username")}</td>
+ <td nowrap="nowrap" class="portlet-table-text">
+ <n:iterate ctx="roles">${n:out("row.roles.name")}<br/></n:iterate>
+ </td>
+ <td nowrap="nowrap" class="portlet-table-text"><a
+ href="${n:out("row.editURL")}">${n:i18n("LIST_ACTIONEDITROLES")}</a></td>
+ </tr>
+ </n:iterate>
</table>
+
+<div align="center">
+ <table width="0%" border="0" cellspacing="0" cellpadding="0" class="pagination">
+ <tr>
+ <td nowrap>
+ <ul>
+ <n:if ctx="previouspage">
+ <li class="previouspage">
+ <a href="${n:out("previouspage.link")}">${n:i18n("PREVIOUSPAGE")}</a>
+ </li>
+ </n:if>
+ <n:if ctx="nextpage">
+ <li class="nextpage">
+ <a href="${n:out("nextpage.link")}">${n:i18n("NEXTPAGE")}</a>
+ </li>
+ </n:if>
+ </ul>
+ </td>
+ </tr>
+ </table>
</div>
+
+<br/>
+
+<form
+ action="<portlet:actionURL><portlet:param name="op" value="showListEditRoleMembers"/></portlet:actionURL>"
+ method="post">
+ <font class="portlet-form-label">${n:i18n("MENU_EDITROLEMEMBERS")}</font><br/>
+ <input type="text" name="usernamefilter" value="${n:out("usernamefilter")}" size="15"/>
+ <select name="roleid" class="portlet-form-input-field">
+ <n:iterate ctx="rolelist">
+ <option value="${n:out("rolelist.id")}" ${n:out("rolelist.selected")}>${n:out("rolelist.displayname")}</option>
+ </n:iterate>
+ </select>
+ <select name="usersperpage">
+ <option value="10">10</option>
+ <option value="20">20</option>
+ <option value="30">30</option>
+ <option value="50">50</option>
+ <option value="75">75</option>
+ <option value="100">100</option>
+ </select>
+ <br/>
+ <input name="Find" type="submit" class="portlet-form-button" id="Find"
+ value="${n:i18n("Search")}"/>
+ <span class="portlet-font"><a
+ href="<portlet:renderURL windowState="normal"><portlet:param name="op" value="showSummary"/></portlet:renderURL>">${n:i18n("Cancel")}</a></span>
+</form>
+
Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/role/menu.jsp
===================================================================
(Binary files differ)
Modified: trunk/core/src/resources/portal-core-war/WEB-INF/jsp/user/listUsers.jsp
===================================================================
--- trunk/core/src/resources/portal-core-war/WEB-INF/jsp/user/listUsers.jsp 2006-10-11 19:27:56 UTC (rev 5423)
+++ trunk/core/src/resources/portal-core-war/WEB-INF/jsp/user/listUsers.jsp 2006-10-11 20:30:21 UTC (rev 5424)
@@ -98,5 +98,4 @@
<portlet:renderURL windowState="maximized">
<portlet:param name="op" value="showRegister"/>
</portlet:renderURL>
-">${n:i18n("REGISTER_REGISTER_ADMIN_LINK")}</a>
-</div>
\ No newline at end of file
+">${n:i18n("REGISTER_REGISTER_ADMIN_LINK")}</a>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list