[pLog-svn] r1033 - in plog/trunk: class/action/admin class/controller locale templates/admin

oscar at devel.plogworld.net oscar at devel.plogworld.net
Thu Feb 10 16:20:51 GMT 2005


Author: oscar
Date: 2005-02-10 16:20:50 +0000 (Thu, 10 Feb 2005)
New Revision: 1033

Modified:
   plog/trunk/class/action/admin/admincleanupaction.class.php
   plog/trunk/class/controller/admincontrollermap.properties.php
   plog/trunk/locale/locale_en_UK.php
   plog/trunk/templates/admin/cleanup.template
   plog/trunk/templates/admin/globalsettings.template
Log:
cleaned up the "clean up" action to make it look like the rest of the interface. Well its
interface is not exactly like all other actions but this was a difficult one anyway :)


Modified: plog/trunk/class/action/admin/admincleanupaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admincleanupaction.class.php	2005-02-10 16:08:39 UTC (rev 1032)
+++ plog/trunk/class/action/admin/admincleanupaction.class.php	2005-02-10 16:20:50 UTC (rev 1033)
@@ -22,7 +22,13 @@
 		{
 			$this->SiteAdminAction( $actionInfo, $request );
 
-			$this->_op = $actionInfo->getActionParamValue();
+			// since we've got two submit buttons in that form, we need to decide what to do
+			// depending on which button was clicked
+			if( $this->_request->getValue( "purgePosts" ))
+				$this->_op = "cleanupPosts";
+			else
+				$this->_op = "cleanupSpam";
+			
 			$this->_message = "";
 		}
 

Modified: plog/trunk/class/controller/admincontrollermap.properties.php
===================================================================
--- plog/trunk/class/controller/admincontrollermap.properties.php	2005-02-10 16:08:39 UTC (rev 1032)
+++ plog/trunk/class/controller/admincontrollermap.properties.php	2005-02-10 16:20:50 UTC (rev 1033)
@@ -250,7 +250,5 @@
 	$actions["blogTemplateChooser"] = "AdminBlogTemplateChooserAction";
 	// clean up
 	$actions["cleanUp"] = "AdminCleanupAction";
-	$actions["cleanupPosts"] = "AdminCleanupAction";
-	$actions["cleanupSpam"] = "AdminCleanupAction";
-
+	$actions["doCleanUp"] = "AdminCleanupAction";
 ?>

Modified: plog/trunk/locale/locale_en_UK.php
===================================================================
--- plog/trunk/locale/locale_en_UK.php	2005-02-10 16:08:39 UTC (rev 1032)
+++ plog/trunk/locale/locale_en_UK.php	2005-02-10 16:20:50 UTC (rev 1033)
@@ -795,6 +795,13 @@
 $messages['help_search_in_comments'] = 'Search also in comments';
 
 // cleanup
+$messages['purge'] = 'Purge';
+$messages['cleanup_spam'] = 'Purge Spam';
+$messages['cleanup_spam_help'] = 'This will remove all comments that have been marked as spam by users. It will not be possible to recover them once they have been removed';
+$messages['spam_comments_purged_ok'] = 'Spam comments purged successfully';
+$messages['cleanup_posts'] = 'Purge Posts';
+$messages['cleanup_posts_help'] = 'This will remove all posts that have been deleted by users (marked as "Deleted") It will not be possible to recover them once they have been removed';
+$messages['posts_purged_ok'] = 'Posts purged successfully';
 
 /// summary ///
 // front page

Modified: plog/trunk/templates/admin/cleanup.template
===================================================================
--- plog/trunk/templates/admin/cleanup.template	2005-02-10 16:08:39 UTC (rev 1032)
+++ plog/trunk/templates/admin/cleanup.template	2005-02-10 16:20:50 UTC (rev 1033)
@@ -1,29 +1,26 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=cleanUp title=$locale->tr("cleanUp")}
- <h3>{$locale->tr("clean_up")}</h3>
- {if $viewIsSuccess}
+<form name="cleanUp" method="post" action="admin.php">
+ <fieldset class="inputField">
+  <legend>{$locale->tr("cleanUp")}</legend>
   {include file="$admintemplatepath/successmessage.template" message=$viewSuccessMessage}
- {/if}
- {if $viewIsError}
   {include file="$admintemplatepath/errormessage.template" message=$viewErrorMessage}
- {/if} 
- <p>
-  {$locale->tr("cleanup_posts_help")}
- </p>
- <p>
-  <form name="purgePosts" method="post" action="admin.php">
-  <input type="submit" name="name" value="{$locale->tr("purge")}" />
-  <input type="hidden" name="op" value="cleanupPosts" />
-  </form>
- </p>
- <p>
-  {$locale->tr("cleanup_spam_help")}
- </p>
- <p>
-  <form name="purgeSpamComments" method="post" action="admin.php">
-  <input type="submit" name="name" value="{$locale->tr("purge")}" />
-  <input type="hidden" name="op" value="cleanupSpam" />
-  </form>
- </p>
+  <div class="field">
+   <label for="purgePosts">{$locale->tr("cleanup_posts")}</label>
+   <span class="required"></span>
+   <div class="formHelp">{$locale->tr("cleanup_posts_help")}</div>
+   <input type="submit" class="button" name="purgePosts" value="{$locale->tr("purge")}" />
+  </div>
+  
+  <div class="field">
+   <label for="purgePosts">{$locale->tr("cleanup_spam")}</label>
+   <span class="required"></span>
+   <div class="formHelp">{$locale->tr("cleanup_spam_help")}</div>
+   <input type="submit" class="button" name="purgeSpam" value="{$locale->tr("purge")}" />
+  </div>
+  
+  <input type="hidden" name="op" value="doCleanUp" />
+ </fieldset>
+</form>
 {include file="$admintemplatepath/footernavigation.template"}
 {include file="$admintemplatepath/footer.template"}

Modified: plog/trunk/templates/admin/globalsettings.template
===================================================================
--- plog/trunk/templates/admin/globalsettings.template	2005-02-10 16:08:39 UTC (rev 1032)
+++ plog/trunk/templates/admin/globalsettings.template	2005-02-10 16:20:50 UTC (rev 1033)
@@ -1,5 +1,5 @@
 {include file="$admintemplatepath/header.template"}
-{include file="$admintemplatepath/navigation.template" showOpt=editSiteSettings title=$locale->tr("editSiteSettings")}
+{include file="$admintemplatepath/navigation.template" showOpt=editSiteSettings title=$locale->tr("GlobalSettings")}
   <form name="updateGlobalSettings" action="admin.php" method="post">
    <fieldset class="inputField">
 	<legend>{$locale->tr("editSiteSettings")}</legend>




More information about the pLog-svn mailing list