You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by ja...@apache.org on 2011/10/06 13:09:19 UTC

svn commit: r1179569 - in /incubator/rave/trunk: rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/ rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/ rave-components/rave-web/src/main/java/org/apache/ra...

Author: jasha
Date: Thu Oct  6 11:09:18 2011
New Revision: 1179569

URL: http://svn.apache.org/viewvc?rev=1179569&view=rev
Log:
RAVE-293 Basic setup of the admin interface navigation. For now the menu items are hardcoded.
Also replaced meaningless div's with semantic html5 elements.

Added:
    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/main/java/org/apache/rave/portal/web/model/NavigationItem.java
    incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationMenu.java
    incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java
    incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/
    incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationItemTest.java
    incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationMenuTest.java
    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/tags/header.tag
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.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/WEB-INF/views/admin/widgets.jsp
Modified:
    incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java
    incubator/rave/trunk/rave-portal-resources/src/main/resources/messages.properties
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/addwidget.jsp
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/home.jsp
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/store.jsp
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/widget.jsp
    incubator/rave/trunk/rave-portal-resources/src/main/webapp/css/default.css

Added: 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=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java (added)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/AdminController.java Thu Oct  6 11:09:18 2011
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ */
+
+package org.apache.rave.portal.web.controller;
+
+import org.apache.rave.portal.web.model.NavigationItem;
+import org.apache.rave.portal.web.model.NavigationMenu;
+import org.apache.rave.portal.web.util.ViewNames;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+/**
+ * Controller for the admin pages
+ */
+@Controller
+@RequestMapping(value = {"/admin/*", "/admin"})
+public class AdminController {
+
+    @RequestMapping(method = RequestMethod.GET)
+    public String viewDefault(Model model) {
+        addNavigationMenusToModel("home", model);
+        return ViewNames.ADMIN_HOME;
+    }
+
+    @RequestMapping(value = "users", method = RequestMethod.GET)
+    public String viewUsers(Model model) {
+        addNavigationMenusToModel("users", model);
+        return ViewNames.ADMIN_USERS;
+    }
+
+    @RequestMapping(value = "widgets", method = RequestMethod.GET)
+    public String viewWidgets(Model model) {
+        addNavigationMenusToModel("widgets", model);
+        return ViewNames.ADMIN_WIDGETS;
+    }
+
+    private void addNavigationMenusToModel(String selectedItem, Model model) {
+        final NavigationMenu topMenu = getTopMenu();
+        model.addAttribute(topMenu.getName(), topMenu);
+        final NavigationMenu tabMenu = getTabMenu(selectedItem);
+        model.addAttribute(tabMenu.getName(), tabMenu);
+    }
+
+    // For the time being hard coded NavigationMenu's
+    private static NavigationMenu getTopMenu() {
+        NavigationMenu menu = new NavigationMenu("topnav");
+
+        NavigationItem raveHome = new NavigationItem("page.general.back", "/");
+        menu.addNavigationItem(raveHome);
+
+        NavigationItem logout = new NavigationItem("page.general.logout", "/j_spring_security_logout");
+        menu.addNavigationItem(logout);
+
+        return menu;
+    }
+
+    private static NavigationMenu getTabMenu(String selectedItem) {
+        NavigationMenu menu = new NavigationMenu("tabs");
+
+        NavigationItem home = new NavigationItem("admin.home.shorttitle", "/app/admin/");
+        home.setSelected("home".equals(selectedItem));
+        menu.addNavigationItem(home);
+
+        NavigationItem users = new NavigationItem("admin.users.shorttitle", "/app/admin/users");
+        users.setSelected("users".equals(selectedItem));
+        menu.addNavigationItem(users);
+
+        NavigationItem widgets = new NavigationItem("admin.widgets.shorttitle", "/app/admin/widgets");
+        widgets.setSelected("widgets".equals(selectedItem));
+        menu.addNavigationItem(widgets);
+
+        return menu;
+    }
+}

Added: incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationItem.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationItem.java?rev=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationItem.java (added)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationItem.java Thu Oct  6 11:09:18 2011
@@ -0,0 +1,135 @@
+/*
+ * 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.
+ */
+
+package org.apache.rave.portal.web.model;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Bean to build up a navigation menu
+ */
+public class NavigationItem {
+
+    private static final String PARAM_NAME = "name";
+    private static final String PARAM_URL = "url";
+
+    private Map<String, String> parameters;
+    private List<NavigationItem> childNavigationItems;
+    private boolean selected;
+    private boolean expanded;
+
+    public NavigationItem() {
+        this(null, null);
+    }
+
+    public NavigationItem(String name, String url) {
+        super();
+
+        this.parameters = new HashMap<String, String>();
+        this.childNavigationItems = new ArrayList<NavigationItem>();
+        
+        this.setName(name);
+        this.setUrl(url);
+    }
+
+    /**
+     * @return name of the navigation item, can be a translation key
+     */
+    public String getName() {
+        return parameters.get(PARAM_NAME);
+    }
+
+    public void setName(String name) {
+        this.parameters.put(PARAM_NAME, name);
+    }
+
+    /**
+     * @return url the navigation item should link to
+     */
+    public String getUrl() {
+        return parameters.get(PARAM_URL);
+    }
+
+    public void setUrl(String url) {
+        this.parameters.put(PARAM_URL, url);
+    }
+
+    
+    public Map<String, String> getParameters() {
+        return parameters;
+    }
+
+    public void setParameters(Map<String, String> parameters) {
+        this.parameters = parameters;
+    }
+
+    /**
+     * Flag that defines if this navigation item is equal to the requested page
+     *
+     * @return {@literal true} if this navigation item is pointing to the current page
+     */
+    public boolean isSelected() {
+        return selected;
+    }
+
+    public void setSelected(boolean selected) {
+        this.selected = selected;
+    }
+
+    /**
+     * Flag that defines if a descendant navigation item is equal to the current request
+     *
+     * @return {@literal true} if this navigation item is an ancestor of the current requested page
+     */
+    public boolean isExpanded() {
+        return expanded;
+    }
+
+    public void setExpanded(boolean expanded) {
+        this.expanded = expanded;
+    }
+
+    /**
+     * @return a List of Navigation items that are a level deeper (recursive)
+     */
+    public List<NavigationItem> getChildNavigationItems() {
+        return childNavigationItems;
+    }
+
+    public void setChildNavigationItems(List<NavigationItem> childNavigationItems) {
+        this.childNavigationItems = childNavigationItems;
+    }
+
+    /**
+     * Adds a single NavigationItem to the List of child navigation items
+     *
+     * @param navigationItem child node/tree of the current NavigationItem
+     */
+    public void addChildNavigationItem(NavigationItem navigationItem) {
+        this.childNavigationItems.add(navigationItem);
+    }
+
+    public boolean isHasChildren() {
+        return !this.childNavigationItems.isEmpty();
+    }
+
+}

Added: incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationMenu.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationMenu.java?rev=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationMenu.java (added)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/model/NavigationMenu.java Thu Oct  6 11:09:18 2011
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+package org.apache.rave.portal.web.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Wrapper around {@link NavigationItem}'s
+ */
+public class NavigationMenu {
+
+    private String name;
+
+    public NavigationMenu(String name) {
+        super();
+        this.name = name;
+        this.navigationItems = new ArrayList<NavigationItem>();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    private List<NavigationItem> navigationItems;
+
+
+    /**
+     * @return List of {@link NavigationItem}'s for this menu, can be empty, not null
+     */
+    public List<NavigationItem> getNavigationItems() {
+        return navigationItems;
+    }
+
+    public void setNavigationItems(List<NavigationItem> navigationItems) {
+        this.navigationItems = navigationItems;
+    }
+
+    /**
+     * Adds a single {@link NavigationItem} to this menu
+     *
+     * @param navigationItem to add
+     */
+    public void addNavigationItem(NavigationItem navigationItem) {
+        this.navigationItems.add(navigationItem);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        NavigationMenu that = (NavigationMenu) o;
+
+        if (name != null ? !name.equals(that.name) : that.name != null) {
+            return false;
+        }
+        if (navigationItems != null ? !navigationItems.equals(that.navigationItems) : that.navigationItems != null) {
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = name != null ? name.hashCode() : 0;
+        result = 31 * result + (navigationItems != null ? navigationItems.hashCode() : 0);
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer();
+        sb.append("NavigationMenu");
+        sb.append("{name='").append(name).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+
+}

Modified: incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java?rev=1179569&r1=1179568&r2=1179569&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java (original)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/util/ViewNames.java Thu Oct  6 11:09:18 2011
@@ -30,5 +30,10 @@ public class ViewNames {
     public static final String ADD_WIDGET_FORM = "addwidget";
     public static final String NEW_ACCOUNT = "newaccount";
     public static final String USER_PROFILE = "userProfile";
+
+    public static final String ADMIN_HOME = "admin/home";
+    public static final String ADMIN_USERS = "admin/users";
+    public static final String ADMIN_WIDGETS = "admin/widgets";
+
     public static final String REDIRECT = "redirect:/";
 }

Added: 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=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java (added)
+++ incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/controller/AdminControllerTest.java Thu Oct  6 11:09:18 2011
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+package org.apache.rave.portal.web.controller;
+
+import org.apache.rave.portal.web.util.ViewNames;
+import org.junit.Before;
+import org.junit.Test;
+import org.springframework.ui.ExtendedModelMap;
+import org.springframework.ui.Model;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Test for {@link AdminController}
+ */
+public class AdminControllerTest {
+
+    AdminController controller;
+
+    @Test
+    public void adminHome() throws Exception {
+        Model model = new ExtendedModelMap();
+        String homeView = controller.viewDefault(model);
+        assertEquals(ViewNames.ADMIN_HOME, homeView);
+        assertTrue(model.containsAttribute("tabs"));
+    }
+
+    @Test
+    public void adminUsers() throws Exception {
+        Model model = new ExtendedModelMap();
+        String adminUsersView = controller.viewUsers(model);
+        assertEquals(ViewNames.ADMIN_USERS, adminUsersView);
+        assertTrue(model.containsAttribute("tabs"));
+    }
+
+    @Test
+    public void adminWidgets() throws Exception {
+        Model model = new ExtendedModelMap();
+        String adminWidgetsView = controller.viewWidgets(model);
+        assertEquals(ViewNames.ADMIN_WIDGETS, adminWidgetsView);
+        assertTrue(model.containsAttribute("tabs"));
+    }
+    
+
+    @Before
+    public void setUp() throws Exception {
+        controller = new AdminController();
+    }
+}

Added: incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationItemTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationItemTest.java?rev=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationItemTest.java (added)
+++ incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationItemTest.java Thu Oct  6 11:09:18 2011
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ */
+
+package org.apache.rave.portal.web.model;
+
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertNotNull;
+import static junit.framework.Assert.assertNull;
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Test for {@link NavigationItem}
+ */
+public class NavigationItemTest {
+
+    @Test
+    public void testCreateEmptyNavigationItem() throws Exception {
+        NavigationItem navigationItem = new NavigationItem();
+        assertNotNull(navigationItem);
+        assertNull(navigationItem.getName());
+        assertNull(navigationItem.getUrl());
+        assertFalse(navigationItem.isExpanded());
+        assertFalse(navigationItem.isSelected());
+        assertTrue(navigationItem.getChildNavigationItems().isEmpty());
+        assertFalse(navigationItem.isHasChildren());
+    }
+
+    @Test
+    public void testNameUrlConstructor() throws Exception {
+        String name = "Home";
+        String url="/index.html";
+        NavigationItem navigationItem = new NavigationItem(name, url);
+        assertNotNull(navigationItem);
+        assertEquals(name, navigationItem.getName());
+        assertEquals(url, navigationItem.getUrl());
+        assertFalse(navigationItem.isExpanded());
+        assertFalse(navigationItem.isSelected());
+        assertTrue(navigationItem.getChildNavigationItems().isEmpty());
+        assertFalse(navigationItem.isHasChildren());
+    }
+
+    @Test
+    public void testSettersGetters() throws Exception {
+        String name = "Home";
+        String url="/index.html";
+
+        NavigationItem navigationItem = new NavigationItem();
+        navigationItem.setName(name);
+        navigationItem.setUrl(url);
+        navigationItem.setExpanded(true);
+        navigationItem.setSelected(true);
+        NavigationItem childItem = new NavigationItem("About", "/about/index.html");
+        navigationItem.addChildNavigationItem(childItem);
+
+        assertEquals(name, navigationItem.getName());
+        assertEquals(url, navigationItem.getUrl());
+        assertTrue(navigationItem.isExpanded());
+        assertTrue(navigationItem.isSelected());
+        assertEquals(childItem, navigationItem.getChildNavigationItems().get(0));
+        assertTrue(navigationItem.isHasChildren());
+
+    }
+}

Added: incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationMenuTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationMenuTest.java?rev=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationMenuTest.java (added)
+++ incubator/rave/trunk/rave-components/rave-web/src/test/java/org/apache/rave/portal/web/model/NavigationMenuTest.java Thu Oct  6 11:09:18 2011
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+package org.apache.rave.portal.web.model;
+
+import org.junit.Test;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertTrue;
+
+/**
+ * Test for {@link NavigationMenu}
+ */
+public class NavigationMenuTest {
+
+    @Test
+    public void testCreate() throws Exception {
+        NavigationMenu navigationMenu = new NavigationMenu("menu");
+        assertEquals("menu", navigationMenu.getName());
+        assertTrue(navigationMenu.getNavigationItems().isEmpty());
+    }
+
+    @Test
+    public void testGettersSetters() throws Exception {
+        NavigationMenu navigationMenu = new NavigationMenu("footer");
+        assertEquals("footer", navigationMenu.getName());
+
+        navigationMenu.setName("footermenu");
+        assertEquals("footermenu", navigationMenu.getName());
+
+        NavigationItem navigationItem = new NavigationItem("contact us", "/contact.html");
+        navigationMenu.addNavigationItem(navigationItem);
+        assertEquals(navigationItem, navigationMenu.getNavigationItems().get(0));
+    }
+
+}

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=1179569&r1=1179568&r2=1179569&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 Thu Oct  6 11:09:18 2011
@@ -103,6 +103,13 @@ page.addwidget.form.submit=Add widget
 page.addwidget.result.exists=The widget you submitted already exists.
 page.addwidget.result.success=The widget was successfully added.
 
+admin.home.title=Rave admin interface
+admin.home.shorttitle=Home
+admin.widgets.title=Rave admin interface - Widgets
+admin.widgets.shorttitle=Widgets
+admin.users.title=Rave admin interface - Users
+admin.users.shorttitle=Users
+
 widget.author=Author
 widget.authorEmail=Author's email address
 widget.description=Description

Added: 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=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_tabsheader.tag (added)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/admin_tabsheader.tag Thu Oct  6 11:09:18 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" %>
+<fmt:setBundle basename="messages"/>
+<div id="tabsHeader">
+    <nav>
+        <%--@elvariable id="tabs" type="org.apache.rave.portal.web.model.NavigationMenu"--%>
+        <c:if test="${not empty tabs}">
+            <ul id="tabs" class="rave-ui-tabs">
+                <c:forEach items="${tabs.navigationItems}" var="navItem">
+                    <c:choose>
+                        <c:when test="${navItem.selected}">
+                            <li class="rave-ui-tab rave-ui-tab-selected">
+                                <div class="page-title">
+                                    <fmt:message key="${navItem.name}"/>
+                                </div>
+                            </li>
+                        </c:when>
+                        <c:otherwise>
+                            <li class="rave-ui-tab">
+                                <div class="page-title">
+                                    <a href="<spring:url value="${navItem.url}"/>"><fmt:message
+                                            key="${navItem.name}"/></a>
+                                </div>
+                            </li>
+                        </c:otherwise>
+                    </c:choose>
+                </c:forEach>
+            </ul>
+        </c:if>
+    </nav>
+</div>
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/header.tag
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/header.tag?rev=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/header.tag (added)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/header.tag Thu Oct  6 11:09:18 2011
@@ -0,0 +1,37 @@
+<%--
+  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" %>
+<%@ attribute name="pageTitle" required="false" description="The title of the page" %>
+<fmt:setBundle basename="messages"/>
+
+<header>
+    <nav class="topnav">
+        <%--@elvariable id="topnav" type="org.apache.rave.portal.web.model.NavigationMenu"--%>
+        <c:if test="${not empty topnav}">
+            <ul class="horizontal-list">
+                <c:forEach items="${topnav.navigationItems}" var="navItem">
+                    <li><a href="<spring:url value="${navItem.url}"/>"><fmt:message key="${navItem.name}"/></a></li>
+                </c:forEach>
+            </ul>
+        </c:if>
+    </nav>
+    <h1><c:out value="${pageTitle}"/></h1>
+</header>

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag?rev=1179569&r1=1179568&r2=1179569&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_generic_page.tag Thu Oct  6 11:09:18 2011
@@ -8,7 +8,7 @@
   "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
+    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
@@ -16,8 +16,7 @@
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
-
---%>
+  --%>
 <%@ tag language="java" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
@@ -35,6 +34,9 @@ This tag will provide simple template la
      <link rel="stylesheet" href="//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.13/themes/base/jquery-ui.css"/>
      <link rel="stylesheet" href="<c:url value="/css/default.css" />" />
      <rave:custom_css/>
+     <!--[if lt IE 9]>
+     <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+     <![endif]-->
   </head>
   <body>
   <jsp:doBody/>

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/addwidget.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/addwidget.jsp?rev=1179569&r1=1179568&r2=1179569&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/addwidget.jsp (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/addwidget.jsp Thu Oct  6 11:09:18 2011
@@ -7,7 +7,7 @@
   "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
+    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
@@ -26,14 +26,20 @@
 <fmt:setBundle basename="messages"/>
 <fmt:message key="page.addwidget.title" var="pagetitle"/>
 <rave:rave_generic_page pageTitle="${pagetitle}">
-    <div id="header">
-        <div class="header-a">
-        <span class="backToPage">
-            <a href="<spring:url value="/index.html" />"><fmt:message key="page.general.back"/></a>
-        </span>
-        </div>
+    <header>
+        <nav class="topnav">
+            <ul class="horizontal-list">
+                <li>
+                    <a href="<spring:url value="/index.html" />"><fmt:message key="page.general.back"/></a>
+                </li>
+                <li>
+                    <a href="<spring:url value="/j_spring_security_logout" htmlEscape="true" />">
+                      <fmt:message key="page.general.logout"/></a>
+                </li>
+            </ul>
+        </nav>
         <h1><fmt:message key="page.addwidget.title"/></h1>
-    </div>
+    </header>
 
     <div id="content">
         <h2><fmt:message key="page.addwidget.form.header"/></h2>

Added: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp?rev=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp (added)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/home.jsp Thu Oct  6 11:09:18 2011
@@ -0,0 +1,32 @@
+<%--
+  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 tagdir="/WEB-INF/tags" prefix="rave" %>
+<fmt:setBundle basename="messages"/>
+
+<fmt:message key="admin.home.title" var="pagetitle"/>
+<rave:rave_generic_page pageTitle="${pagetitle}">
+    <rave:header pageTitle="${pagetitle}"/>
+    <rave:admin_tabsheader/>
+    <div id="pageContent">
+        <p>Content goes here</p>
+    </div>
+</rave:rave_generic_page>
\ No newline at end of file

Added: 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=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp (added)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/users.jsp Thu Oct  6 11:09:18 2011
@@ -0,0 +1,32 @@
+<%--
+  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 tagdir="/WEB-INF/tags" prefix="rave" %>
+<fmt:setBundle basename="messages"/>
+
+<fmt:message key="admin.users.title" var="pagetitle"/>
+<rave:rave_generic_page pageTitle="${pagetitle}">
+    <rave:header pageTitle="${pagetitle}"/>
+    <rave:admin_tabsheader/>
+    <div id="pageContent">
+        <p>Content goes here</p>
+    </div>
+</rave:rave_generic_page>
\ No newline at end of file

Added: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/widgets.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/widgets.jsp?rev=1179569&view=auto
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/widgets.jsp (added)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/admin/widgets.jsp Thu Oct  6 11:09:18 2011
@@ -0,0 +1,32 @@
+<%--
+  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 tagdir="/WEB-INF/tags" prefix="rave" %>
+<fmt:setBundle basename="messages"/>
+
+<fmt:message key="admin.widgets.title" var="pagetitle"/>
+<rave:rave_generic_page pageTitle="${pagetitle}">
+    <rave:header pageTitle="${pagetitle}"/>
+    <rave:admin_tabsheader/>
+    <div id="pageContent">
+        <p>Content goes here</p>
+    </div>
+</rave:rave_generic_page>
\ No newline at end of file

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/home.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/home.jsp?rev=1179569&r1=1179568&r2=1179569&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/home.jsp (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/home.jsp Thu Oct  6 11:09:18 2011
@@ -7,7 +7,7 @@
   "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
+    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
@@ -15,32 +15,35 @@
   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" %><%--
---%><%@ taglib prefix="portal" uri="http://www.apache.org/rave/tags" %><%--
---%><%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%><%--
---%><jsp:useBean id="pages" type="java.util.List<org.apache.rave.portal.model.Page>" scope="request"/><%--
---%><fmt:setBundle basename="messages"/>
+  --%>
+<%@ 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" %>
+<%@ taglib prefix="portal" uri="http://www.apache.org/rave/tags" %>
+<%@ taglib tagdir="/WEB-INF/tags" prefix="rave"%>
+<jsp:useBean id="pages" type="java.util.List<org.apache.rave.portal.model.Page>" scope="request"/>
+<fmt:setBundle basename="messages"/>
 <%--@elvariable id="page" type="org.apache.rave.portal.model.Page"--%>
 <rave:rave_generic_page pageTitle="${page.name}">
-    <div id="header">
-        <div class="header-a">
-            <a href="<spring:url value="/j_spring_security_logout" htmlEscape="true" />">
-              <fmt:message key="page.general.logout"/></a>
-        </div>
-        <div class="widget-a">
-            <a href="<spring:url value="/app/store?referringPageId=${page.entityId}" />">
-              <fmt:message key="page.store.title"/>
-            </a>
-        </div>
+    <header>
+        <nav class="topnav">
+            <ul class="horizontal-list">
+                <li>
+                    <a href="<spring:url value="/app/store?referringPageId=${page.entityId}" />">
+                      <fmt:message key="page.store.title"/>
+                    </a>
+                </li>
+                <li>
+                    <a href="<spring:url value="/j_spring_security_logout" htmlEscape="true" />">
+                      <fmt:message key="page.general.logout"/></a>
+                </li>
+            </ul>
+        </nav>
       <h1>
           <fmt:message key="page.home.welcome"><fmt:param><c:out value="${page.owner.username}"/></fmt:param></fmt:message>
       </h1>
-    </div>
+    </header>
     <input id="currentPageId" type="hidden" value="${page.entityId}" />
     <div id="tabsHeader">
         <%-- render the page tabs --%>

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/store.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/store.jsp?rev=1179569&r1=1179568&r2=1179569&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/store.jsp (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/store.jsp Thu Oct  6 11:09:18 2011
@@ -1,22 +1,21 @@
 <%--
-   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.
-  
---%>
+  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" %>
@@ -26,19 +25,23 @@
 
 <fmt:message key="page.store.title" var="pagetitle"/>
 <rave:rave_generic_page pageTitle="${pagetitle}">
-<div id="header">
-    <div class="header-a">
-        <span class="backToPage">
-            <a href="<spring:url value="/index.html" />"><fmt:message key="page.general.back"/></a>
-        </span>
-    </div>
-    <div class="widget-a">
-        <span>
-            <a href="<spring:url value="/app/store/widget/add"/>"><fmt:message key="page.addwidget.title"/></a>
-        </span>
-    </div>
+<header>
+    <nav class="topnav">
+        <ul class="horizontal-list">
+            <li>
+                <a href="<spring:url value="/app/store/widget/add"/>"><fmt:message key="page.addwidget.title"/></a>
+            </li>
+            <li>
+                <a href="<spring:url value="/index.html" />"><fmt:message key="page.general.back"/></a>
+            </li>
+            <li>
+                <a href="<spring:url value="/j_spring_security_logout" htmlEscape="true" />">
+                  <fmt:message key="page.general.logout"/></a>
+            </li>
+        </ul>
+    </nav>
     <h1>${pagetitle}</h1>
-</div>
+</header>
 
 <div id="content">
     

Modified: incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/widget.jsp
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/widget.jsp?rev=1179569&r1=1179568&r2=1179569&view=diff
==============================================================================
--- incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/widget.jsp (original)
+++ incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/widget.jsp Thu Oct  6 11:09:18 2011
@@ -1,22 +1,21 @@
 <%--
-   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.
-  
---%>
+  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" %>
@@ -24,23 +23,27 @@
 <jsp:useBean id="widget" scope="request" class="org.apache.rave.portal.model.Widget"/>
 <fmt:setBundle basename="messages"/>
 <rave:rave_generic_page pageTitle="${widget.title}">
-    <div id="header">
-        <div class="header-a">
-        <span class="backToPage">
-            <a href="<spring:url value="/index.html" />"><fmt:message key="page.general.back"/></a>
-        </span>
-        </div>
-        <c:if test="${not empty referringPageId}">
-            <div class="widget-a">
-            <span>
-                <a href="<spring:url value="/app/store?referringPageId=${referringPageId}" />">
-                    <fmt:message key="page.widget.backToStore"/>
-                </a>
-            </span>
-            </div>
-        </c:if>
+    <header>
+        <nav class="topnav">
+            <ul class="horizontal-list">
+                <c:if test="${not empty referringPageId}">
+                    <li>
+                        <a href="<spring:url value="/app/store?referringPageId=${referringPageId}" />">
+                            <fmt:message key="page.widget.backToStore"/>
+                        </a>
+                    </li>
+                </c:if>
+                <li>
+                    <a href="<spring:url value="/index.html" />"><fmt:message key="page.general.back"/></a>
+                </li>
+                <li>
+                    <a href="<spring:url value="/j_spring_security_logout" htmlEscape="true" />">
+                        <fmt:message key="page.general.logout"/></a>
+                </li>
+            </ul>
+        </nav>
         <h1><c:out value="${widget.title}"/></h1>
-    </div>
+    </header>
 
 
     <div id="content">

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=1179569&r1=1179568&r2=1179569&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 Thu Oct  6 11:09:18 2011
@@ -1,24 +1,22 @@
 /*
-* 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.
-*/
-
-/**
-* This is the same as rave.css used for the website.
-* FIXME: where is rave.css?
-*/
+ * 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.
+ */
+
 html {
     background-color: #EBEBEB;
 }
@@ -33,69 +31,85 @@ body {
     margin:0;
 }
 
-#banner {
-    padding: 0 0 10px 10px;
+/* general html fields */
+
+header, nav, article, section, footer, ul {
+    display: block;
+    margin: 0;
+    padding: 0;
 }
 
-a {
-    color: #107EC0;
+h1, h2, h3, h4, h5, h6 {
+    color: #193240;
+    text-transform: uppercase;
 }
 
-a:visited {
-    color: #107EC0;
+dt {
+    display: inline;
+    float: left;
 }
 
-a:hover {
+a, a:visited, a:hover {
     color: #107EC0;
-    background-color: #e6ebed;
 }
 
-#header a {
-    color: #F2F2F2;
-    text-decoration: none;
+a:hover {
+    background-color: #e6ebed;
 }
 
-#header a:visited {
-    color: #F2F2F2;
-    text-decoration: none;
+a img {
+    border: none;
 }
 
-#header a:hover {
-    color: #F2F2F2;
-    background-color: #666666;
-    text-decoration: none;
+.clear-float {
+    clear: both;
 }
 
-
-a img {
-    border: none;
+.horizontal-list li {
+    display: inline;
+    list-style: none;
+    padding:0 10px;
 }
 
-h1, h2, h3, h4, h5, h6 {
-    color: #193240;
-    text-transform: uppercase;
+#banner {
+    padding: 0 0 10px 10px;
 }
 
-#header {
-    background-color: #222222;
+/* Header */
+header {
     height:50px;
+    color: #F2F2F2;
+    background-color: #222222;
 }
-#header img {
+
+header img {
     max-width: 150px;
 }
-.header-a {
-    float: right;
-    margin-right: 2%;
+
+header a, header a:visited {
+    color: #F2F2F2;
+    text-decoration: none;
 }
-#header h1 {
+
+header a:hover {
+    color: #F2F2F2;
+    background-color: #666666;
+    text-decoration: none;
+}
+header h1 {
     text-align: center;
     text-transform: lowercase;
     font-size: 1.5em;
-    margin: auto;
+    margin: 0 auto;
     width: 80%;
     color: #F2F2F2;
 }
 
+.topnav {
+    float: right;
+    margin-right: 2%;
+}
+/* content */
 #content {
     background-color: transparent;
     padding: 0;
@@ -127,6 +141,34 @@ h1, h2, h3, h4, h5, h6 {
     font-size: 1em;
     margin-bottom: 0;
 }
+
+/* Widgets */
+.widget {
+    padding: 5px;
+    background-color: white;
+    box-shadow: 2px 2px 4px #666666;
+    border-radius: 0 0 5px 5px;
+    height: 100%;
+}
+
+.widget-wrapper-transitional {
+    position: absolute;
+    z-index: 1000;
+    left:0.25%;
+    top: 51px;
+}
+
+.widget-wrapper-canvas {
+    position: absolute;
+    z-index: 1000;
+    left:0.25%;
+    top: 51px;
+    width: 99.5%;
+    height: 100%;
+    opacity: 1;
+    vertical-align: top;
+}
+
 .widget-a {
     color: white;
     width: 100px;
@@ -135,16 +177,6 @@ h1, h2, h3, h4, h5, h6 {
     margin-right: 2%;
 }
 
-.clear-float {
-    clear: both;
-}
-
-.codehilite {
-    background-color: #F00;
-    padding: 0.01em 1em;
-    border-radius: 10px;
-}
-
 .widget-wrapper {
     vertical-align: top;
     margin-bottom: 20px;
@@ -215,31 +247,6 @@ h1, h2, h3, h4, h5, h6 {
     background-color: yellow;
 }
 
-.widget {
-    padding: 5px;
-    background-color: white;
-    box-shadow: 2px 2px 4px #666666;
-    border-radius: 0 0 5px 5px;
-    height: 100%;
-}
-
-.widget-wrapper-transitional {
-    position: absolute;
-    z-index: 1000;
-    left:0.25%;
-    top: 51px;
-}
-
-.widget-wrapper-canvas {
-    position: absolute;
-    z-index: 1000;
-    left:0.25%;
-    top: 51px;
-    width: 99.5%;
-    height: 100%;
-    opacity: 1;
-    vertical-align: top;
-}
 .region {
     float: left;
     display: block;
@@ -368,60 +375,6 @@ ul.paging li {
 }
 
 
-#navigation {
-    border: 1px solid #e6ebed;
-    border-left: none;
-    -moz-border-radius: 0 10px 10px 0;
-    border-radius: 0 10px 10px 0;
-    font-size: 0.9em;
-    color: #003;
-    float: left;
-    padding: 15px 15px 5px 25px;
-    width: 180px;
-    background: none repeat scroll 0 0 #f5f8fa;
-    margin: 20px 0 20px 0;
-}
-
-#storeTop
-
-#navigation img {
-    padding-bottom: 15px;
-    margin-left: auto;
-    margin-right: auto;
-    display: block;
-}
-
-#navigation h1 {
-    color: #000;
-    font-size: 1em;
-    padding: 0;
-    margin-top: 0.8em;
-    margin-bottom: 0;
-    border-bottom: 1px solid #a3afb6;
-}
-
-#navigation ul {
-    margin: 0 0;
-    padding: 0;
-    list-style: none;
-}
-
-#navigation li {
-    border-bottom: 1px solid #e6ebed;
-    margin: 0.2em 0;
-    padding: 0;
-}
-
-#navigation li a {
-    margin: 0;
-    text-decoration: none;
-}
-
-#navigation li a:hover {
-    color: #193240;
-    background: none;
-}
-
 #footer {
     margin: 20px 150px 20px 250px;
     border-top: 1px solid #ccc;
@@ -431,22 +384,6 @@ ul.paging li {
     text-align: center;
 }
 
-#asf-logo {
-    width: 180px;
-    padding-top: 20px;
-}
-
-/* definition lists */
-dd {
-}
-
-dl {
-}
-
-dt {
-    display: inline;
-    float: left;
-}
 
 button.widget-toolbar-btn {
 	width: 1em;
@@ -515,6 +452,7 @@ span.error, label.error {
 
 #tabs {
     border-bottom: 1px solid #B4C4CF;
+    margin: 0;
     padding: 10px 15px 0 13px;
     white-space: nowrap;
 }
@@ -531,7 +469,17 @@ span.error, label.error {
     top: 1px;
 }
 
-.rave-ui-tab-selected {
+.rave-ui-tab a, .rave-ui-tab a:visited {
+    color: #767676;
+    text-decoration: none;
+}
+
+.rave-ui-tab:hover, .rave-ui-tab a:hover {
+    background-color: #D7D7D3;
+    color: #000000;
+}
+
+.rave-ui-tab-selected, .rave-ui-tab-selected:hover {
     background-color: #D7D7D3;
     border-bottom: 1px solid #D7D7D3;
     color: #000000;
@@ -566,10 +514,7 @@ span.error, label.error {
 
 .page-title {
     display: inline-block;
-    padding-left: 10px;
-    padding-right: 10px;
-    padding-top: 5px;
-    padding-bottom: 5px;
+    padding: 5px 10px;
     cursor: pointer;
 }