rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject svn commit: r1182442 - in /incubator/rave/trunk: rave-components/rave-core/src/main/java/org/apache/rave/portal/model/ rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/ rave-components/rave-web/src/test/java/org/apache/rave/...
Date Wed, 12 Oct 2011 15:44:24 GMT
Author: jasha
Date: Wed Oct 12 15:44:23 2011
New Revision: 1182442

URL: http://svn.apache.org/viewvc?rev=1182442&view=rev
Log:
RAVE-300 user listing -> user profile edit page
Updating a profile is not supported yet, will follow next week

Added:
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_listheader.tag
Modified:
    incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/User.java
    incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java
    incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java
    incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_tabsheader.tag
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css

Modified: incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/User.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/User.java?rev=1182442&r1=1182441&r2=1182442&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/User.java
(original)
+++ incubator/rave/trunk/rave-components/rave-core/src/main/java/org/apache/rave/portal/model/User.java
Wed Oct 12 15:44:23 2011
@@ -204,6 +204,10 @@ public class User implements UserDetails
         return !locked;
     }
 
+    public boolean isLocked() {
+        return locked;
+    }
+
     public void setLocked(boolean locked) {
         this.locked = locked;
     }
@@ -224,6 +228,10 @@ public class User implements UserDetails
         return isCredentialsNonExpired();
     }
 
+    public boolean isExpired() {
+        return expired;
+    }
+
     public void setExpired(boolean expired) {
         this.expired = expired;
     }
@@ -301,6 +309,26 @@ public class User implements UserDetails
 
     @Override
     public String toString() {
-        return "User{" + "entityId=" + entityId + ", username=" + username + ", expired="
+ expired + ", locked=" + locked + ", enabled=" + enabled + ", email=" + email + ", openId="
+ openId + '}';
+        final StringBuffer sb = new StringBuffer();
+        sb.append("User");
+        sb.append("{entityId=").append(entityId);
+        sb.append(", username='").append(username).append('\'');
+        sb.append(", expired=").append(expired);
+        sb.append(", locked=").append(locked);
+        sb.append(", enabled=").append(enabled);
+        sb.append(", email='").append(email).append('\'');
+        sb.append(", openId='").append(openId).append('\'');
+        sb.append(", authorities=[");
+        boolean first=true;
+        for (Authority a : authorities) {
+            if (!first) {
+                sb.append(',');
+            }
+            sb.append('\'').append(a.getAuthority()).append('\'');
+            first = false;
+        }
+        sb.append(']');
+        sb.append('}');
+        return sb.toString();
     }
 }

Modified: incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java?rev=1182442&r1=1182441&r2=1182442&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java
(original)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java
Wed Oct 12 15:44:23 2011
@@ -26,18 +26,23 @@ import org.apache.rave.portal.web.model.
 import org.apache.rave.portal.web.model.NavigationMenu;
 import org.apache.rave.portal.web.util.ModelKeys;
 import org.apache.rave.portal.web.util.ViewNames;
+import org.apache.rave.portal.web.validator.UserProfileValidator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.SessionAttributes;
 
 /**
  * Controller for the admin pages
  */
 @Controller
+@SessionAttributes({"user"})
 @RequestMapping(value = {"/admin/*", "/admin"})
 public class AdminController {
     public static final int DEFAULT_PAGE_SIZE = 10;
@@ -45,6 +50,9 @@ public class AdminController {
     @Autowired
     private UserService userService;
 
+    @Autowired
+    private UserProfileValidator userProfileValidator;
+
     @RequestMapping(method = RequestMethod.GET)
     public String viewDefault(Model model) {
         addNavigationMenusToModel("home", model);
@@ -70,12 +78,23 @@ public class AdminController {
     }
 
     @RequestMapping(value = "userdetail/{userid}", method = RequestMethod.GET)
-    public String viewUserDetail(@PathVariable("userid") String userid, Model model) {
+    public String viewUserDetail(@PathVariable("userid") Long userid, Model model) {
         addNavigationMenusToModel("users", model);
-        model.addAttribute("userid", userid);
+        final User user = userService.getUserById(userid);
+        model.addAttribute(user);
         return ViewNames.ADMIN_USERDETAIL;
     }
 
+    @RequestMapping(value = "userdetail/update", method = RequestMethod.POST)
+    public String updateUserDetail(@ModelAttribute("user") User user, BindingResult result)
{
+        userProfileValidator.validate(user, result);
+        if (result.hasErrors()) {
+            return ViewNames.ADMIN_USERDETAIL;
+        }
+        userService.updateUserProfile(user);
+        return "redirect:" + user.getEntityId();
+    }
+
     @RequestMapping(value = "widgets", method = RequestMethod.GET)
     public String viewWidgets(Model model) {
         addNavigationMenusToModel("widgets", model);
@@ -120,7 +139,11 @@ public class AdminController {
         return menu;
     }
 
-    public void setUserService(UserService userService) {
+    void setUserService(UserService userService) {
         this.userService = userService;
     }
+
+    void setUserProfileValidator(UserProfileValidator userProfileValidator) {
+        this.userProfileValidator = userProfileValidator;
+    }
 }

Modified: incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java?rev=1182442&r1=1182441&r2=1182442&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java
(original)
+++ incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java
Wed Oct 12 15:44:23 2011
@@ -24,15 +24,19 @@ import org.apache.rave.portal.model.util
 import org.apache.rave.portal.service.UserService;
 import org.apache.rave.portal.web.util.ModelKeys;
 import org.apache.rave.portal.web.util.ViewNames;
+import org.apache.rave.portal.web.validator.UserProfileValidator;
 import org.junit.Before;
 import org.junit.Test;
 import org.springframework.ui.ExtendedModelMap;
 import org.springframework.ui.Model;
+import org.springframework.validation.BeanPropertyBindingResult;
+import org.springframework.validation.BindingResult;
 
 import java.util.ArrayList;
 import java.util.List;
 
 import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
 import static junit.framework.Assert.assertTrue;
 import static org.easymock.EasyMock.createNiceMock;
 import static org.easymock.EasyMock.expect;
@@ -44,8 +48,9 @@ import static org.easymock.EasyMock.repl
 public class AdminControllerTest {
 
     private static final String TABS = "tabs";
-    AdminController controller;
-    UserService userService;
+    private AdminController controller;
+    private UserService userService;
+    private UserProfileValidator userProfileValidator;
 
     @Test
     public void adminHome() throws Exception {
@@ -65,7 +70,7 @@ public class AdminControllerTest {
         expect(userService.getLimitedListOfUsers(offset, pageSize)).andReturn(searchResult);
         replay(userService);
 
-        String adminUsersView = controller.viewUsers(offset,model);
+        String adminUsersView = controller.viewUsers(offset, model);
         assertEquals(ViewNames.ADMIN_USERS, adminUsersView);
         assertEquals(searchResult, model.asMap().get(ModelKeys.SEARCHRESULT));
         assertTrue(model.containsAttribute(TABS));
@@ -94,12 +99,45 @@ public class AdminControllerTest {
     @Test
     public void adminUserDetail() throws Exception {
         Model model = new ExtendedModelMap();
-        String userid = "dummyUserId";
+        Long userid = 123L;
+        User user = new User(userid, "john.doe.sr");
+
+        expect(userService.getUserById(userid)).andReturn(user);
+        replay(userService);
+
         String adminUserDetailView = controller.viewUserDetail(userid, model);
         assertEquals(ViewNames.ADMIN_USERDETAIL, adminUserDetailView);
         assertTrue(model.containsAttribute(TABS));
-        assertEquals(userid, model.asMap().get("userid"));
+        assertEquals(user, model.asMap().get("user"));
+    }
+
+
+    @Test
+    public void updateUserDetail_success() {
+        final Long userid = 123L;
+        final String email = "john.doe.sr@example.net";
+        User user = new User(userid, "john.doe.sr");
+        user.setPassword("secrect");
+        user.setConfirmPassword(user.getConfirmPassword());
+        user.setEmail(email);
+        final BindingResult errors = new BeanPropertyBindingResult(user, "user");
+
+        expect(userService.getUserById(userid)).andReturn(user);
+        expect(userService.getUserByEmail(email)).andReturn(user);
+        replay(userService);
+        final String view = controller.updateUserDetail(user, errors);
+        assertFalse(errors.hasErrors());
+        assertEquals("redirect:" + userid, view);
+    }
 
+    @Test
+    public void updateUserDetail_withErrors() {
+        Long userid = 123L;
+        User user = new User(userid, "john.doe.sr");
+        final BindingResult errors = new BeanPropertyBindingResult(user, "user");
+        final String view = controller.updateUserDetail(user, errors);
+        assertTrue(errors.hasErrors());
+        assertEquals(ViewNames.ADMIN_USERDETAIL, view);
     }
 
     @Test
@@ -109,13 +147,15 @@ public class AdminControllerTest {
         assertEquals(ViewNames.ADMIN_WIDGETS, adminWidgetsView);
         assertTrue(model.containsAttribute(TABS));
     }
-    
+
 
     @Before
     public void setUp() throws Exception {
         controller = new AdminController();
         userService = createNiceMock(UserService.class);
+        userProfileValidator = new UserProfileValidator(userService);
         controller.setUserService(userService);
+        controller.setUserProfileValidator(userProfileValidator);
     }
 
     private static SearchResult<User> createSearchResultWithTwoUsers() {

Modified: incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties?rev=1182442&r1=1182441&r2=1182442&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties Wed
Oct 12 15:44:23 2011
@@ -118,6 +118,12 @@ admin.users.title=Rave admin interface -
 admin.users.shorttitle=Users
 admin.users.search=Search users
 admin.userdetail.title=Rave admin interface - User detail
+admin.userdata.username=Username
+admin.userdata.email=Email
+admin.userdata.accountstatus=Account status:
+admin.userdata.enabled=Account enabled
+admin.userdata.expired=Account expired
+admin.userdata.locked=Account locked
 admin.clearsearch=Clear search
 
 admin.list.noresult=No results found

Added: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_listheader.tag
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_listheader.tag?rev=1182442&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_listheader.tag
(added)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_listheader.tag
Wed Oct 12 15:44:23 2011
@@ -0,0 +1,50 @@
+<%--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+  --%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+<fmt:setBundle basename="messages"/>
+
+<c:choose>
+    <c:when test="${empty searchTerm and (empty searchResult or searchResult.totalResults
eq 0)}">
+        <fmt:message key="admin.list.noresult" var="listheader"/>
+    </c:when>
+    <c:when test="${empty searchTerm}">
+        <fmt:message key="admin.list.result.x.to.y" var="listheader">
+            <fmt:param value="${offset + 1}"/>
+            <fmt:param value="${offset + fn:length(searchResult.resultSet)}"/>
+            <fmt:param value="${searchResult.totalResults}"/>
+        </fmt:message>
+    </c:when>
+    <c:when test="${not empty searchTerm and searchResult.totalResults eq 0}">
+        <fmt:message key="admin.list.search.noresult" var="listheader">
+            <fmt:param><c:out value="${searchTerm}"/></fmt:param>
+        </fmt:message>
+    </c:when>
+    <c:otherwise>
+        <fmt:message key="admin.list.search.result.x.to.y" var="listheader">
+            <fmt:param value="${offset + 1}"/>
+            <fmt:param value="${offset + fn:length(searchResult.resultSet)}"/>
+            <fmt:param value="${searchResult.totalResults}"/>
+            <fmt:param><c:out value="${searchTerm}"/></fmt:param>
+        </fmt:message>
+    </c:otherwise>
+</c:choose>
+<h2>${listheader}</h2>
\ No newline at end of file

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_tabsheader.tag
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_tabsheader.tag?rev=1182442&r1=1182441&r2=1182442&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_tabsheader.tag
(original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_tabsheader.tag
Wed Oct 12 15:44:23 2011
@@ -30,7 +30,8 @@
                         <c:when test="${navItem.selected}">
                             <li class="rave-ui-tab rave-ui-tab-selected">
                                 <div class="page-title">
-                                    <fmt:message key="${navItem.name}"/>
+                                    <a href="<spring:url value="${navItem.url}"/>"><fmt:message
+                                            key="${navItem.name}"/></a>
                                 </div>
                             </li>
                         </c:when>

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp?rev=1182442&r1=1182441&r2=1182442&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp
(original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/userdetail.jsp
Wed Oct 12 15:44:23 2011
@@ -18,6 +18,7 @@
   --%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
 <%@ taglib tagdir="/WEB-INF/tags" prefix="rave" %>
@@ -28,6 +29,52 @@
     <rave:header pageTitle="${pagetitle}"/>
     <rave:admin_tabsheader/>
     <div id="pageContent">
-        <p>User detail goes here</p>
+        <article class="admincontent">
+            <ul class="horizontal-list searchbox">
+                <li><a href="<spring:url value="/app/admin/users"/>">_back
to users</a></li>
+            </ul>
+            <h2><c:out value="${user.username}"/></h2>
+            <form:form id="updateUserProfile" action="update" commandName="user" method="POST">
+                <form:errors cssClass="error" element="p"/>
+                <fieldset>
+                    <p>
+                        <label for="email"><fmt:message key="page.general.email"/></label>
+                        <spring:bind path="email">
+                            <input type="email" name="email" id="email" value="<c:out
value="${status.value}"/>" class="long"/>
+                        </spring:bind>
+                    </p>
+
+                    <p>
+                        <label for="openIdField"><fmt:message key="page.userprofile.openid.url"/></label>
+                        <spring:bind path="openId">
+                            <input type="url" id="openIdField" name="openId" value="<c:out
value="${status.value}"/>" class="long"/>
+                        </spring:bind>
+                        <form:errors path="openId" cssClass="error"/>
+                    </p>
+                    <div>
+                        <span class="label"><fmt:message key="admin.userdata.accountstatus"/></span>
+                        <ul class="checkboxlist">
+                            <li>
+                                <fmt:message key="admin.userdata.enabled" var="labelEnabled"/>
+                                <form:checkbox path="enabled" label="${labelEnabled}"
/>
+                            </li>
+                            <li>
+                                <fmt:message key="admin.userdata.expired" var="labelExpired"/>
+                                <form:checkbox path="expired" label="${labelExpired}"/>
+                            </li>
+                            <li>
+                                <fmt:message key="admin.userdata.locked" var="labelLocked"/>
+                                <form:checkbox path="locked" label="${labelLocked}"/>
+                            </li>
+                        </ul>
+                    </div>
+                </fieldset>
+                <fieldset>
+                    <fmt:message key="page.userprofile.button" var="updateButtonText"/>
+                    <input type="submit" value="${updateButtonText}"/>
+                </fieldset>
+            </form:form>
+            
+        </article>
     </div>
 </rave:rave_generic_page>
\ No newline at end of file

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp?rev=1182442&r1=1182441&r2=1182442&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp
(original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp
Wed Oct 12 15:44:23 2011
@@ -16,6 +16,7 @@
   specific language governing permissions and limitations
   under the License.
   --%>
+
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
@@ -28,60 +29,36 @@
 <rave:rave_generic_page pageTitle="${pagetitle}">
     <rave:header pageTitle="${pagetitle}"/>
     <rave:admin_tabsheader/>
+
     <div class="pageContent">
         <article class="admincontent">
             <ul class="horizontal-list searchbox">
                 <li><a href="<spring:url value="/app/newaccount.jsp"/>">__Add
user</a></li>
                 <li>
-                <form action="<spring:url value="/app/admin/users/search"/>" method="GET">
-                    <fieldset>
-                        <label for="searchTerm"><fmt:message key="admin.users.search"/></label>
-                        <input type="search" id="searchTerm" name="searchTerm"
-                               value="<c:out value="${searchTerm}"/>"/>
-                        <fmt:message key="page.store.search.button" var="searchButtonText"/>
-                        <input type="submit" value="${searchButtonText}"/>
-                    </fieldset>
-                </form>
+                    <form action="<spring:url value="/app/admin/users/search"/>"
method="GET">
+                        <fieldset>
+                            <label for="searchTerm"><fmt:message key="admin.users.search"/></label>
+                            <input type="search" id="searchTerm" name="searchTerm"
+                                   value="<c:out value="${searchTerm}"/>"/>
+                            <fmt:message key="page.store.search.button" var="searchButtonText"/>
+                            <input type="submit" value="${searchButtonText}"/>
+                        </fieldset>
+                    </form>
                 </li>
                 <c:if test="${not empty searchTerm}">
-                <li><a href="<spring:url value="/app/admin/users"/>"><fmt:message
key="admin.clearsearch"/></a></li>
+                    <li><a href="<spring:url value="/app/admin/users"/>"><fmt:message
key="admin.clearsearch"/></a></li>
                 </c:if>
             </ul>
-            <c:choose>
-                <c:when test="${empty searchTerm and (empty searchResult or searchResult.totalResults
eq 0)}">
-                    <fmt:message key="admin.list.noresult" var="listheader"/>
-                </c:when>
-                <c:when test="${empty searchTerm}">
-                    <fmt:message key="admin.list.result.x.to.y" var="listheader">
-                        <fmt:param value="${offset + 1}"/>
-                        <fmt:param value="${offset + fn:length(searchResult.resultSet)}"/>
-                        <fmt:param value="${searchResult.totalResults}"/>
-                    </fmt:message>
-                </c:when>
-                <c:when test="${not empty searchTerm and searchResult.totalResults eq
0}">
-                    <fmt:message key="admin.list.search.noresult" var="listheader">
-                        <fmt:param><c:out value="${searchTerm}"/></fmt:param>
-                    </fmt:message>
-                </c:when>
-                <c:otherwise>
-                    <fmt:message key="admin.list.search.result.x.to.y" var="listheader">
-                        <fmt:param value="${offset + 1}"/>
-                        <fmt:param value="${offset + fn:length(searchResult.resultSet)}"/>
-                        <fmt:param value="${searchResult.totalResults}"/>
-                        <fmt:param><c:out value="${searchTerm}"/></fmt:param>
-                    </fmt:message>
-                </c:otherwise>
-            </c:choose>
-            <h2>${listheader}</h2>
 
+            <rave:admin_listheader/>
             <rave:admin_paging/>
 
             <table class="datatable userstable">
                 <thead>
                 <tr>
-                    <th class="textcell">Username</th>
-                    <th class="largetextcell">Email</th>
-                    <th class="booleancell">Enabled</th>
+                    <th class="textcell"><fmt:message key="admin.userdata.username"/></th>
+                    <th class="largetextcell"><fmt:message key="admin.userdata.email"/></th>
+                    <th class="booleancell"><fmt:message key="admin.userdata.enabled"/></th>
                 </tr>
                 </thead>
                 <tbody>
@@ -90,7 +67,7 @@
                     <tr data-detaillink="${detaillink}">
                         <td><a href="${detaillink}"><c:out value="${user.username}"/></a></td>
                         <td><a href="${detaillink}"><c:out value="${user.email}"/></a></td>
-                        <td><c:if test="${user.enabled}"><a href="${detaillink}">X</a></c:if></td>
+                        <td><a href="${detaillink}">${user.enabled}</a></td>
                     </tr>
                 </c:forEach>
                 </tbody>

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css?rev=1182442&r1=1182441&r2=1182442&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css Wed Oct 12
15:44:23 2011
@@ -423,7 +423,7 @@ fieldset{
     margin: 0;
     border:none
 }
-p label {
+p label, span.label {
     width: 120px;
     float: left;
     display: block;
@@ -445,6 +445,10 @@ input.long, textarea.long {
     width:400px;
 }
 
+.checkboxlist {
+    float: left;
+    list-style: none;
+}
 
 /* Associated with JQuery validation CSS */
 .error {



Mime
View raw message