roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1517646 - in /roller/trunk/app/src/main: java/org/apache/roller/weblogger/ui/struts2/editor/ resources/ webapp/WEB-INF/ webapp/WEB-INF/jsps/editor/
Date Mon, 26 Aug 2013 19:16:46 GMT
Author: gmazza
Date: Mon Aug 26 19:16:46 2013
New Revision: 1517646

URL: http://svn.apache.org/r1517646
Log:
ROL-1881 Add delete blog entry option to entries page.

Added:
    roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemoveViaList.jsp
      - copied, changed from r1517486, roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemove.jsp
Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBase.java
    roller/trunk/app/src/main/resources/ApplicationResources.properties
    roller/trunk/app/src/main/resources/struts.xml
    roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Entries.jsp
    roller/trunk/app/src/main/webapp/WEB-INF/tiles.xml

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBase.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBase.java?rev=1517646&r1=1517645&r2=1517646&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBase.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryBase.java
Mon Aug 26 19:16:46 2013
@@ -78,7 +78,6 @@ public abstract class EntryBase extends 
 	 * date, and category name parameters.
 	 * 
 	 * @return List of WeblogEntryData objects.
-	 * @throws WebloggerException
 	 */
 	public List<WeblogEntry> getRecentPublishedEntries() {
 		List<WeblogEntry> entries = Collections.EMPTY_LIST;
@@ -105,7 +104,6 @@ public abstract class EntryBase extends 
 	 * date, and category name parameters.
 	 * 
 	 * @return List of WeblogEntryData objects.
-	 * @throws WebloggerException
 	 */
 	public List<WeblogEntry> getRecentScheduledEntries() {
 		List<WeblogEntry> entries = Collections.EMPTY_LIST;
@@ -132,7 +130,6 @@ public abstract class EntryBase extends 
 	 * date, and category name parameters.
 	 * 
 	 * @return List of WeblogEntryData objects.
-	 * @throws WebloggerException
 	 */
 	public List<WeblogEntry> getRecentDraftEntries() {
 		List<WeblogEntry> entries = Collections.EMPTY_LIST;
@@ -158,7 +155,6 @@ public abstract class EntryBase extends 
 	 * date, and category name parameters.
 	 * 
 	 * @return List of WeblogEntryData objects.
-	 * @throws WebloggerException
 	 */
 	public List<WeblogEntry> getRecentPendingEntries() {
 		List<WeblogEntry> entries = Collections.EMPTY_LIST;

Modified: roller/trunk/app/src/main/resources/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/ApplicationResources.properties?rev=1517646&r1=1517645&r2=1517646&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/ApplicationResources.properties (original)
+++ roller/trunk/app/src/main/resources/ApplicationResources.properties Mon Aug 26 19:16:46
2013
@@ -2168,7 +2168,7 @@ weblogEntryImport.button.import=Import
 
 # --------------------------------------------------- Weblog Entry Export/Import
 
-weblogEntryQuery.title=Edit Entries
+weblogEntryQuery.title=Entry
 weblogEntryQuery.subtitle=Find and edit entries in weblog <span>{0}</span>
 weblogEntryQuery.tip=You can select an entry from the list below to edit \
 or use the Filter entries control to look for entries in a specific category, \
@@ -2208,6 +2208,7 @@ weblogEntryQuery.label.pendingOnly=Pendi
 weblogEntryQuery.label.scheduledOnly=Scheduled Only
 
 weblogEntryQuery.weblogEntries=Weblog Entries
+weblogEntryQuery.delete=Delete
 weblogEntryQuery.edit=Edit
 weblogEntryQuery.view=View
 weblogEntryQuery.link=Link

Modified: roller/trunk/app/src/main/resources/struts.xml
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/struts.xml?rev=1517646&r1=1517645&r2=1517646&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/struts.xml (original)
+++ roller/trunk/app/src/main/resources/struts.xml Mon Aug 26 19:16:46 2013
@@ -292,7 +292,27 @@
             <result name="error" type="chain">menu</result>
             <result name="success" type="chain">entryAdd</result>
         </action>
-        
+
+        <!-- Below activated by entries.jsp, kept separate from entryRemove!* above
+        as return page is different (the list of entries in this case, new blog
+        entry in the other.
+
+        Process flow:
+        1. Delete item on entries.jsp activates this action.
+        2. Tiles.xml is consulted to satisfy the input (here, EntryRemoveViaList.jsp
+        3. EntryRemoveViaList.jsp codes the yes confirmation to return to this action,
+        with method "EntryRemove.remove()" activated, a success of which will return
+        to the entries page as coded below with the blog entry removed from the table.
+        4. EntryRemoveViaList.jsp codes the no/cancel button to return to the
+        entries.jsp page with the blog article still remaining.
+        -->
+        <action name="entryRemoveViaList!*" method="{1}"
+              class="org.apache.roller.weblogger.ui.struts2.editor.EntryRemove">
+          <result name="input" type="tiles">.EntryRemoveViaList</result>
+          <result name="error" type="chain">menu</result>
+          <result name="success" type="chain">entries</result>
+        </action>
+
         <action name="entries"
                 class="org.apache.roller.weblogger.ui.struts2.editor.Entries">
             <result name="list" type="tiles">.Entries</result>

Modified: roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Entries.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Entries.jsp?rev=1517646&r1=1517645&r2=1517646&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Entries.jsp (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/Entries.jsp Mon Aug 26 19:16:46 2013
@@ -28,7 +28,7 @@
 
 
 <%-- ============================================================= --%>
-<%-- Number of comments and date message --%>
+<%-- Number of entries and date message --%>
 <%-- ============================================================= --%>
 
 <div class="tablenav">
@@ -117,6 +117,8 @@
     </th>
     <th class="rollertable" width="5%">
     </th>
+    <th class="rollertable" width="5%">
+    </th>
 </tr>
 
 <s:iterator id="post" value="pager.items">
@@ -151,19 +153,27 @@
     </td>
     
     <td>
+        <s:if test="#post.status == 'PUBLISHED'">
+            <a href='<s:property value="#post.permalink" />'><s:text name="weblogEntryQuery.view"
/></a>
+        </s:if>
+    </td>
+
+    <td>
         <s:url id="editUrl" action="entryEdit">
             <s:param name="weblog" value="%{actionWeblog.handle}" />
             <s:param name="bean.id" value="#post.id" />
         </s:url>
         <s:a href="%{editUrl}"><s:text name="weblogEntryQuery.edit" /></s:a>
     </td>
-    
+
     <td>
-        <s:if test="#post.status == 'PUBLISHED'">
-            <a href='<s:property value="#post.permalink" />'><s:text name="weblogEntryQuery.view"
/></a>
-        </s:if>
+        <s:url id="deleteUrl" action="entryRemoveViaList">
+            <s:param name="weblog" value="%{actionWeblog.handle}" />
+            <s:param name="removeId" value="#post.id" />
+        </s:url>
+        <s:a href="%{deleteUrl}"><s:text name="weblogEntryQuery.delete" /></s:a>
     </td>
-    
+
     </tr>
 </s:iterator>
 

Copied: roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemoveViaList.jsp (from
r1517486, roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemove.jsp)
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemoveViaList.jsp?p2=roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemoveViaList.jsp&p1=roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemove.jsp&r1=1517486&r2=1517646&rev=1517646&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemove.jsp (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemoveViaList.jsp Mon Aug 26
19:16:46 2013
@@ -17,6 +17,8 @@
 --%>
 <%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
 
+<%-- Page same as EntryRemove.jsp except has different action values to accomodate returning
+     to the entries list instead of the new entry page.  See struts.xml for action flow.
 --%>
 <h2>
     <s:text name="weblogEntryRemove.removeWeblogEntry" /> [<s:property value="removeEntry.title"/>]
 </h2>
@@ -30,7 +32,7 @@
 <table>
 <tr>
 <td>
-    <s:form action="entryRemove!remove">
+    <s:form action="entryRemoveViaList!remove">
 		<s:hidden name="salt" />
         <s:hidden name="weblog" />
         <s:hidden name="removeId" />
@@ -38,7 +40,7 @@
     </s:form>
 </td>
 <td>
-    <s:form action="entryEdit">
+    <s:form action="entries">
 		<s:hidden name="salt" />
         <s:hidden name="weblog" />
         <s:hidden name="bean.id" value="%{removeId}" />

Modified: roller/trunk/app/src/main/webapp/WEB-INF/tiles.xml
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/WEB-INF/tiles.xml?rev=1517646&r1=1517645&r2=1517646&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/WEB-INF/tiles.xml (original)
+++ roller/trunk/app/src/main/webapp/WEB-INF/tiles.xml Mon Aug 26 19:16:46 2013
@@ -312,7 +312,12 @@
         <put-attribute name="content" value="/WEB-INF/jsps/editor/EntryRemove.jsp" />
         <put-attribute name="styles" value="/WEB-INF/jsps/tiles/css-nosidebar.jsp" />
     </definition>
-    
+
+    <definition name=".EntryRemoveViaList" extends=".tiles-tabbedpage" >
+        <put-attribute name="content" value="/WEB-INF/jsps/editor/EntryRemoveViaList.jsp"
/>
+        <put-attribute name="styles" value="/WEB-INF/jsps/tiles/css-nosidebar.jsp" />
+    </definition>
+
     <definition name=".Entries" extends=".tiles-tabbedpage" >
         <put-attribute name="head" value="/WEB-INF/jsps/tiles/head-ajax.jsp" />
         <put-attribute name="content" value="/WEB-INF/jsps/editor/Entries.jsp" />



Mime
View raw message