roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r232922 - in /incubator/roller/branches/roller_2.0: src/org/roller/presentation/ src/org/roller/presentation/website/actions/ web/ web/WEB-INF/ web/WEB-INF/classes/ web/theme/ web/website/
Date Tue, 16 Aug 2005 01:50:08 GMT
Author: snoopdave
Date: Mon Aug 15 18:49:45 2005
New Revision: 232922

URL: http://svn.apache.org/viewcvs?rev=232922&view=rev
Log:
More tweaks to 2.0 pages, look and feel

Removed:
    incubator/roller/branches/roller_2.0/web/website/CreateWebsiteDone.jsp
Modified:
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CreateWebsiteAction.java
    incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/YourWebsitesAction.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/errorBody.jsp
    incubator/roller/branches/roller_2.0/web/theme/tiles-mainmenupage.jsp
    incubator/roller/branches/roller_2.0/web/website/CreateWebsite.jsp
    incubator/roller/branches/roller_2.0/web/website/YourWebsites.jsp
    incubator/roller/branches/roller_2.0/web/website/YourWebsitesSidebar.jsp

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java?rev=232922&r1=232921&r2=232922&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java (original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/BasePageModel.java Mon
Aug 15 18:49:45 2005
@@ -102,4 +102,5 @@
     {
         return StrutsUtil.getTimeZoneBeans();
     }
+
 }

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CreateWebsiteAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CreateWebsiteAction.java?rev=232922&r1=232921&r2=232922&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CreateWebsiteAction.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/CreateWebsiteAction.java
Mon Aug 15 18:49:45 2005
@@ -1,11 +1,8 @@
 package org.roller.presentation.website.actions;
-
-import java.io.IOException;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Locale;
 import java.util.TimeZone;
-import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -16,6 +13,7 @@
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
 import org.apache.struts.action.ActionMessages;
 import org.apache.struts.actions.DispatchAction;
 import org.roller.RollerException;
@@ -104,13 +102,12 @@
         }
         else try
         {
-            // Add new user
             RollerContext rollerContext = RollerContext.getRollerContext(request);
             UserData user = 
                 RollerSession.getRollerSession(request).getAuthenticatedUser();
             UserManager mgr = RollerFactory.getRoller().getUserManager(); 
             
-            // Need system user to add new user
+            // Need system user to create website
             RollerFactory.getRoller().setUser(UserData.SYSTEM_USER);
             HashMap pages = null; //rollerContext.readThemeMacros(form.getTheme());
             WebsiteData website = mgr.createWebsite(
@@ -123,28 +120,22 @@
                form.getLocale(), 
                form.getTimeZone());
             RollerFactory.getRoller().commit();
-
-            // Flush cache so user will immediately appear on index page
-            //PageCacheFilter.removeFromCache( request, ud );
-            //MainPageAction.flushMainPageCache();
             
             request.setAttribute("model", 
-                    new CreateWebsitePageModel(request, response, mapping, website));   
            
+               new CreateWebsitePageModel(request, response, mapping, website));  
+            
+            msgs.add(ActionMessages.GLOBAL_MESSAGE, 
+               new ActionMessage("createWebsite.created", form.getHandle()));
+            saveMessages(request, msgs);     
         }
         catch (RollerException e)
         {
-            errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(e.getMessage()));
-            saveErrors(request,errors);          
+            errors.add(ActionErrors.GLOBAL_ERROR, 
+                new ActionError(e.getMessage()));
+            saveErrors(request, errors);          
             mLogger.error("ERROR in createWebsite", e);
         }
-        if (errors.size() == 0) 
-        {
-            return mapping.findForward("createWebsiteDone.page");
-        }
-        else
-        {
-            return mapping.findForward("createWebsite.page");
-        }
+        return mapping.findForward("yourWebsites");
     }
         
     private ActionMessages validate(CreateWebsiteForm form, ActionErrors errors)

Modified: incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/YourWebsitesAction.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/YourWebsitesAction.java?rev=232922&r1=232921&r2=232922&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/YourWebsitesAction.java
(original)
+++ incubator/roller/branches/roller_2.0/src/org/roller/presentation/website/actions/YourWebsitesAction.java
Mon Aug 15 18:49:45 2005
@@ -210,7 +210,8 @@
     
     public static class YourWebsitesPageModel extends BasePageModel
     {
-        private boolean groupBloggingEnabled = true;
+        private boolean planetAggregatorEnabled = false;
+        private boolean groupBloggingEnabled = false;
         private List permissions = new ArrayList();
         private List pendings = new ArrayList();
         public YourWebsitesPageModel(HttpServletRequest request,
@@ -223,7 +224,9 @@
             permissions = roller.getUserManager().getAllPermissions(user);
             pendings = roller.getUserManager().getPendingPermissions(user); 
             groupBloggingEnabled = 
-                    RollerConfig.getBooleanProperty("groupblogging.enabled");
+                RollerConfig.getBooleanProperty("groupblogging.enabled");
+            planetAggregatorEnabled = 
+                RollerConfig.getBooleanProperty("planet.aggregator.enabled");
         }
         public List getPermissions()
         {

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=232922&r1=232921&r2=232922&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
Mon Aug 15 18:49:45 2005
@@ -242,13 +242,7 @@
 createWebsite.button.save=Create Weblog
 createWebsite.button.cancel=Cancel
 
-createWebsiteDone.title=Weblog Created
-createWebsiteDone.message=The following new weblog has been created:
-createWebsiteDone.name=Name
-createWebsiteDone.description=Description
-createWebsiteDone.handle=Handle
-createWebsiteDone.weblogURL=Weblog URL
-createWebsiteDone.rssURL=Newsfeed URL
+createWebsite.created=New website [<b>{0}</b>] has been successfully created.
 
 createWeblog.error.missingHandle=You must enter a valid handle
 createWeblog.error.invalidHandle=The handle you specified is not valid
@@ -1310,9 +1304,14 @@
 
 # ---------------------------------------------------------------- Your Weblogs
 
-yourWebsites.title=Roller Main Menu: Manage Weblogs
+yourWebsites.title=Manage Weblogs
 yourWebsites.shortCuts=Shortcuts
 yourWebsites.actions=Actions
+
+yourWebsites.title.welcomeNoBlog=Welcome to Roller
+yourWebsites.subtitle.welcomeNoBlog=You've got a user account, but no weblog.
+yourWebsites.prompt.welcomeNoBlog=Would you like to
+yourWebsites.createOne=create a weblog
 
 yourWebsites.prompt=Your existing weblogs. You may \
 add entries, manage templates, set configurations, etc.

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=232922&r1=232921&r2=232922&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 Mon Aug 15 18:49:45 2005
@@ -18,6 +18,7 @@
    <put name="sidebar" value="/theme/tiles-sidebar.jsp" />
    <put name="footer"  value="/theme/tiles-footer.jsp" />
    <put name="head"    value="/theme/tiles-head.jsp" />
+   <put name="messages"        value="/theme/messages.jsp" />
 </definition>
 
 <definition name=".tiles-editorpage" path="/theme/tiles-editorpage.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=232922&r1=232921&r2=232922&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/errorBody.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/errorBody.jsp Mon Aug 15 18:49:45 2005
@@ -22,7 +22,7 @@
 
 exception = (Throwable)request.getAttribute("javax.servlet.error.exception");
 %>
-<br />
+
 <h2 class="error"><fmt:message key="errorPage.title" /></h2>
 <p><fmt:message key="errorPage.message" /></p>
 <p><%= message %></p>

Modified: incubator/roller/branches/roller_2.0/web/theme/tiles-mainmenupage.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/theme/tiles-mainmenupage.jsp?rev=232922&r1=232921&r2=232922&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/theme/tiles-mainmenupage.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/theme/tiles-mainmenupage.jsp Mon Aug 15 18:49:45
2005
@@ -28,6 +28,7 @@
     </div>
     
     <div id="centercontent">   
+        <tiles:insert attribute="messages" /> 
         <tiles:insert attribute="content" />    
         <div id="footer">
             <tiles:insert attribute="footer" />

Modified: incubator/roller/branches/roller_2.0/web/website/CreateWebsite.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/website/CreateWebsite.jsp?rev=232922&r1=232921&r2=232922&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/website/CreateWebsite.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/website/CreateWebsite.jsp Mon Aug 15 18:49:45
2005
@@ -17,7 +17,7 @@
 
 <br /> 
 <html:form action="/editor/createWebsite" method="post" focus="handle">
-<input type="hidden" name="method" ></input> 
+<input type="hidden" name="method" value="save"></input> 
 
 <table class="formtable">
 
@@ -41,7 +41,7 @@
 
 <tr>
     <td class="label"><label for="emailAddress" /><fmt:message key="createWebsite.emailAddress"
/></label></td>
-    <td class="field"><html:text property="emailAddress" size="30" maxlength="30"
/></td>
+    <td class="field"><html:text property="emailAddress" size="40" maxlength="50"
/></td>
     <td class="description"><fmt:message key="createWebsite.tip.email" /></td>
 </tr>
 

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=232922&r1=232921&r2=232922&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/website/YourWebsites.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/website/YourWebsites.jsp Mon Aug 15 18:49:45
2005
@@ -41,23 +41,26 @@
 -->
 </script>
 
-<%-- Choose appropriate prompt at start of page --%>
-<c:choose>
-    <c:when test="${empty model.permissions && !model.groupBloggingEnabled}">
-       <p><fmt:message key="yourWebsites.noBlogs" />
-       <roller:link page="/editor/createWebsite.do">
-          <fmt:message key="yourWebsites.createAWeblog" />
-       </roller:link></p>
-    </c:when>
-</c:choose>
-
 <html:form action="/editor/yourWebsites" method="post">
     <input type="hidden" name="inviteId" value="" />
     <input type="hidden" name="websiteId" value="" />
     <input type="hidden" name="method" value="select" />		  
 
-    <c:if test="${!empty model.pendings}">
+<%-- Choose appropriate prompt at start of page --%>
+<c:choose>
+
+    <c:when test="${empty model.permissions && empty model.pendings}">
+        <h1><fmt:message key="yourWebsites.title.welcomeNoBlog" /></h1>
   
+        <p class="subtitle"><fmt:message key="yourWebsites.subtitle.welcomeNoBlog"
/></p>        
+        <p>
+        <fmt:message key="yourWebsites.prompt.welcomeNoBlog" />
+        <roller:link page="/editor/createWebsite.do">
+           <fmt:message key="yourWebsites.createOne" />
+        </roller:link>?
+        </p>
+    </c:when>
     
+    <c:when test="${!empty model.pendings}">    
         <h1><fmt:message key="yourWebsites.invitations" /></h1>    
         <p class="subtitle"><fmt:message key="yourWebsites.invitationsPrompt" /></p>
         
@@ -74,94 +77,92 @@
             </a><br />
         </c:forEach>
         <br />
-    </c:if>
-
-    <c:choose>
+    </c:when>
     
-        <c:when test="${!empty model.permissions}">
-        
-            <h1><fmt:message key="yourWebsites.title" /></h1>    
-            <p class="subtitle"><fmt:message key="yourWebsites.prompt" /></p>
+</c:choose>
             
-            <div class="entryTitleBox" >
-                <fmt:message key="yourWebsites.existingWebsites" />
+<c:if test="${!empty model.permissions}">
+
+    <h1><fmt:message key="yourWebsites.title" /></h1>    
+    <p class="subtitle"><fmt:message key="yourWebsites.prompt" /></p>
+
+    <div class="entryTitleBox" >
+        <fmt:message key="yourWebsites.existingWebsites" />
+    </div>
+
+        <c:forEach var="perms" items="${model.permissions}">
+
+            <div class="entryBox">  
+
+                   <table width="100%">
+                   <tr>
+                   <td width="80%" style="padding: 0px 10px 0px 10px">
+
+                       <h3 style="border-bottom: 1px #e5e5e5 solid; margin:0px; padding:5px">
+                           <img src='<c:url value="/images/Folder16.png"/>' />
+                           <c:out value="${perms.website.name}" />
+                           [<c:out value="${perms.website.handle}" />] 
+                       </h3>
+
+                       <div class="formrow">
+                           <label class="formrow"><fmt:message key='yourWebsites.weblog'
/> URL</b></label>
+                           <a href='<c:out value="${model.baseURL}" />/page/<c:out
value="${perms.website.handle}" />'>
+                               <c:out value="${model.baseURL}" />/page/<c:out value="${perms.website.handle}"
/>
+                           </a>                           
+                       </div>
+
+                       <div class="formrow">
+                           <label class="formrow"><fmt:message key='yourWebsites.permission'
/></label>
+                           <c:if test="${perms.permissionMask == 0}" >LIMITED</c:if>
+                           <c:if test="${perms.permissionMask == 1}" >AUTHOR</c:if>
+                           <c:if test="${perms.permissionMask == 3}" >ADMIN</c:if>
+                       </div>
+
+                       <div class="formrow">
+                           <label class="formrow"><fmt:message key='yourWebsites.description'
/></label>    
+                           <c:out value="${perms.website.description}" />
+                       </div>
+
+                   </td>
+
+                   <td width="20%" align="left">
+
+                           <fmt:message key='yourWebsites.actions' />             
         
+                           <br />
+                           <img src='<c:url value="/images/New16.gif"/>' />
+                           <a href='javascript:selectWebsiteAction("<c:out value='${perms.website.id}'/>",
"newEntry")'>
+                               <fmt:message key="yourWebsites.newEntry" /></a>
+                           <br />
+                           <img src='<c:url value="/images/Edit16.png"/>' />
+                           <a href='javascript:selectWebsiteAction("<c:out value='${perms.website.id}'/>",
"editEntries")'>
+                               <fmt:message key="yourWebsites.editEntries" /></a>

+                           <br />
+                           <img src='<c:url value="/images/Edit16.png"/>' />
+                           <a href='javascript:selectWebsiteAction("<c:out value='${perms.website.id}'/>",
"manageWeblog")'>
+                               <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>
+                                  <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>
+                       </div>
+
+                   </td>
+                   </tr>
+
+               </table>
+
             </div>
-    
-                <c:forEach var="perms" items="${model.permissions}">
-                
-                    <div class="entryBox">  
-                       
-                           <table width="100%">
-                           <tr>
-                           <td width="80%" style="padding: 0px 10px 0px 10px">
-                      
-                               <h3 style="border-bottom: 1px #e5e5e5 solid; margin:0px;
padding:5px">
-                                   <img src='<c:url value="/images/Folder16.png"/>'
/>
-                                   <c:out value="${perms.website.name}" />
-                                   [<c:out value="${perms.website.handle}" />] 
-                               </h3>
-
-                               <div class="formrow">
-                                   <label class="formrow"><fmt:message key='yourWebsites.weblog'
/> URL</b></label>
-                                   <a href='<c:out value="${model.baseURL}" />/page/<c:out
value="${perms.website.handle}" />'>
-                                       <c:out value="${model.baseURL}" />/page/<c:out
value="${perms.website.handle}" />
-                                   </a>                           
-                               </div>
-
-                               <div class="formrow">
-                                   <label class="formrow"><fmt:message key='yourWebsites.permission'
/></label>
-                                   <c:if test="${perms.permissionMask == 0}" >LIMITED</c:if>
-                                   <c:if test="${perms.permissionMask == 1}" >AUTHOR</c:if>
-                                   <c:if test="${perms.permissionMask == 3}" >ADMIN</c:if>
-                               </div>
-
-                               <div class="formrow">
-                                   <label class="formrow"><fmt:message key='yourWebsites.description'
/></label>    
-                                   <c:out value="${perms.website.description}" />
-                               </div>
-                               
-                           </td>
-                           
-                           <td width="20%" align="left">
-
-                                   <fmt:message key='yourWebsites.actions' />     
                 
-                                   <br />
-                                   <img src='<c:url value="/images/New16.gif"/>'
/>
-                                   <a href='javascript:selectWebsiteAction("<c:out
value='${perms.website.id}'/>", "newEntry")'>
-                                       <fmt:message key="yourWebsites.newEntry" /></a>
-                                   <br />
-                                   <img src='<c:url value="/images/Edit16.png"/>'
/>
-                                   <a href='javascript:selectWebsiteAction("<c:out
value='${perms.website.id}'/>", "editEntries")'>
-                                       <fmt:message key="yourWebsites.editEntries" /></a>

-                                   <br />
-                                   <img src='<c:url value="/images/Edit16.png"/>'
/>
-                                   <a href='javascript:selectWebsiteAction("<c:out
value='${perms.website.id}'/>", "manageWeblog")'>
-                                       <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>
-                                          <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>
-                               </div>
-
-                           </td>
-                           </tr>
-                           
-                       </table>
-                    
-                    </div>
-                    
-                </c:forEach>
-                    
-        </c:when>
-                  
-    </c:choose>
+
+        </c:forEach>
+
+</c:if>
 
 </html:form>
 

Modified: incubator/roller/branches/roller_2.0/web/website/YourWebsitesSidebar.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/website/YourWebsitesSidebar.jsp?rev=232922&r1=232921&r2=232922&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/website/YourWebsitesSidebar.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/website/YourWebsitesSidebar.jsp Mon Aug 15 18:49:45
2005
@@ -8,7 +8,7 @@
              <h3><fmt:message key="yourWebsites.shortCuts" /></h3>
              <hr />
           
-            <c:if test="${model.groupBloggingEnabled}">               
+            <c:if test="${!empty model.permissions && model.groupBloggingEnabled}">
              
                 <p>
                     <h3>
                     <roller:link forward="createWebsite">
@@ -28,23 +28,27 @@
                 <fmt:message key="yourWebsites.editProfile.desc" />
             </p>
             
-            <p>
-                <h3>
-                <roller:link forward="rollerConfig">
-                   <fmt:message key="yourWebsites.globalAdmin" />
-                </roller:link> 
-                </h3>          
-                <fmt:message key="yourWebsites.globalAdmin.desc" />
-            </p>
-            
-            <p>
-                <h3>
-                <roller:link forward="planetConfig">
-                   <fmt:message key="yourWebsites.planetAdmin" />
-                </roller:link>            
-                </h3>
-                <fmt:message key="yourWebsites.planetAdmin.desc" />
-            </p>
+            <c:if test="${model.rollerSession.adminUser}">               
+                <p>
+                    <h3>
+                    <roller:link forward="rollerConfig">
+                       <fmt:message key="yourWebsites.globalAdmin" />
+                    </roller:link> 
+                    </h3>          
+                    <fmt:message key="yourWebsites.globalAdmin.desc" />
+                </p>
+
+                <c:if test="${model.planetAggregatorEnabled}">               
+                    <p>
+                        <h3>
+                        <roller:link forward="planetConfig">
+                           <fmt:message key="yourWebsites.planetAdmin" />
+                        </roller:link>            
+                        </h3>
+                        <fmt:message key="yourWebsites.planetAdmin.desc" />
+                    </p>
+                </c:if>
+            </c:if>
             
 			<br />
 			



Mime
View raw message