roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1615384 - /roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemove.jsp
Date Sun, 03 Aug 2014 03:30:09 GMT
Author: gmazza
Date: Sun Aug  3 03:30:08 2014
New Revision: 1615384

URL: http://svn.apache.org/r1615384
Log:
Consolidated configuration in EntryRemove.jsp

Modified:
    roller/trunk/app/src/main/webapp/WEB-INF/jsps/editor/EntryRemove.jsp

Modified: 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/EntryRemove.jsp?rev=1615384&r1=1615383&r2=1615384&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/EntryRemove.jsp Sun Aug  3 03:30:08
2014
@@ -27,43 +27,35 @@
     <s:text name="weblogEntryRemove.entryId" /> = [<s:property value="removeEntry.id"/>]
 </p>
 
+<%-- Differences between deletions from EntryEdit and Entries views --%>
+<s:if test="actionName == 'entryRemove'">
+    <s:set var="deleteAction">entryRemove!remove</s:set>
+    <s:set var="cancelAction">entryEdit</s:set>
+</s:if>
+<s:else>
+    <s:set var="deleteAction">entryRemoveViaList!remove</s:set>
+    <s:set var="cancelAction">entries</s:set>
+</s:else>
+
 <table>
 <tr>
-    <s:if test="actionName == 'entryRemove'" >
-        <td>
-            <s:form action="entryRemove!remove">
-                <s:hidden name="salt" />
-                <s:hidden name="weblog" />
-                <s:hidden name="removeId" />
-                <s:submit value="%{getText('generic.yes')}" />
-            </s:form>
-        </td>
-        <td>
-            <s:form action="entryEdit">
-                <s:hidden name="salt" />
-                <s:hidden name="weblog" />
+    <td>
+        <s:form action="%{#deleteAction}">
+            <s:hidden name="salt" />
+            <s:hidden name="weblog" />
+            <s:hidden name="removeId" />
+            <s:submit value="%{getText('generic.yes')}" />
+        </s:form>
+    </td>
+    <td>
+        <s:form action="%{#cancelAction}">
+            <s:hidden name="salt" />
+            <s:hidden name="weblog" />
+            <s:if test="actionName == 'entryRemove'" >
                 <s:hidden name="bean.id" value="%{removeEntry.id}"/>
-                <s:submit value="%{getText('generic.no')}"/>
-            </s:form>
-        </td>
-    </s:if>
-    <!%-- actionName == entryRemoveViaList --%>
-    <s:else>
-        <td>
-            <s:form action="entryRemoveViaList!remove">
-                <s:hidden name="salt" />
-                <s:hidden name="weblog" />
-                <s:hidden name="removeId" />
-                <s:submit value="%{getText('generic.yes')}" />
-            </s:form>
-        </td>
-        <td>
-            <s:form action="entries">
-                <s:hidden name="salt" />
-                <s:hidden name="weblog"/>
-                <s:submit value="%{getText('generic.no')}"/>
-            </s:form>
-        </td>
-    </s:else>
+            </s:if>
+            <s:submit value="%{getText('generic.no')}"/>
+        </s:form>
+    </td>
 </tr>
 </table>



Mime
View raw message