roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r226733 [2/2] - in /incubator/roller/branches/roller_2.0: metadata/database/ src/org/roller/business/hibernate/ src/org/roller/business/search/operations/ src/org/roller/model/ src/org/roller/pojos/ src/org/roller/presentation/ src/org/roll...
Date Mon, 01 Aug 2005 04:12:36 GMT
Modified: incubator/roller/branches/roller_2.0/tests/org/roller/RollerTestBase.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/tests/org/roller/RollerTestBase.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/tests/org/roller/RollerTestBase.java (original)
+++ incubator/roller/branches/roller_2.0/tests/org/roller/RollerTestBase.java Sun Jul 31 21:12:12
2005
@@ -221,7 +221,7 @@
                  null,      // anchor
                  day,        // pubTime
                  day,        // updateTime
-                 Boolean.TRUE ); // publishEntry
+                 WeblogEntryData.PUBLISHED ); // publishEntry
             wd.save();
             
             // roll calendar back to today
@@ -235,6 +235,8 @@
             day.setNanos(0); // kludge
 
             boolean published = k%2==0 ? true : false;
+            String status = published 
+                ? WeblogEntryData.PUBLISHED : WeblogEntryData.DRAFT;
 
             wd = new WeblogEntryData(
                     null,      // id
@@ -247,7 +249,7 @@
                     null,      // anchor
                     day,        // pubTime
                     day,        // updateTime
-                    new Boolean(published) ); // publishEntry
+                    status ); // publishEntry
             wd.save();
 
             // add at beginning of list

Modified: incubator/roller/branches/roller_2.0/tests/org/roller/business/PermissionsTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/tests/org/roller/business/PermissionsTest.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/tests/org/roller/business/PermissionsTest.java (original)
+++ incubator/roller/branches/roller_2.0/tests/org/roller/business/PermissionsTest.java Sun
Jul 31 21:12:12 2005
@@ -68,7 +68,7 @@
                 null,       // start
                 new Date(), // end
                 null,       // cat
-                WeblogManager.ALL,
+                null,
                 new Integer(1));
         WeblogEntryData entry = (WeblogEntryData)entries.get(0);
         assertNotNull(entry);

Modified: incubator/roller/branches/roller_2.0/tests/org/roller/business/WeblogManagerTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/tests/org/roller/business/WeblogManagerTest.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/tests/org/roller/business/WeblogManagerTest.java
(original)
+++ incubator/roller/branches/roller_2.0/tests/org/roller/business/WeblogManagerTest.java
Sun Jul 31 21:12:12 2005
@@ -97,7 +97,7 @@
         
         WeblogEntryData e1 = new WeblogEntryData(
             null, c1, wd, ud, "title1", null, "text", "anchor", 
-            new Timestamp(0), new Timestamp(0), Boolean.FALSE);
+            new Timestamp(0), new Timestamp(0), WeblogEntryData.DRAFT);
         e1.save();
         
         WeblogCategoryData c2 = wmgr.createWeblogCategory(); 
@@ -108,7 +108,7 @@
       
         WeblogEntryData e2 = new WeblogEntryData(
             null, c2, wd, ud, "title2", null, "text", "anchor", 
-            new Timestamp(0), new Timestamp(0), Boolean.FALSE);
+            new Timestamp(0), new Timestamp(0), WeblogEntryData.DRAFT);
         e2.save();
         
         WeblogCategoryData c3 = wmgr.createWeblogCategory(); 
@@ -119,7 +119,7 @@
         
         WeblogEntryData e3 = new WeblogEntryData(
             null, c3, wd, ud, "title3", null, "text", "anchor", 
-            new Timestamp(0), new Timestamp(0), Boolean.FALSE);
+            new Timestamp(0), new Timestamp(0), WeblogEntryData.DRAFT);
         e3.save();
         
         getRoller().commit(); 
@@ -186,22 +186,22 @@
         // Create four entries in 1st category
         WeblogEntryData e1 = new WeblogEntryData(
                 null, t1, wd, ud, "title1", null, "text1", "anchor", 
-                new Timestamp(0), new Timestamp(0), Boolean.FALSE);
+                new Timestamp(0), new Timestamp(0), WeblogEntryData.DRAFT);
         e1.save();
         
         WeblogEntryData e2 = new WeblogEntryData(
                 null, t1, wd, ud, "title2", null, "text2", "anchor", 
-                new Timestamp(0), new Timestamp(0), Boolean.FALSE);
+                new Timestamp(0), new Timestamp(0), WeblogEntryData.DRAFT);
         e2.save();
         
         WeblogEntryData e3 = new WeblogEntryData(
                 null, t1, wd, ud, "title3", null, "text3", "anchor", 
-                new Timestamp(0), new Timestamp(0), Boolean.FALSE);
+                new Timestamp(0), new Timestamp(0), WeblogEntryData.DRAFT);
         e3.save();
         
         WeblogEntryData e4 = new WeblogEntryData(
                 null, t1, wd, ud, "title4", null, "text4", "anchor", 
-                new Timestamp(0), new Timestamp(0), Boolean.FALSE);
+                new Timestamp(0), new Timestamp(0), WeblogEntryData.DRAFT);
         e4.save();
         
         getRoller().commit(); 
@@ -216,7 +216,7 @@
                         null,                       // startDate
                         new Date(),                 // endDate
                         "toplevel1",                 // catName
-                        WeblogManager.ALL,           // status
+                        null,           // status
                         new Integer(15));           // maxEntries
 
         assertEquals(4, entries.size());
@@ -345,14 +345,14 @@
         //System.out.println("# entries:" + lastEntryIndex);
         WeblogEntryData entry1 = null;
         //WeblogEntryData entry1 = (WeblogEntryData)mEntriesCreated.get(lastEntryIndex);
-        if (entry1 == null || !entry1.getPublishEntry().booleanValue()) // if not published,
find one
+        if (entry1 == null || !entry1.isPublished()) // if not published, find one
         {
             for (int i=lastEntryIndex; i >= 0; i--)
             {
                 entry1 = (WeblogEntryData)        
                     mEntriesCreated.get(i); // last entry is newest
                 //System.out.println("entry " + i + "published:" + entry1.getPublishEntry());
-                if (entry1.getPublishEntry().booleanValue()) {
+                if (entry1.isPublished()) {
                     break;
                 }
             }
@@ -386,7 +386,7 @@
             temp = (WeblogEntryData)        
                 mEntriesCreated.get(i); // last entry is newest
             //System.out.println("entry " + i + "published:" + entry1.getPublishEntry());
-            if (temp.getPublishEntry().booleanValue()) 
+            if (temp.isPublished()) 
             {
                 if (entry1 ==  null || entry1.getPubTime().compareTo(temp.getPubTime()) <
0)
                 {   
@@ -655,7 +655,7 @@
                         null,                    // startDate
                         new Date(),              // endDate
                         null,                    // catName
-                        WeblogManager.PUB_ONLY,  // status
+                        WeblogEntryData.PUBLISHED,  // status
                         null);                   // maxEntries
         assertEquals(mExpectedPublishedEntryCount, publishedEntries.size());
                     
@@ -665,7 +665,7 @@
                         null,                    // startDate
                         new Date(),              // endDate
                         null,                    // catName
-                        WeblogManager.DRAFT_ONLY,  // status
+                        WeblogEntryData.DRAFT,  // status
                         null);                   // maxEntries
         assertEquals(mExpectedEntryCount-mExpectedPublishedEntryCount, draftEntries.size());
                           
@@ -675,7 +675,7 @@
                         null,                    // startDate
                         new Date(),              // endDate
                         null,                    // catName
-                        WeblogManager.ALL,       // status
+                        null,       // status
                         null);                   // maxEntries
         assertEquals(mExpectedEntryCount, allEntries.size());
 
@@ -741,7 +741,7 @@
 
         WeblogEntryData entry = new WeblogEntryData(
                 null, cat, website, user, "title2", null, "text2", "attributetest", 
-                new Timestamp(0), new Timestamp(0), Boolean.FALSE);
+                new Timestamp(0), new Timestamp(0), WeblogEntryData.DRAFT);
         entry.save();
         assertNotNull(entry.getId());
                 
@@ -778,7 +778,7 @@
                 null,       // start
                 new Date(), // end
                 null,       // cat
-                WeblogManager.ALL,
+                null,
                 new Integer(1));
         WeblogEntryData entry = (WeblogEntryData)entries.get(0);
         assertNotNull(entry);

Modified: incubator/roller/branches/roller_2.0/tests/org/roller/presentation/atomapi/AtomServletTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/tests/org/roller/presentation/atomapi/AtomServletTest.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/tests/org/roller/presentation/atomapi/AtomServletTest.java
(original)
+++ incubator/roller/branches/roller_2.0/tests/org/roller/presentation/atomapi/AtomServletTest.java
Sun Jul 31 21:12:12 2005
@@ -186,7 +186,7 @@
             getRoller().getUserManager().getWebsites(user, null).get(0);
         WeblogEntryData entry = (WeblogEntryData) 
             getRoller().getWeblogManager().getWeblogEntries(
-                website, null, null, null, WeblogManager.ALL, new Integer(1)).get(0);
+                website, null, null, null, null, new Integer(1)).get(0);
 
         Entry fetchedEntry = getEntry(user, entry.getId());
         assertEquals(entry.getId(), fetchedEntry.getId());
@@ -249,7 +249,7 @@
         
         WeblogEntryData entry = (WeblogEntryData) 
             getRoller().getWeblogManager().getWeblogEntries(
-                website, null, null, null, WeblogManager.ALL, new Integer(1)).get(0);
+                website, null, null, null, null, new Integer(1)).get(0);
         
         // Fetch that entry using Atom
         Entry fetchedEntry = getEntry(user, entry.getId());
@@ -289,7 +289,7 @@
 
         WeblogEntryData entry = (WeblogEntryData) 
             getRoller().getWeblogManager().getWeblogEntries(
-                website, null, null, null, WeblogManager.ALL, new Integer(1)).get(0);
+                website, null, null, null, null, new Integer(1)).get(0);
 
         Entry fetchedEntry = getEntry(user, entry.getId());
         assertEquals(entry.getId(), fetchedEntry.getId());

Modified: incubator/roller/branches/roller_2.0/tests/org/roller/presentation/velocity/ExportRssTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/tests/org/roller/presentation/velocity/ExportRssTest.java?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/tests/org/roller/presentation/velocity/ExportRssTest.java
(original)
+++ incubator/roller/branches/roller_2.0/tests/org/roller/presentation/velocity/ExportRssTest.java
Sun Jul 31 21:12:12 2005
@@ -45,7 +45,7 @@
                         null,               // startDate
                         new Date(),         // endDate
                         null,               // catName
-                        WeblogManager.ALL,  // status
+                        null,  // status
                         new Integer(5));   // maxEntries
         
         try

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=226733&r1=226732&r2=226733&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
Sun Jul 31 21:12:12 2005
@@ -849,6 +849,9 @@
 weblogEdit.link=Link
 weblogEdit.minutes=Minutes
 weblogEdit.noUpdateTime=Not updated
+weblogEdit.pageTitle=Edit Weblog
+weblogEdit.pendingEntries=Pending Entries
+weblogEdit.pending=Pending
 weblogEdit.publishedEntries=Recent Entries
 weblogEdit.previewMode=Preview
 weblogEdit.post=Post to Weblog
@@ -862,7 +865,8 @@
 weblogEdit.seconds=Seconds
 weblogEdit.status=Status
 weblogEdit.spellMode=Spellcheck
-weblogEdit.pageTitle=Edit Weblog
+weblogEdit.submitForReview=Submit for Review
+weblogEdit.submitedForReview=Entry submitted for review
 weblogEdit.title=Title
 weblogEdit.unsaved=Not saved
 weblogEdit.updateTime=Last updated 
@@ -1040,7 +1044,7 @@
 
 yourWebsites.invitations=Website Invitations
 yourWebsites.invitationsPrompt=You have one or more invitations to accept or decline:
-yourWebsites.youAreInvited=You're invited to join website [{0}] - 
+yourWebsites.youAreInvited=You are invited to join website [{0}] - 
 
 
 yourWebsites.selected=You are now working in website [{0}]

Modified: incubator/roller/branches/roller_2.0/web/WEB-INF/classes/navbar.vm
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/WEB-INF/classes/navbar.vm?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/WEB-INF/classes/navbar.vm (original)
+++ incubator/roller/branches/roller_2.0/web/WEB-INF/classes/navbar.vm Sun Jul 31 21:12:12
2005
@@ -85,7 +85,7 @@
     #end
 
     ## strutsUrlHelper( useIds, isAction, path, val1, val2)
-    #if( $model.isUserAuthorizedToEdit() )
+    #if( $model.isUserAuthorizedToAuthor() )
         #set( $editUrl = $pageHelper.strutsUrlHelper(false, true, "weblogCreate", "tabbedmenu.weblog",
"tabbedmenu.weblog.newEntry") )
         #printNavLink( $editUrl $text.get("navigationBar.newEntry") $useCSS $vertical $delimiter
)
 

Modified: incubator/roller/branches/roller_2.0/web/WEB-INF/classes/weblog.vm
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/WEB-INF/classes/weblog.vm?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/WEB-INF/classes/weblog.vm (original)
+++ incubator/roller/branches/roller_2.0/web/WEB-INF/classes/weblog.vm Sun Jul 31 21:12:12
2005
@@ -151,7 +151,7 @@
     <a href="$baseURL$entry.permaLink"
         title="$text.get( "macro.weblog.entrypermalink.title" )"
         class="entrypermalink">Permalink</a>
-    #if ($pageHelper.isUserAuthorizedToEdit())
+    #if ($pageHelper.isUserAuthorizedToAuthor())
         [<a href="$pageHelper.getEntryEditUrl($entry)">$text.get( "macro.weblog.entrypermalink.edit"
)</a>]
     #end
 #end
@@ -402,7 +402,7 @@
            #else
               $var.title
            #end
-           #if ($pageHelper.isUserAuthorizedToEdit())
+           #if ($pageHelper.isUserAuthorizedToAuthor())
               &nbsp;[<a href="$pageHelper.getEntryEditUrl($var)">$text.get( "macro.weblog.editentry"
)</a>]
            #end
            </li>

Modified: incubator/roller/branches/roller_2.0/web/WEB-INF/editor-menu.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/WEB-INF/editor-menu.xml?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/WEB-INF/editor-menu.xml (original)
+++ incubator/roller/branches/roller_2.0/web/WEB-INF/editor-menu.xml Sun Jul 31 21:12:12 2005
@@ -48,14 +48,20 @@
     </menu>
 
     <menu name="tabbedmenu.website">
-        <menu-item forward="editWebsite"       name="tabbedmenu.website.settings" />
-        <menu-item forward="editTheme"         name="tabbedmenu.website.themes" />
-        <menu-item forward="editPages"         name="tabbedmenu.website.pages" />
-        <menu-item forward="memberPermissions" name="tabbedmenu.website.members" />
+        <menu-item forward="editWebsite"       name="tabbedmenu.website.settings" 
+                                               perms="admin" />
+        <menu-item forward="editTheme"         name="tabbedmenu.website.themes" 
+                                               perms="admin" />
+        <menu-item forward="editPages"         name="tabbedmenu.website.pages" 
+                                               perms="admin" />
+        <menu-item forward="memberPermissions" name="tabbedmenu.website.members" 
+                                               perms="admin" />
         <menu-item forward="pingSetup"         name="tabbedmenu.weblog.pingSetup" 
-                                               disabledProperty="pings.disablePingUsage"
/>
+                                               disabledProperty="pings.disablePingUsage"

+                                               perms="admin" />
         <menu-item forward="customPingTargets" name="tabbedmenu.weblog.customPingTargets"

-                                               disabledProperty="pings.disallowCustomTargets"
/>
+                                               disabledProperty="pings.disallowCustomTargets"

+                                               perms="admin" />
     </menu>
 
     <menu name="tabbedmenu.admin" roles="admin" perms="any">

Modified: incubator/roller/branches/roller_2.0/web/themes/sotto/_day.vm
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/themes/sotto/_day.vm?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/themes/sotto/_day.vm (original)
+++ incubator/roller/branches/roller_2.0/web/themes/sotto/_day.vm Sun Jul 31 21:12:12 2005
@@ -35,7 +35,7 @@
                     <a href="$link" class="storyLink">
                         Comments [$commentCount]</a>
                 <span class="noDisplay">]</span> 
-            #if ($pageHelper.isUserAuthorizedToEdit())
+            #if ($pageHelper.isUserAuthorizedToAuthor())
                 &nbsp;&nbsp;[<a href="$pageHelper.getEntryEditUrl($entry)">Edit</a>]
             #end
         #end

Modified: incubator/roller/branches/roller_2.0/web/weblog/WeblogEdit.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/weblog/WeblogEdit.jsp?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/weblog/WeblogEdit.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/weblog/WeblogEdit.jsp Sun Jul 31 21:12:12 2005
@@ -41,12 +41,21 @@
     postWeblogEntry();
 }
 function saveDraft() {
-    document.weblogEntryFormEx.publishEntry.value = "false";
+    if (document.weblogEntryFormEx.status.value == "PUBLISHED" ) {
+        document.weblogEntryFormEx.status.value = "DRAFT";
+    } 
     document.weblogEntryFormEx.method.value = "save";
     postWeblogEntry();
 }
 function publish() {
-    document.weblogEntryFormEx.publishEntry.value = "true";
+    <c:choose>
+	    <c:when test="${model.rollerSession.userAuthorizedToAuthor}">
+	        document.weblogEntryFormEx.status.value = "PUBLISHED";
+	    </c:when>
+	    <c:otherwise>
+            document.weblogEntryFormEx.status.value = "PENDING";
+	    </c:otherwise>
+    </c:choose>
     document.weblogEntryFormEx.method.value = "save";
     postWeblogEntry();
 }
@@ -62,7 +71,7 @@
     <html:hidden property="creatorId"/>
     <html:hidden property="anchor"/>
     <html:hidden property="updateTime"/>
-    <html:hidden property="publishEntry"/>
+    <html:hidden property="status"/>
     <html:hidden name="method" property="method" value="save"/>
 
    <%-- ================================================================== --%>
@@ -107,7 +116,7 @@
            <fmt:message key="weblogEdit.status" />
         </label>
         <c:if test="${!empty weblogEntryFormEx.id}">
-            <c:if test="${weblogEntryFormEx.publishEntry}">
+            <c:if test="${weblogEntryFormEx.published}">
                 <span style="color:green; font-weight:bold">
                    <fmt:message key="weblogEdit.published" />
                    (<fmt:message key="weblogEdit.updateTime" />
@@ -115,7 +124,7 @@
                       dateStyle="short" timeStyle="short" />)
                 </span>
             </c:if>
-            <c:if test="${!weblogEntryFormEx.publishEntry}">
+            <c:if test="${weblogEntryFormEx.draft}">
                 <span style="color:orange; font-weight:bold">
                    <fmt:message key="weblogEdit.draft" />
                    (<fmt:message key="weblogEdit.updateTime" />
@@ -123,6 +132,14 @@
                       dateStyle="short" timeStyle="short" />)
                 </span>
             </c:if>
+            <c:if test="${weblogEntryFormEx.pending}">
+                <span style="color:orange; font-weight:bold">
+                   <fmt:message key="weblogEdit.pending" />
+                   (<fmt:message key="weblogEdit.updateTime" />
+                   <fmt:formatDate value="${weblogEntryFormEx.updateTime}" type="both"
+                      dateStyle="short" timeStyle="short" />)
+                </span>
+            </c:if>
         </c:if>
         <c:if test="${empty weblogEntryFormEx.id}">
            <span style="color:red; font-weight:bold"><fmt:message key="weblogEdit.unsaved"
/></span>
@@ -175,22 +192,42 @@
 
         <%-- save draft and post buttons: only in edit and preview mode --%>
         <c:if test="${model.editMode || model.previewMode}" >
-
-            <input type="button" name="post"
-                   value='<fmt:message key="weblogEdit.post" />'
-                   onclick="publish()" />
-
-            <input type="button" name="draft"
-                   value='<fmt:message key="weblogEdit.save" />'
-                   onclick="saveDraft()" />
-
-            <%-- if entry has been saved, then show delete button --%>
-            <c:if test="${!empty weblogEntryFormEx.id}">
-                <input type="button" name="draft"
-                       value='<fmt:message key="weblogEdit.deleteEntry" />'
-                       onclick="deleteWeblogEntry()" />
-            </c:if>
-
+        
+            <c:choose>
+            
+	            <c:when test="${model.rollerSession.userAuthorizedToAuthor}" >       

+                    <input type="button" name="post"
+	                       value='<fmt:message key="weblogEdit.post" />'
+	                       onclick="publish()" />
+	                <input type="button" name="draft"
+	                       value='<fmt:message key="weblogEdit.save" />'
+	                       onclick="saveDraft()" />                                     

+	                <c:if test="${!empty weblogEntryFormEx.id}">
+	                    <input type="button" name="draft"
+	                           value='<fmt:message key="weblogEdit.deleteEntry" />'
+	                           onclick="deleteWeblogEntry()" />
+	                </c:if>
+	            </c:when> 
+	            
+	            <c:when test="${model.rollerSession.userAuthorized}" > 
+                    <c:if test="${weblogEntryFormEx.status == 'DRAFT'}">       
+		                <input type="button" name="post"
+		                       value='<fmt:message key="weblogEdit.submitForReview" />'
+		                       onclick="publish()" />
+		                <input type="button" name="draft"
+		                       value='<fmt:message key="weblogEdit.save" />'
+		                       onclick="saveDraft()" />                  
+		                <%-- only show delete button for saved entries --%>
+		                <c:if test="${!empty weblogEntryFormEx.id}">
+		                    <input type="button" name="draft"
+		                           value='<fmt:message key="weblogEdit.deleteEntry" />'
+		                           onclick="deleteWeblogEntry()" />
+		                </c:if>   
+                    </c:if>            
+	            </c:when>
+                
+            </c:choose>
+             
         </c:if>
 
         <%-- edit mode buttons --%>
@@ -324,12 +361,12 @@
      <fmt:message key="weblogEdit.rightToLeft" />
      <br />
 
-     <c:if test="${model.isAdmin}">
+     <c:if test="${model.rollerSession.adminUser}">
          <html:checkbox property="pinnedToMain" />
          <fmt:message key="weblogEdit.pinnedToMain" />
          <br />
      </c:if>
-     <c:if test="${!model.isAdmin}">
+     <c:if test="${!model.rollerSession.adminUser}">
          <html:hidden property="pinnedToMain" />
      </c:if>
 
@@ -364,7 +401,7 @@
 
     <%-- ================================================================== --%>
     <%-- Trackback control --%>
-    <c:if test="${!empty weblogEntryFormEx.id}">
+    <c:if test="${!empty weblogEntryFormEx.id && model.rollerSession.userAuthorizedToAuthor}">
         <br />
         <br />
         <a name="trackbacks"></a>
@@ -381,7 +418,7 @@
     <%-- ================================================================== --%>
     <%-- Comments of this weblog entry --%>
 
-    <c:if test="${model.editMode && !empty model.comments}" >
+    <c:if test="${model.editMode && !empty model.comments && model.rollerSession.userAuthorizedToAuthor}"
>
         <br />
         <br />
         <a name="comments"></a>

Modified: incubator/roller/branches/roller_2.0/web/weblog/WeblogEditSidebar.jsp
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller_2.0/web/weblog/WeblogEditSidebar.jsp?rev=226733&r1=226732&r2=226733&view=diff
==============================================================================
--- incubator/roller/branches/roller_2.0/web/weblog/WeblogEditSidebar.jsp (original)
+++ incubator/roller/branches/roller_2.0/web/weblog/WeblogEditSidebar.jsp Sun Jul 31 21:12:12
2005
@@ -37,35 +37,69 @@
 
 <br />
 
-<table class="sidebarBox">
-    <tr>
-       <td class="sidebarBox">
-          <div class="menu-tr"><div class="menu-tl">
-             <fmt:message key="weblogEdit.publishedEntries" />
-          </div></div>
-       </td>
-    </tr>    
-    <tr>
-        <td>
-			<c:if test="${empty model.recentPublishedEntries}">
-			   <fmt:message key="application.none" />
-			</c:if>
-			<c:forEach var="post" items="${model.recentPublishedEntries}">
-			    <roller:link page="/editor/weblog.do">
-			       <roller:linkparam
-			           id="<%= RollerRequest.WEBLOGENTRYID_KEY %>"
-			           name="post" property="id" />
-			           <roller:linkparam id="method" value="edit" />
-			           <img src='<c:url value="/images/Edit16.png"/>' align="absmiddle" border="0"
alt="icon" title="Edit" />
-			           <str:truncateNicely lower="23" upper="27">
-			              <c:out value="${post.title}" />
-			           </str:truncateNicely>
-			    </roller:link>
-			    <br />
-			</c:forEach>
-        </td>
-    </tr>
-</table>
+<c:if test="${model.rollerSession.userAuthorizedToAuthor}">
+    <table class="sidebarBox">
+        <tr>
+           <td class="sidebarBox">
+              <div class="menu-tr"><div class="menu-tl">
+                 <fmt:message key="weblogEdit.publishedEntries" />
+              </div></div>
+           </td>
+        </tr>    
+        <tr>
+            <td>
+                <c:if test="${empty model.recentPublishedEntries}">
+                   <fmt:message key="application.none" />
+                </c:if>
+                <c:forEach var="post" items="${model.recentPublishedEntries}">
+                    <roller:link page="/editor/weblog.do">
+                       <roller:linkparam
+                           id="<%= RollerRequest.WEBLOGENTRYID_KEY %>"
+                           name="post" property="id" />
+                           <roller:linkparam id="method" value="edit" />
+                           <img src='<c:url value="/images/Edit16.png"/>' align="absmiddle"
border="0" alt="icon" title="Edit" />
+                           <str:truncateNicely lower="23" upper="27">
+                              <c:out value="${post.title}" />
+                           </str:truncateNicely>
+                    </roller:link>
+                    <br />
+                </c:forEach>
+            </td>
+        </tr>
+    </table>    
+    
+    <br />
+    
+    <table class="sidebarBox">
+        <tr>
+           <td class="sidebarBox">
+              <div class="menu-tr"><div class="menu-tl">
+                 <fmt:message key="weblogEdit.pendingEntries" />
+              </div></div>
+           </td>
+        </tr>    
+        <tr>
+            <td>
+                <c:if test="${empty model.recentPendingEntries}">
+                   <fmt:message key="application.none" />
+                </c:if>
+                <c:forEach var="post" items="${model.recentPendingEntries}">
+                    <roller:link page="/editor/weblog.do">
+                       <roller:linkparam
+                           id="<%= RollerRequest.WEBLOGENTRYID_KEY %>"
+                           name="post" property="id" />
+                           <roller:linkparam id="method" value="edit" />
+                           <img src='<c:url value="/images/Edit16.png"/>' align="absmiddle"
border="0" alt="icon" title="Edit" />
+                           <str:truncateNicely lower="23" upper="27">
+                              <c:out value="${post.title}" />
+                           </str:truncateNicely>
+                    </roller:link>
+                    <br />
+                </c:forEach>
+            </td>
+        </tr>
+    </table>
+</c:if>
 
 <br />
 



Mime
View raw message