roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r265814 - in /incubator/roller/branches/roller_2.0: metadata/xdoclet/ nbproject/ src/org/roller/presentation/filters/ src/org/roller/presentation/tags/menu/ src/org/roller/presentation/website/actions/ web/ web/WEB-INF/ web/WEB-INF/classes/...
Date Fri, 02 Sep 2005 01:48:02 GMT
Author: snoopdave
Date: Thu Sep  1 18:47:52 2005
New Revision: 265814

URL: http://svn.apache.org/viewcvs?rev=265814&view=rev
Log:
Added weblog remove to Weblog Settings page and tried to improve JSP page error handling

Added:
    incubator/roller/branches/roller_2.0/web/website/WebsiteRemove.jsp
Modified:
    incubator/roller/branches/roller_2.0/metadata/xdoclet/error-pages.xml
    incubator/roller/branches/roller_2.0/nbproject/project.xml
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/filters/RequestFilter.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItem.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItemImpl.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java
    incubator/roller/branches/roller_2.0/web/WEB-INF/classes/ApplicationResources.properties
    incubator/roller/branches/roller_2.0/web/WEB-INF/tiles-defs.xml
    incubator/roller/branches/roller_2.0/web/error.jsp
    incubator/roller/branches/roller_2.0/web/errorBody.jsp
    incubator/roller/branches/roller_2.0/web/taglibs.jsp
    incubator/roller/branches/roller_2.0/web/theme/footer.jsp
    incubator/roller/branches/roller_2.0/web/theme/menu.css
    incubator/roller/branches/roller_2.0/web/theme/roller.css
    incubator/roller/branches/roller_2.0/web/website/YourWebsites.jsp
    incubator/roller/branches/roller_2.0/web/website/edit-website.jsp
    incubator/roller/branches/roller_2.0/web/website/remove-page.jsp

Modified: incubator/roller/branches/roller_2.0/metadata/xdoclet/error-pages.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/metadata/xdoclet/error-pages.xml?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/metadata/xdoclet/error-pages.xml (original)
+++ incubator/roller/branches/roller_2.0/metadata/xdoclet/error-pages.xml Thu Sep  1 18:47:52
2005
@@ -1,6 +1,6 @@
 
 <error-page>
-    <exception-type>java.lang.Exception</exception-type>
+    <exception-type>org.roller.RollerException</exception-type>
     <location>/error.jsp</location>
 </error-page>
 

Modified: incubator/roller/branches/roller_2.0/nbproject/project.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/nbproject/project.xml?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/nbproject/project.xml (original)
+++ incubator/roller/branches/roller_2.0/nbproject/project.xml Thu Sep  1 18:47:52 2005
@@ -34,9 +34,9 @@
                     <location>sandbox/standalone/src</location>
                 </source-folder>
                 <source-folder>
-                    <label>build/generated/src.presentation</label>
+                    <label>contrib/plugins/src</label>
                     <type>java</type>
-                    <location>build/generated/src.presentation</location>
+                    <location>contrib/plugins/src</location>
                 </source-folder>
                 <source-folder>
                     <label>build/generated/src.business</label>
@@ -44,9 +44,9 @@
                     <location>build/generated/src.business</location>
                 </source-folder>
                 <source-folder>
-                    <label>contrib/plugins/src</label>
+                    <label>build/generated/src.presentation</label>
                     <type>java</type>
-                    <location>contrib/plugins/src</location>
+                    <location>build/generated/src.presentation</location>
                 </source-folder>
             </folders>
             <ide-actions>
@@ -112,16 +112,16 @@
                         <location>sandbox/standalone/src</location>
                     </source-folder>
                     <source-folder style="packages">
-                        <label>build/generated/src.presentation</label>
-                        <location>build/generated/src.presentation</location>
+                        <label>contrib/plugins/src</label>
+                        <location>contrib/plugins/src</location>
                     </source-folder>
                     <source-folder style="packages">
                         <label>build/generated/src.business</label>
                         <location>build/generated/src.business</location>
                     </source-folder>
                     <source-folder style="packages">
-                        <label>contrib/plugins/src</label>
-                        <location>contrib/plugins/src</location>
+                        <label>build/generated/src.presentation</label>
+                        <location>build/generated/src.presentation</location>
                     </source-folder>
                     <source-file>
                         <location>build.xml</location>
@@ -140,11 +140,11 @@
         <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
             <compilation-unit>
                 <package-root>src</package-root>
-                <package-root>build/generated/src.business</package-root>
-                <package-root>build/generated/src.presentation</package-root>
                 <package-root>sandbox/standalone/src</package-root>
                 <package-root>tests</package-root>
                 <package-root>contrib/plugins/src</package-root>
+                <package-root>build/generated/src.business</package-root>
+                <package-root>build/generated/src.presentation</package-root>
                 <classpath mode="compile">tools/hibernate-2.1/lib/jdom.jar:tools/buildtime/junit-3.8.1.jar:tools/lib/activation.jar:tools/lib/commons-betwixt-1.0-beta-1.jar:tools/lib/commons-codec-1.1.jar:tools/lib/commons-httpclient-2.0.2.jar:tools/lib/concurrent-1.3.2.jar:tools/lib/ekitapplet.jar:tools/lib/jazzy-core.jar:tools/lib/log4j-1.2.4.jar:tools/lib/lucene-1.4.3.jar:tools/lib/mail.jar:tools/lib/mm.mysql-2.0.14-bin.jar:tools/lib/rome-0.6.jar:tools/lib/rome-fetcher-0.6.jar:tools/lib/taglibs-string.jar:tools/lib/velocity-1.4.jar:tools/lib/velocity-dep-1.4.jar:tools/lib/velocity-tools-1.1.jar:tools/lib/xmlrpc-1.2-b1.jar:tools/struts-1.2.4/lib/antlr.jar:tools/struts-1.2.4/lib/commons-beanutils.jar:tools/struts-1.2.4/lib/commons-collections.jar:tools/struts-1.2.4/lib/commons-digester.jar:tools/struts-1.2.4/lib/commons-fileupload.jar:tools/struts-1.2.4/lib/commons-lang-2.0.jar:tools/struts-1.2.4/lib/commons-logging.jar:tools/struts-1.2.4/lib/commons-validator.jar:tools/struts-1.2.4/lib/jakarta-oro.jar:tools/struts-1.2.4/lib/struts-el.jar:tools/struts-1.2.4/lib/struts.jar:tools/hibernate-2.1/hibernate2.jar:tools/hibernate-2.1/lib/c3p0-0.8.4.5.jar:tools/hibernate-2.1/lib/cglib-full-2.0.1.jar:tools/hibernate-2.1/lib/dom4j-1.4.jar:tools/hibernate-2.1/lib/ehcache-0.7.jar:tools/hibernate-2.1/lib/jta.jar:tools/hibernate-2.1/lib/odmg-3.0.jar:tools/hibernate-2.1/lib/proxool-0.8.3.jar:tools/hibernate-2.1/lib/xalan-2.4.0.jar:tools/buildtime/mockrunner-0.35/lib/mockrunner-servlet.jar:tools/buildtime/mockrunner-0.35/lib/mockrunner-struts.jar:tools/buildtime/mockrunner-0.35/lib/mockrunner.jar:tools/buildtime/mockrunner-0.35/lib/nekohtml.jar:tools/standard-1.0.3/lib/jaxen-full.jar:tools/standard-1.0.3/lib/jstl.jar:tools/standard-1.0.3/lib/standard.jar:tools/buildtime/tomcat-5.0.28/servlet-api.jar:tools/buildtime/tomcat-5.0.28/jsp-api.jar</classpath>
                 <source-level>1.4</source-level>
             </compilation-unit>

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/filters/RequestFilter.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/filters/RequestFilter.java?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/filters/RequestFilter.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/filters/RequestFilter.java
Thu Sep  1 18:47:52 2005
@@ -92,7 +92,9 @@
         catch (RollerException e)
         {
             // An error initializing the request is considered to be a 404
-            response.sendError(HttpServletResponse.SC_NOT_FOUND);
+            response.sendError(
+                    HttpServletResponse.SC_NOT_FOUND, 
+                    "Page not found or error parsing requested URL");
             return;
         }
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItem.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItem.java?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItem.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItem.java
Thu Sep  1 18:47:52 2005
@@ -1,5 +1,6 @@
 
 package org.roller.presentation.tags.menu;
+import java.util.Vector;
 import javax.servlet.http.HttpServletRequest;
 
 /** An individual menu item, contained in a Menu */ 
@@ -16,5 +17,8 @@
     
     /** Name of true/false configuration property that enables this menu */ 
     public void setEnabledProperty( String enabledProperty );
+
+    /** Collection of MenuItemImpl objects */
+	//public Vector getMenuItems();
 }
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItemImpl.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItemImpl.java?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItemImpl.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/tags/menu/MenuItemImpl.java
Thu Sep  1 18:47:52 2005
@@ -25,6 +25,8 @@
 public class MenuItemImpl extends BaseRollerMenu implements MenuItem
 {
 	private String mMenuId = null;
+    
+    //private Vector mMenuItems = new Vector();
 		
 	/** Is this the default menu? */
 	boolean mDefault = false;
@@ -90,7 +92,18 @@
 		}
 		return selected;
 	}
+    
+    /*
+    public Vector getMenuItems() 
+    {
+        return mMenuItems;
+    }
 
+    public addMenuItem(MenuItem item)
+    {
+        mMenuItems.add(item);
+    }
+    */
 }
 
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WeblogTemplateFormAction.java
Thu Sep  1 18:47:52 2005
@@ -402,6 +402,8 @@
 
         List pages = mgr.getPages(website);
         request.setAttribute("pages", pages);
+        
+        request.setAttribute("page", rreq.getPage());
     }
 }
 

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/WebsiteFormAction.java
Thu Sep  1 18:47:52 2005
@@ -2,6 +2,7 @@
 package org.roller.presentation.website.actions;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
@@ -44,7 +45,8 @@
  * @struts.action name="websiteFormEx" path="/editor/website" 
  * 		scope="session" parameter="method"
  * 
- * @struts.action-forward name="editWebsite.page" path=".edit-website"
+ * @struts.action-forward name="editWebsite.page" path=".edit-website" 
+ * @struts.action-forward name="removeWebsite.page" path=".WebsiteRemove" 
  */
 public final class WebsiteFormAction extends DispatchAction
 {
@@ -56,7 +58,7 @@
         ActionForm          actionForm,
         HttpServletRequest  request,
         HttpServletResponse response)
-        throws IOException, ServletException
+        throws Exception
     {
         return update( mapping, actionForm, request, response );
     }
@@ -104,8 +106,8 @@
                 request.setAttribute("editorPagesList", epages);
                 
                     
-                BasePageModel pageModel = new BasePageModel(
-                    "websiteSettings.title", request, response, mapping);
+                WebsitePageModel pageModel = new WebsitePageModel(
+                  "websiteSettings.title", request, response, mapping, website);
                 request.setAttribute("model",pageModel);   
             }
             else
@@ -127,7 +129,7 @@
         ActionForm          actionForm,
         HttpServletRequest  request,
         HttpServletResponse response)
-        throws IOException, ServletException
+        throws Exception
     {
         ActionErrors errors = new ActionErrors();
         ActionMessages messages = new ActionMessages();        
@@ -179,8 +181,9 @@
                         org.apache.commons.lang.StringUtils.deleteWhitespace(editorPages),
","));
                     request.setAttribute("editorPagesList", epages);   
                     
-                    BasePageModel pageModel = new BasePageModel(
-                        "websiteSettings.title", request, response, mapping);
+                    WebsitePageModel pageModel = 
+                        new WebsitePageModel("websiteSettings.title", 
+                                request, response, mapping, wd);
                     request.setAttribute("model",pageModel);                
                 /*
                 }
@@ -218,6 +221,104 @@
         if (messages.size() > 0) saveMessages(request, messages);  
         return forward;
     }
+    
+    //-----------------------------------------------------------------------
+    /** Send user to remove confirmation page */
+    public ActionForward removeOk(
+        ActionMapping       mapping,
+        ActionForm          actionForm,
+        HttpServletRequest  request,
+        HttpServletResponse response)
+        throws Exception
+    {
+        WebsiteFormEx form = (WebsiteFormEx)actionForm;
+        UserManager umgr = RollerFactory.getRoller().getUserManager();
+        WebsiteData website = umgr.retrieveWebsite(form.getId());
+        ActionForward forward = mapping.findForward("removeWebsite.page");
+        request.setAttribute("model", new WebsitePageModel(
+            "websiteRemove.title", request, response, mapping, website));
+        try
+        {
+            RollerSession rses = RollerSession.getRollerSession(request);            
+            if (rses.isUserAuthorizedToAdmin(website))
+            {
+                form.copyFrom(website, request.getLocale());               
+                request.setAttribute("website", website);
+            }
+            else
+            {
+                forward = mapping.findForward("access-denied");
+            }
+        }
+        catch (Exception e)
+        {
+            mLogger.error("ERROR in action",e);
+            throw new ServletException(e);
+        }
+        return forward;
+    }
 
+    //-----------------------------------------------------------------------
+    public ActionForward remove(
+        ActionMapping       mapping,
+        ActionForm          actionForm,
+        HttpServletRequest  request,
+        HttpServletResponse response)
+        throws Exception
+    {
+        ActionForward forward = mapping.findForward("yourWebsites");
+        try
+        {
+            UserManager umgr = RollerFactory.getRoller().getUserManager();
+            WebsiteFormEx form = (WebsiteFormEx)actionForm;
+            WebsiteData website = umgr.retrieveWebsite(form.getId());
+            
+            RollerSession rses = RollerSession.getRollerSession(request);          
+            if ( rses.isUserAuthorizedToAdmin(website) )
+            {
+                website.remove();
+                RollerFactory.getRoller().commit();
+
+                PageCacheFilter.removeFromCache(request, website);                    
+                actionForm.reset(mapping, request);
+            }
+            else
+            {
+                forward = mapping.findForward("access-denied");
+            }
+        }
+        catch (RollerException e)
+        {
+            ActionErrors errors = new ActionErrors();
+            errors.add(null, new ActionError(
+                    "error.internationalized",e.getRootCauseMessage()));
+            saveErrors(request, errors);       
+        }
+        catch (Exception e)
+        {
+            mLogger.error("ERROR in action",e);
+            throw new ServletException(e);
+        }
+        return forward;
+    }
+
+    public class WebsitePageModel extends BasePageModel 
+    {
+        private List permissions = new ArrayList();
+        public WebsitePageModel(
+                String titleKey,
+                HttpServletRequest request,
+                HttpServletResponse response,
+                ActionMapping mapping, 
+                WebsiteData website) throws RollerException
+        {
+            super(titleKey, request, response, mapping);
+            this.website = website;
+            Roller roller = RollerFactory.getRoller();
+            RollerSession rollerSession = RollerSession.getRollerSession(request);
+            UserData user = rollerSession.getAuthenticatedUser();
+            permissions = roller.getUserManager().getAllPermissions(website);
+        }
+    }
 }
 

Modified: incubator/roller/branches/roller_2.0/web/WEB-INF/classes/ApplicationResources.properties
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/WEB-INF/classes/ApplicationResources.properties?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/WEB-INF/classes/ApplicationResources.properties
(original)
+++ incubator/roller/branches/roller_2.0/web/WEB-INF/classes/ApplicationResources.properties
Thu Sep  1 18:47:52 2005
@@ -2,6 +2,8 @@
 application.none=None
 application.cancel=Cancel
 application.done=Done
+application.yes=Yes
+application.no=No
 
 # ------------------------------------------------------------- BookmarkForm.jsp
 
@@ -659,7 +661,8 @@
 pagesForm.addNewPage.success=New template <strong>{0}</strong> added successfully.
 pagesForm.add=Add
 pagesForm.emptyPage=Empty template...
-pagesForm.themesReminder=<b>Reminder:</b> You are currently using the {0} shared
theme, so some template edits may not effect how your blog looks.
+pagesForm.themesReminder=<b>Reminder:</b> You are currently using the {0} shared
\
+theme, so some template edits may not effect how your blog looks.
 editPages.title.removeOK=Confirm remove of template
 
 pageCache.flushed=Page cache has been successfully flushed.
@@ -675,6 +678,11 @@
 pageForm.save=Save
 pageForm.save.success=Template updated successfully.
 
+pageRemove.subtitle=Confirm removal of page
+pageRemove.youSure=Are you sure you want to remove this page?
+pageRemove.pageId=Page ID
+pageRemove.pageName=Page Name
+
 # ---------------------------------------------------- Ping Target Admin/Editing
 
 commonPingTargets.subtitle=Manage common weblog ping targets for all weblogs.
@@ -1336,10 +1344,21 @@
 
 websiteSettings.button.update=Update Weblog Settings
 websiteSettings.button.rebuildIndex=Rebuild Search Index
+websiteSettings.button.remove=Remove Weblog
 
 websiteSettings.savedChanges=Saved changes to weblog settings
 websiteSettings.error.sameTemplate=CHANGES REJECTED: cannot set default page \
 template and day template to same template
+
+websiteSettings.removeWebsiteHeading=Remove Weblog?
+websiteSettings.removeWebsite=You are the last user in this weblog, \
+would you like to remove it?
+
+websiteRemove.title=Confirm Weblog Remove
+websiteRemove.subtitle=Weblog removal is <b>NOT REVERSABLE</b>
+websiteRemove.youSure=Are you sure you want to remove weblog [{0}]?
+websiteRemove.websiteId=Weblog ID
+websiteRemove.websiteName=Weblog Name
 
 # ------------------------------------------------------------- Welcome new user
 

Modified: incubator/roller/branches/roller_2.0/web/WEB-INF/tiles-defs.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/WEB-INF/tiles-defs.xml?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/WEB-INF/tiles-defs.xml (original)
+++ incubator/roller/branches/roller_2.0/web/WEB-INF/tiles-defs.xml Thu Sep  1 18:47:52 2005
@@ -164,6 +164,9 @@
     <put name="content" value="/weblog/Pings.jsp" />
 </definition>
 
+<definition name=".WebsiteRemove" extends=".tiles-simplepage" >
+    <put name="content" value="/website/WebsiteRemove.jsp" />
+</definition>
 <definition name=".CustomPingTargetDeleteOK" extends=".tiles-simplepage" >
     <put name="content" value="/weblog/CustomPingTargetDeleteOK.jsp" />
 </definition>

Modified: incubator/roller/branches/roller_2.0/web/error.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/error.jsp?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/error.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/error.jsp Thu Sep  1 18:47:52 2005
@@ -1,4 +1,5 @@
 <%@ include file="/taglibs.jsp" %>
+<%@ page isErrorPage="true" %>
 <tiles:insert page="/theme/tiles-simplepage.jsp">
    <tiles:put name="banner"       value="/theme/banner.jsp" />
    <tiles:put name="bannerStatus" value="/theme/bannerStatus.jsp" />

Modified: incubator/roller/branches/roller_2.0/web/errorBody.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/errorBody.jsp?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/errorBody.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/errorBody.jsp Thu Sep  1 18:47:52 2005
@@ -1,42 +1,50 @@
 <%@ include file="/taglibs.jsp" %>
-<%@ page import="java.io.*,org.roller.util.Utilities" isErrorPage="true" %>
+
+<c:set var="status_code" value="${requestScope['javax.servlet.error.status_code']}" />
+<c:set var="message"     value="${requestScope['javax.servlet.error.message']}" />
+<c:set var="type"        value="${requestScope['javax.servlet.error.type']}" />
+<c:set var="exception"   value="${requestScope['javax.servlet.error.exception']}" />
     
-<%
-java.util.Locale locale = request.getLocale();
-java.util.ResourceBundle bundle = 
-   java.util.ResourceBundle.getBundle("ApplicationResources",locale);
-
-final Object codeObj, messageObj, typeObj, exceptionObj;
-codeObj =    request.getAttribute("javax.servlet.error.status_code");
-messageObj = request.getAttribute("javax.servlet.error.message");
-typeObj =    request.getAttribute("javax.servlet.error.type");
-
-String code=null, message=null, type=null;
-if ( null != codeObj )       code = codeObj.toString();
-if ( null != messageObj ) message = messageObj.toString();
-if ( null != typeObj )       type = typeObj.toString();
+<h2 class="error"><fmt:message key="errorPage.title" /></h2>
 
-String reason = null != code ? code : type;
+<table width="80%" border="1px" style="border-collapse: collapse;">
+<tr>
+    <td width="20%">Status Code</td>
+    <td><c:out value="${status_code}" /></td>
+</tr>
+<tr>
+    <td width="20%">Message</td>
+    <td><c:out value="${message}" /></td>
+</tr>
+<tr>
+    <td width="20%">Type</td>
+    <td><c:out value="${type}" /></td>
+</tr>
+<tr>
+    <td width="20%">Exception</td>
+    <td><c:out value="${exception}" /></td>
+</tr>
+</table>
+
+<c:if test="${!empty exception}">
+    <form>
+        <textarea rows="30" style="font-size:8pt;width:80%">
+        <% 
+        java.io.StringWriter sw = new java.io.StringWriter();
+        Throwable t = (Throwable)request.getAttribute("exception");
+        t.printStackTrace(new java.io.PrintWriter(sw));
+        %>
+        <%= sw.toString() %>
+        </textarea>
+    </form>
+</c:if>
+
+<br />
+<br />
 
-exception = (Throwable)request.getAttribute("javax.servlet.error.exception");
-%>
 
-<h2 class="error"><fmt:message key="errorPage.title" /></h2>
 
-<p><%= message %></p>
 
-<% if ( null != reason ) 
-{ %>
-<p><b><fmt:message key="errorPage.reason" /></b>: <%= reason %></p>
-<% } %>
-
-<% if ( null != exception ) 
-{ %>
-   <form><textarea rows="30" style="font-size:8pt;width:95%">
-   <% exception.printStackTrace(new java.io.PrintWriter(out)); %>
-   </textarea></form>
-<% } %>
 
 
 
-    

Modified: incubator/roller/branches/roller_2.0/web/taglibs.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/taglibs.jsp?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/taglibs.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/taglibs.jsp Thu Sep  1 18:47:52 2005
@@ -1,4 +1,4 @@
-<%@ page language="java" errorPage="/error.jsp" contentType="text/html; charset=UTF-8"
%>
+<%@ page language="java" contentType="text/html; charset=UTF-8" %>
 
 <%@ taglib uri="http://java.sun.com/jstl/core"       prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jstl/fmt"        prefix="fmt" %>

Modified: incubator/roller/branches/roller_2.0/web/theme/footer.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/theme/footer.jsp?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/theme/footer.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/theme/footer.jsp Thu Sep  1 18:47:52 2005
@@ -5,8 +5,6 @@
 You can override it with your own file via WEB-INF/tiles-def.xml
 --%>
 
-<div style="margin: 25px 4px 4px 4px; border-top: 1px solid grey">
-
 <a href="http://www.rollerweblogger.org">
     Powered by Roller Weblogger</a> | 
 
@@ -22,7 +20,6 @@
 <a href="http://sourceforge.net/mail/?group_id=47722">
     <fmt:message key="footer.mailingLists" /></a>
     
-</div>
 
 
 

Modified: incubator/roller/branches/roller_2.0/web/theme/menu.css
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/theme/menu.css?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/theme/menu.css (original)
+++ incubator/roller/branches/roller_2.0/web/theme/menu.css Thu Sep  1 18:47:52 2005
@@ -5,12 +5,14 @@
 /* rounded corners */
 
 div.menu-tl {
-    padding: 5px 5px 0px 5px; margin: 0px; height:100%;
+    margin: 0px; 
+    height: 100%;
     background: url("images/menutab-tl.gif") no-repeat left top;    
     background-repeat: no-repeat;
 }
 div.menu-tr {
-    margin: 0px; height:100%;
+    margin: 0px; 
+    height: 100%;
     background: url("images/menutab-tr.gif") no-repeat right top;    
     background-repeat: no-repeat;
 }
@@ -20,7 +22,7 @@
 ---------------------------------------------------------------------- */
 
 .menuTabTable {
-    height: 24px;
+    height: 22px;
 }
 td.menuTabSeparator {
     width: 4px;
@@ -41,7 +43,7 @@
 
 .menuItemTable {
     width: 100%;
-    height: 27px;
+    height: 25px;
     padding: 0px 0px 0px 10px;
 }
 .menuItemSelected {

Modified: incubator/roller/branches/roller_2.0/web/theme/roller.css
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/theme/roller.css?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/theme/roller.css (original)
+++ incubator/roller/branches/roller_2.0/web/theme/roller.css Thu Sep  1 18:47:52 2005
@@ -28,6 +28,9 @@
 .sidebarfadeBody {
     padding: 0px 5px 0px 5px; 
 }
+#footer {
+    border-top: 1px grey solid;
+}
 
 /* ----------------------------------------------------------------------
 General styles

Added: incubator/roller/branches/roller_2.0/web/website/WebsiteRemove.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/website/WebsiteRemove.jsp?rev=265814&view=auto
==============================================================================
--- incubator/roller/branches/roller_2.0/web/website/WebsiteRemove.jsp (added)
+++ incubator/roller/branches/roller_2.0/web/website/WebsiteRemove.jsp Thu Sep  1 18:47:52
2005
@@ -0,0 +1,40 @@
+<%@ include file="/taglibs.jsp" %>
+
+<p class="subtitle">
+<fmt:message key="websiteRemove.subtitle" />
+</p>
+
+<p>
+<fmt:message key="websiteRemove.youSure"> 
+    <fmt:param value="${website.name}" />
+</fmt:message>
+</p>
+
+<p>
+<fmt:message key="websiteRemove.websiteId" /> = [<c:out value="${website.id}" />]
+<br />
+<fmt:message key="websiteRemove.websiteName" /> = [<c:out value="${website.name}"
/>]
+</p>
+
+<table>
+<tr>
+	<td>
+		<html:form action="/editor/website" method="post">
+			<input type="submit" value='<fmt:message key="application.yes" />' ></input>
+			<html:hidden property="method" value="remove"/></input>
+			<html:hidden property="id" /></input>
+		</html:form>
+	</td>
+	<td>
+		<html:form action="/editor/website" method="post">
+			<input type="submit" value='<fmt:message key="application.no" />' ></input>
+			<input type="hidden" name="weblog" value='<c:out value="${website.handle}" />'
/>
+			<html:hidden property="id" /></input>
+			<html:hidden property="method" value="edit"/></input>
+		</html:form>
+	</td>
+</tr>
+</table>
+
+
+

Modified: incubator/roller/branches/roller_2.0/web/website/YourWebsites.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/website/YourWebsites.jsp?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/website/YourWebsites.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/website/YourWebsites.jsp Thu Sep  1 18:47:52
2005
@@ -140,17 +140,13 @@
                                <fmt:message key="yourWebsites.manage" /></a>

                            <br />
                            
-                           <c:choose>
-                               <c:when test="${perms.website.adminUserCount == 1 &&
perms.permissionMask == 3}">
-                                   <%-- <fmt:message key="yourWebsites.notAllowed"
/> --%>
-                               </c:when>
-                               <c:otherwise>
-                                  <img src='<c:url value="/images/Remove16.gif"/>'
/>
-                                  <a href='javascript:resignWebsite("<c:out value='${perms.website.id}'/>","<c:out
value="${perms.website.handle}" />")'>
-                                      <fmt:message key='yourWebsites.resign' />
-                                  </a>
-                               </c:otherwise>
-                           </c:choose>
+                           <c:if test="${perms.website.adminUserCount > 1 &&
perms.permissionMask == 3}">
+                              <img src='<c:url value="/images/Remove16.gif"/>' />
+                              <a href='javascript:resignWebsite("<c:out value='${perms.website.id}'/>","<c:out
value="${perms.website.handle}" />")'>
+                                  <fmt:message key='yourWebsites.resign' />
+                              </a>
+                           </c:if>
+                           
                        </div>
 
                    </td>

Modified: incubator/roller/branches/roller_2.0/web/website/edit-website.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/website/edit-website.jsp?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/website/edit-website.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/website/edit-website.jsp Thu Sep  1 18:47:52
2005
@@ -1,7 +1,5 @@
 <%@ include file="/taglibs.jsp" %>
 
-<roller:StatusMessage/>
-
 <p class="subtitle">
    <fmt:message key="websiteSettings.subtitle" >
        <fmt:param value="${model.website.handle}" />
@@ -165,6 +163,20 @@
     <input type="submit" value='<fmt:message key="websiteSettings.button.update" />'
/>
 </div>
         
+<c:if test="${model.website.adminUserCount == 1}">
+    <br />
+    <br />
+    <h2><fmt:message key="websiteSettings.removeWebsiteHeading" /></h2>
+    <p class="subtitle">
+        <fmt:message key="websiteSettings.removeWebsite" />
+    </p>
+    <input type="button" value='<fmt:message key="websiteSettings.button.remove" />'
 
+        onclick='document.websiteFormEx.method.value="removeOk"; document.websiteFormEx.submit()'
/>
+    <br />
+    <br />
+</c:if>
+        
+<br />
 </html:form>
 
 

Modified: incubator/roller/branches/roller_2.0/web/website/remove-page.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/website/remove-page.jsp?rev=265814&r1=265813&r2=265814&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/website/remove-page.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/website/remove-page.jsp Thu Sep  1 18:47:52 2005
@@ -1,31 +1,36 @@
 <%@ include file="/taglibs.jsp" %>
 
 
-<h3>
-<jsp:useBean id="weblogTemplateForm" scope="session" 
-	class="org.roller.presentation.forms.WeblogTemplateForm"/>
-Remove Page [<jsp:getProperty name="weblogTemplateForm" property="name"/>]
-</h3>
+<p class="subtitle">
+<fmt:message key="pageRemove.subtitle" />
+</p>
+
+<p>
+<fmt:message key="pageRemove.youSure"> 
+    <fmt:param value="${page.name}" />
+</fmt:message>
+
+</p>
 
-<p>Are you sure you want to remove this page?</p>
 <p>
-Page name = [<jsp:getProperty name="weblogTemplateForm" property="name"/>]<br />
-Page id = [<jsp:getProperty name="weblogTemplateForm" property="id"/>]
+<fmt:message key="pageRemove.pageId" /> = [<c:out value="${page.id}" />]
+<br />
+<fmt:message key="pageRemove.pageName" /> = [<c:out value="${page.name}" />]
 </p>
 
 <table>
 <tr>
 	<td>
 		<html:form action="/editor/page" method="post">
-			<html:submit value="Yes"/></input>
+			<input type="submit" value='<fmt:message key="application.yes" />' ></input>
 			<html:hidden property="method" value="remove"/></input>
 			<html:hidden property="id" /></input>
 		</html:form>
 	</td>
 	<td>
 		<html:form action="/editor/page" method="post">
-			<html:hidden name="user" property="userName" /></input>
-			<html:submit value="No"/></input>
+			<input type="submit" value='<fmt:message key="application.no" />' ></input>
+			<html:hidden property="id" /></input>
 			<html:hidden property="method" value="cancel"/></input>
 		</html:form>
 	</td>



Mime
View raw message