[pLog-svn] r5643 - in plog/trunk: class/action/admin class/controller class/dao templates/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Wed Jul 11 06:20:26 EDT 2007


Author: mark
Date: 2007-07-11 06:20:25 -0400 (Wed, 11 Jul 2007)
New Revision: 5643

Added:
   plog/trunk/class/action/admin/adminreadinboxprivatemessageaction.class.php
   plog/trunk/class/action/admin/adminreadoutboxprivatemessageaction.class.php
   plog/trunk/templates/admin/readinboxprivatemessage.template
   plog/trunk/templates/admin/readoutboxprivatemessage.template
Modified:
   plog/trunk/class/controller/admincontrollermap.properties.php
   plog/trunk/class/dao/privatemessage.class.php
   plog/trunk/class/dao/privatemessages.class.php
   plog/trunk/templates/admin/editinboxprivatemessages.template
   plog/trunk/templates/admin/editoutboxprivatemessages.template
   plog/trunk/templates/admin/newprivatemessage.template
Log:
Now, we can read inbox & outbox messages.

Added: plog/trunk/class/action/admin/adminreadinboxprivatemessageaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminreadinboxprivatemessageaction.class.php	                        (rev 0)
+++ plog/trunk/class/action/admin/adminreadinboxprivatemessageaction.class.php	2007-07-11 10:20:25 UTC (rev 5643)
@@ -0,0 +1,71 @@
+<?php
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/admininboxprivatemessageslistview.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/privatemessages.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * Action that shows a form of the private message
+     */
+    class AdminReadInboxPrivateMessageAction extends AdminAction
+	{
+
+    	var $_messageId;
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminReadInboxPrivateMessageAction( $actionInfo, $request )
+        {
+        	$this->AdminAction( $actionInfo, $request );
+
+			// stuff for the data validation
+			$this->registerFieldValidator( "messageId", new IntegerValidator());
+			$this->_form->registerField( "senderName" );
+			$this->_form->registerField( "subject" );
+			$this->_form->registerField( "messageText" );
+			$errorView = new AdminInboxPrivateMessagesListView( $this->_blogInfo );
+			$errorView->setErrorMessage( $this->_locale->tr("error_incorrect_message_id"));
+			$this->setValidationErrorView( $errorView );
+        }
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+        	// fetch the private message
+			$this->_messageId = $this->_request->getValue( "messageId" );
+            $privateMessages = new PrivateMessages();
+            $privateMessage   = $privateMessages->getPrivateMessageByReceiverId( $this->_messageId, $this->_userInfo->getId() );
+            // show an error if we couldn't fetch the private message
+            if( !$privateMessage ) {
+            	$this->_view = new AdminInboxPrivateMessagesListView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_private_message") );
+				$this->_view->setError( true );
+                $this->setCommonData();
+                return false;
+            } else {
+            	if( $privateMessage->getReceiverReadStatus() == PRIVATE_MESSAGE_RECEIVER_UNREAD ) {
+            		$privateMessage->setReceiverReadStatus( PRIVATE_MESSAGE_RECEIVER_READ );
+            		$privateMessages->updatePrivateMessage( $privateMessage );
+            	}
+        	}
+
+			$this->notifyEvent( EVENT_PRIVATE_MESSAGE_LOADED, Array( "privatemessage" => &$privateMessage ));
+            // otherwise show the form to edit its fields
+        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "readinboxprivatemessage" );
+			$this->_view->setValue( "messageId", $privateMessage->getId());
+            $this->_view->setValue( "privatemessage", $privateMessage );
+            $this->setCommonData();
+
+            // better to return true if everything fine
+           return true;
+        }
+    }
+?>

Added: plog/trunk/class/action/admin/adminreadoutboxprivatemessageaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminreadoutboxprivatemessageaction.class.php	                        (rev 0)
+++ plog/trunk/class/action/admin/adminreadoutboxprivatemessageaction.class.php	2007-07-11 10:20:25 UTC (rev 5643)
@@ -0,0 +1,71 @@
+<?php
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/adminoutboxprivatemessageslistview.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/privatemessages.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * Action that shows a form of the private message
+     */
+    class AdminReadOutboxPrivateMessageAction extends AdminAction
+	{
+
+    	var $_messageId;
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminReadOutboxPrivateMessageAction( $actionInfo, $request )
+        {
+        	$this->AdminAction( $actionInfo, $request );
+
+			// stuff for the data validation
+			$this->registerFieldValidator( "messageId", new IntegerValidator());
+			$this->_form->registerField( "senderName" );
+			$this->_form->registerField( "subject" );
+			$this->_form->registerField( "messageText" );
+			$errorView = new AdminOutboxPrivateMessagesListView( $this->_blogInfo );
+			$errorView->setErrorMessage( $this->_locale->tr("error_incorrect_message_id"));
+			$this->setValidationErrorView( $errorView );
+        }
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+        	// fetch the private message
+			$this->_messageId = $this->_request->getValue( "messageId" );
+            $privateMessages = new PrivateMessages();
+            $privateMessage   = $privateMessages->getPrivateMessageBySenderId( $this->_messageId, $this->_userInfo->getId() );
+            // show an error if we couldn't fetch the private message
+            if( !$privateMessage ) {
+            	$this->_view = new AdminOutboxPrivateMessagesListView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_private_message") );
+				$this->_view->setError( true );
+                $this->setCommonData();
+                return false;
+            } else {
+            	if( $privateMessage->getReceiverReadStatus() == PRIVATE_MESSAGE_RECEIVER_UNREAD ) {
+            		$privateMessage->setReceiverReadStatus( PRIVATE_MESSAGE_RECEIVER_READ );
+            		$privateMessages->updatePrivateMessage( $privateMessage );
+            	}
+        	}
+
+			$this->notifyEvent( EVENT_PRIVATE_MESSAGE_LOADED, Array( "privatemessage" => &$privateMessage ));
+            // otherwise show the form to edit its fields
+        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "readoutboxprivatemessage" );
+			$this->_view->setValue( "messageId", $privateMessage->getId());
+            $this->_view->setValue( "privatemessage", $privateMessage );
+            $this->setCommonData();
+
+            // better to return true if everything fine
+           return true;
+        }
+    }
+?>
\ No newline at end of file

Modified: plog/trunk/class/controller/admincontrollermap.properties.php
===================================================================
--- plog/trunk/class/controller/admincontrollermap.properties.php	2007-07-11 07:05:01 UTC (rev 5642)
+++ plog/trunk/class/controller/admincontrollermap.properties.php	2007-07-11 10:20:25 UTC (rev 5643)
@@ -27,7 +27,7 @@
     // adds the category to the db
     $actions["addArticleCategory"] = "AdminAddArticleCategoryAction";
     // adds the category to the db through Ajax
-    $actions["addArticleCategoryAjax"] = "AdminAddArticleCategoryAjaxAction";    
+    $actions["addArticleCategoryAjax"] = "AdminAddArticleCategoryAjaxAction";
     // shows the settings of the blog
     $actions["blogSettings"] = "AdminBlogSettingsAction";
     // updates the settings of the blog
@@ -70,7 +70,7 @@
     $actions["deleteLink"] = "AdminDeleteLinkAction";
     $actions["deleteLinks"] = "AdminDeleteLinkAction";
 	// massive change links category
-	$actions["changeLinksCategory"] = "AdminChangeLinksCategoryAction";	
+	$actions["changeLinksCategory"] = "AdminChangeLinksCategoryAction";
     // shows the list of link categories
     $actions["editLinkCategories"] = "AdminEditLinkCategoriesAction";
     // deletes a link category
@@ -94,7 +94,7 @@
     $actions["deleteComment"] = "AdminDeleteCommentAction";
 	$actions["deleteComments"] = "AdminDeleteCommentAction";
 	// massive change comments status
-	$actions["changeCommentsStatus"] = "AdminChangeCommentsStatusAction";	
+	$actions["changeCommentsStatus"] = "AdminChangeCommentsStatusAction";
     // show the user settings
     $actions["userSettings"] = "AdminUserSettingsAction";
     // update the user settings
@@ -216,10 +216,10 @@
 	$actions["deleteResourceItems"] = "AdminDeleteGalleryItemsAction";
 	// massive change gallery items album
 	$actions["changeGalleryItemsAlbum"] = "AdminChangeGalleryItemsAlbumAction";
-	$actions["changeGalleryItemsLocation"] = "AdminChangeGalleryItemsLocationAction";	
+	$actions["changeGalleryItemsLocation"] = "AdminChangeGalleryItemsLocationAction";
     // mark as spam
     $actions["markComment"] = "AdminMarkCommentAction";
-    $actions["markTrackback"] = "AdminMarkTrackbackAction";	
+    $actions["markTrackback"] = "AdminMarkTrackbackAction";
     // purge spam comments
     $actions["purgeSpamComments"] = "AdminPurgeSpamCommentsAction";
 	// regenerate a preview
@@ -248,7 +248,7 @@
 	$actions["deleteTrackback"] = "AdminDeleteTrackbackAction";
 	$actions["deleteTrackbacks"] = "AdminDeleteTrackbackAction";
 	// massive change trackbacks status
-	$actions["changeTrackbacksStatus"] = "AdminChangeTrackbacksStatusAction";		
+	$actions["changeTrackbacksStatus"] = "AdminChangeTrackbacksStatusAction";
 	// delete referrers
 	$actions["deleteReferrer"] = "AdminDeleteReferrerAction";
 	$actions["deleteReferrers"] = "AdminDeleteReferrerAction";
@@ -264,22 +264,22 @@
 	$actions["cleanUp"] = "AdminCleanupAction";
 	$actions["doCleanUp"] = "AdminCleanupAction";
 	// removes all users marked as deleted
-    $actions["purgeUsers"] = "AdminPurgeUsersAction";	
+    $actions["purgeUsers"] = "AdminPurgeUsersAction";
 	// removes all blogs marked as deleted
 	$actions["purgeBlogs"] = "AdminPurgeBlogsAction";
     // register a new blog
     $actions["registerBlog"] = "AdminRegisterBlogAction";
-    $actions["finishRegisterBlog"] = "AdminDoRegisterBlogAction";    
+    $actions["finishRegisterBlog"] = "AdminDoRegisterBlogAction";
 	// global blog categories
 	$actions["newBlogCategory"] = "AdminNewBlogCategoryAction";
-	$actions["addBlogCategory"] = "AdminAddBlogCategoryAction";	
-	$actions["editBlogCategories"] = "AdminBlogCategoriesAction";	
+	$actions["addBlogCategory"] = "AdminAddBlogCategoryAction";
+	$actions["editBlogCategories"] = "AdminBlogCategoriesAction";
 	$actions["deleteBlogCategory"] = "AdminDeleteBlogCategoryAction";
 	$actions["deleteBlogCategories"] = "AdminDeleteBlogCategoryAction";
 	//nick add this to add global article categories.
 	$actions["newGlobalArticleCategory"] = "AdminNewGlobalArticleCategoryAction";
   	// adds the category to the db
-  	$actions["addGlobalArticleCategory"] = "AdminAddGlobalArticleCategoryAction";	
+  	$actions["addGlobalArticleCategory"] = "AdminAddGlobalArticleCategoryAction";
 	//edit globalarticle categories.
 	$actions["editGlobalArticleCategories"] = "AdminEditGlobalArticleCategoriesAction";
   	// deletes an article category from the database
@@ -288,7 +288,7 @@
   	// edits an article category
   	$actions["editGlobalArticleCategory"] = "AdminEditGlobalArticleCategoryAction";
   	// updates the category
-  	$actions["updateGlobalArticleCategory"] = "AdminUpdateGlobalArticleCategoryAction";	
+  	$actions["updateGlobalArticleCategory"] = "AdminUpdateGlobalArticleCategoryAction";
 	// resend the confirmation email
 	$actions["resendConfirmation"] = "AdminResendConfirmationAction";
 	// allow admins to control any blog
@@ -303,31 +303,31 @@
 	// permissions
 	$actions["permissionsList"] = "AdminPermissionsListAction";
 	$actions["deletePermission"] = "AdminDeletePermissionsAction";
-	$actions["deletePermissions"] = "AdminDeletePermissionsAction";	
+	$actions["deletePermissions"] = "AdminDeletePermissionsAction";
 	$actions["editPermission"] = "AdminEditPermissionAction";
 	$actions["updatePermission"] = "AdminUpdatePermissionAction";
-	$actions["updatePermission"] = "AdminUpdatePermissionAction";		
-	$actions["newPermission"] = "AdminNewPermissionAction";	
+	$actions["updatePermission"] = "AdminUpdatePermissionAction";
+	$actions["newPermission"] = "AdminNewPermissionAction";
 	$actions["addPermission"] = "AdminAddPermissionAction";
 	// edit blog user
 	$actions["editBlogUser"] = "AdminEditBlogUserAction";
 	// update blog user
-	$actions["updateBlogUser"] = "AdminUpdateBlogUserAction";	
+	$actions["updateBlogUser"] = "AdminUpdateBlogUserAction";
 	// permission required
 	$actions["permissionRequired"] = "AdminPermissionRequiredAction";
 	// global plugin settings
 	$actions["pluginSettings"] = "AdminPluginSettingsAction";
-	$actions["updatePluginSettings"] = "AdminUpdatePluginSettingsAction";	
+	$actions["updatePluginSettings"] = "AdminUpdatePluginSettingsAction";
 	// bulk update of blogs
 	$actions["changeBlogStatus"] = "AdminChangeBlogStatusAction";
 	// bulk update of users
 	$actions["changeUserStatus"] = "AdminChangeUserStatusAction";
-	// perform an md5 check of some core files	
+	// perform an md5 check of some core files
 	$actions["Versions"] = "AdminVersionCheckAction";
 	// location
 	$actions['locationChooser'] = 'AdminLocationChooserAction';
 	$actions['adminLocationDisplay'] = 'AdminLocationDisplayAction';
-	$actions['showBlogLocations'] = 'AdminShowBlogLocationsAction';	
+	$actions['showBlogLocations'] = 'AdminShowBlogLocationsAction';
 	$actions['updateLocation'] = 'AdminUpdateLocationAjaxAction';
 	$actions['addLocation'] = 'AdminAddLocationAjaxAction';
     // shows a window with all the friends action
@@ -353,8 +353,10 @@
   	$actions["sendPrivateMessage"] = "AdminSendPrivateMessageAction";
 	$actions["editInboxPrivateMessages"] = "AdminEditInboxPrivateMessagesAction";
 	$actions["editOutboxPrivateMessages"] = "AdminEditOutboxPrivateMessagesAction";
-  	$actions["readPrivateMessage"] = "AdminReadPrivateMessageAction";
+  	$actions["readInboxPrivateMessage"] = "AdminReadInboxPrivateMessageAction";
+  	$actions["readOutboxPrivateMessage"] = "AdminReadOutboxPrivateMessageAction";
   	$actions["replyPrivateMessage"] = "AdminReplyPrivateMessageAction";
+  	$actions["sendReplyPrivateMessage"] = "AdminSendReplyPrivateMessageAction";
   	$actions["deletePrivateMessages"] = "AdminDeletePrivateMessageAction";
   	$actions["deletePrivateMessage"] = "AdminDeletePrivateMessageAction";
 ?>
\ No newline at end of file

Modified: plog/trunk/class/dao/privatemessage.class.php
===================================================================
--- plog/trunk/class/dao/privatemessage.class.php	2007-07-11 07:05:01 UTC (rev 5642)
+++ plog/trunk/class/dao/privatemessage.class.php	2007-07-11 10:20:25 UTC (rev 5643)
@@ -102,7 +102,7 @@
         function getBox()
         {
 			if( empty( $this->_box ) ){
-				lt_include( PLOG_CLASS_PATH."class/dao/privatemessagebox.class.php" );
+				lt_include( PLOG_CLASS_PATH."class/dao/privatemessageboxes.class.php" );
 
 				$privateMessageBoxes = new PrivateMessageBoxes();
 				$this->_box = $privateMessageBoxes->getPrivateMessageBox( $this->_boxId );

Modified: plog/trunk/class/dao/privatemessages.class.php
===================================================================
--- plog/trunk/class/dao/privatemessages.class.php	2007-07-11 07:05:01 UTC (rev 5642)
+++ plog/trunk/class/dao/privatemessages.class.php	2007-07-11 10:20:25 UTC (rev 5643)
@@ -145,22 +145,55 @@
          * get a specific private message from the db.
 		 *
 		 * @param $messageId The id of the private message.
-		 * @param $receiverId The user identifier. Used as a securityfunction, so that you
+		 * @return Returns the specific private message as a PrivateMessage object.
+         */
+		function getPrivateMessage( $messageId )
+        {
+        	$privateMessage = $this->get( "id", $messageId, CACHE_PRIVATE_MESSAGES );
+
+        	return $privateMessage;
+		}
+
+		/**
+         * get a specific private message from the db.
+		 *
+		 * @param $messageId The id of the private message.
+		 * @param $receiverId The user identifier. Used as a security function, so that you
 		 * can only see your own private messages.
 		 * @return Returns the specific private message as a PrivateMessage object.
          */
-		function getPrivateMessage( $messageId, $receiverId = -1 )
+		function getPrivateMessageByReceiverId( $messageId, $receiverId )
         {
         	$privateMessage = $this->get( "id", $messageId, CACHE_PRIVATE_MESSAGES );
         	if( !$privateMessage )
         		return false;
 
-			if( $privateMessage->getReceiverId() == $receiverId )
+        	if( $privateMessage->getReceiverId() == $receiverId )
 				return $privateMessage;
 			else
 				return false;
 		}
 
+		/**
+         * get a specific private message from the db.
+		 *
+		 * @param $messageId The id of the private message.
+		 * @param $senderId The user identifier. Used as a security function, so that you
+		 * can only see your own private messages.
+		 * @return Returns the specific private message as a PrivateMessage object.
+         */
+		function getPrivateMessageBySenderId( $messageId, $senderId )
+        {
+        	$privateMessage = $this->get( "id", $messageId, CACHE_PRIVATE_MESSAGES );
+        	if( !$privateMessage )
+        		return false;
+
+        	if( $privateMessage->getSenderId() == $senderId )
+				return $privateMessage;
+			else
+				return false;
+		}
+
         /**
          * Removes a private message object from the database.
          *

Modified: plog/trunk/templates/admin/editinboxprivatemessages.template
===================================================================
--- plog/trunk/templates/admin/editinboxprivatemessages.template	2007-07-11 07:05:01 UTC (rev 5642)
+++ plog/trunk/templates/admin/editinboxprivatemessages.template	2007-07-11 10:20:25 UTC (rev 5643)
@@ -20,21 +20,21 @@
    <label for="search">{$locale->tr("search_terms")}</label>
    <br />
    <input type="text" name="searchTerms" value="{$searchTerms}" size="15" id="search" />
-   </div>   
-   
+   </div>
+
    <div class="list_nav_option">
     <br />
     <input type="hidden" name="op" value="editInboxPrivateMessages" />
     <input type="submit" name="Show" value="{$locale->tr("show")}" />
    </div>
-  </fieldset> 
- </form> 
+  </fieldset>
+ </form>
  </div>
  <br style="clear:both" />
- </div> 
+ </div>
 
  <form id="inboxPrivateMessages" action="admin.php" method="post">
- <div id="list"> 
+ <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
  <table id="list" class="info" summary="{$locale->tr("editInboxPrivateMessages")}">
@@ -48,35 +48,35 @@
     <th style="width:10%">{$locale->tr("actions")}</th>
    </tr>
   </thead>
-  <tbody> 
+  <tbody>
   {foreach from=$privatemessages item=privatemessage}
   <tr>
-   <td align="center"><input class="checkbox" type="checkbox" name="messageIds[{counter}]" value="{$privatemessage->getId()}"/></td>  
+   <td align="center"><input class="checkbox" type="checkbox" name="messageIds[{counter}]" value="{$privatemessage->getId()}"/></td>
    <td class="col_highlighted">
      {assign var=sender value=$privatemessage->getSenderInfo()}
-	 <a href="admin.php?op=readPrivateMessage&amp;messageId={$privatemessage->getId()}">{$sender->getFullName()}</a>
+	 <a href="admin.php?op=readInboxPrivateMessage&amp;messageId={$privatemessage->getId()}">{$sender->getFullName()}</a>
    </td>
    <td>
 	 {if $privatemessage->getReceiverReadStatus() == 1}
-       <a href="admin.php?op=readPrivateMessage&amp;messageId={$privatemessage->getId()}" title="{$locale->tr("unread")}">
+       <a href="admin.php?op=readInboxPrivateMessage&amp;messageId={$privatemessage->getId()}" title="{$locale->tr("unread")}">
          <img src="imgs/admin/icon_mailunread-16.png" alt="{$locale->tr("unread")}" />
        </a>
      {else}
-       <a href="admin.php?op=readPrivateMessage&amp;messageId={$privatemessage->getId()}" title="{$locale->tr("readed")}">
+       <a href="admin.php?op=readInboxPrivateMessage&amp;messageId={$privatemessage->getId()}" title="{$locale->tr("readed")}">
          <img src="imgs/admin/icon_mailreaded-16.png" alt="{$locale->tr("readed")}" />
        </a>
      {/if}
    </td>
    <td>
 	 {assign var=date value=$privatemessage->getDateObject()}
-	 <a href="admin.php?op=readPrivateMessage&amp;messageId={$privatemessage->getId()}">{$locale->formatDate($date)}</a>
+	 {$locale->formatDate($date)}
    </td>
    <td>
-	 <a href="admin.php?op=readPrivateMessage&amp;messageId={$privatemessage->getId()}">{$privatemessage->getSubject()}</a>
+	 <a href="admin.php?op=readInboxPrivateMessage&amp;messageId={$privatemessage->getId()}">{$privatemessage->getSubject()}</a>
    </td>
    <td>
      <div class="list_action_button">
-       <a href="?op=readPrivateMessage;messageId={$privatemessage->getId()}" title="{$locale->tr("read")}">
+       <a href="?op=readInboxPrivateMessage&amp;messageId={$privatemessage->getId()}" title="{$locale->tr("read")}">
          <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("read")}" />
        </a>
        <a href="?op=deletePrivateMessage&amp;messageId={$privatemessage->getId()}" title="{$locale->tr("delete")}">
@@ -85,17 +85,17 @@
        <a href="?op=replyPrivateMessage&amp;messageId={$privatemessage->getId()}" title="{$locale->tr("reply")}">
           <img src="imgs/admin/icon_mailreply-16.png" alt="{$locale->tr("reply")}" />
        </a>
-   </td>   
+   </td>
   </tr>
   {/foreach}
- </tbody> 
+ </tbody>
  </table>
  </div>
  <div id="list_action_bar">
   {adminpager style=list}
   <input type="hidden" name="op" value="deleteLinkCategories"/>
   <input type="submit" name="Delete selected" value="{$locale->tr("delete")}"/>
- </div> 
+ </div>
  </form>
 
 {include file="$admintemplatepath/footernavigation.template"}

Modified: plog/trunk/templates/admin/editoutboxprivatemessages.template
===================================================================
--- plog/trunk/templates/admin/editoutboxprivatemessages.template	2007-07-11 07:05:01 UTC (rev 5642)
+++ plog/trunk/templates/admin/editoutboxprivatemessages.template	2007-07-11 10:20:25 UTC (rev 5643)
@@ -20,21 +20,21 @@
    <label for="search">{$locale->tr("search_terms")}</label>
    <br />
    <input type="text" name="searchTerms" value="{$searchTerms}" size="15" id="search" />
-   </div>   
-   
+   </div>
+
    <div class="list_nav_option">
     <br />
     <input type="hidden" name="op" value="editOutboxPrivateMessages" />
     <input type="submit" name="Show" value="{$locale->tr("show")}" />
    </div>
-  </fieldset> 
- </form> 
+  </fieldset>
+ </form>
  </div>
  <br style="clear:both" />
- </div> 
+ </div>
 
  <form id="outboxPrivateMessages" action="admin.php" method="post">
- <div id="list"> 
+ <div id="list">
   {include file="$admintemplatepath/successmessage.template"}
   {include file="$admintemplatepath/errormessage.template"}
  <table id="list" class="info" summary="{$locale->tr("editOutboxPrivateMessages")}">
@@ -47,39 +47,39 @@
     <th style="width:10%">{$locale->tr("actions")}</th>
    </tr>
   </thead>
-  <tbody> 
+  <tbody>
   {foreach from=$privatemessages item=privatemessage}
   <tr>
-   <td align="center"><input class="checkbox" type="checkbox" name="messageIds[{counter}]" value="{$privatemessage->getId()}"/></td>  
+   <td align="center"><input class="checkbox" type="checkbox" name="messageIds[{counter}]" value="{$privatemessage->getId()}"/></td>
    <td class="col_highlighted">
      {assign var=receiver value=$privatemessage->getReceiverInfo()}
-	 <a href="admin.php?op=readPrivateMessage&amp;messageId={$privatemessage->getId()}">{$receiver->getFullName()}</a>
+	 <a href="admin.php?op=readOutboxPrivateMessage&amp;messageId={$privatemessage->getId()}">{$receiver->getFullName()}</a>
    </td>
    <td>
      {assign var=date value=$privatemessage->getDateObject()}
-	 <a href="admin.php?op=readPrivateMessage&amp;messageId={$privatemessage->getId()}">{$locale->formatDate($date)}</a>
+	 {$locale->formatDate($date)}
    </td>
    <td>
-	 <a href="admin.php?op=readPrivateMessage&amp;messageId={$privatemessage->getId()}">{$privatemessage->getSubject()}</a>
+	 <a href="admin.php?op=readOutboxPrivateMessage&amp;messageId={$privatemessage->getId()}">{$privatemessage->getSubject()}</a>
    </td>
    <td>
-       <a href="?op=readPrivateMessage;messageId={$privatemessage->getId()}" title="{$locale->tr("read")}">
+       <a href="?op=readOutboxPrivateMessage;messageId={$privatemessage->getId()}" title="{$locale->tr("read")}">
          <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("read")}" />
        </a>
        <a href="?op=deletePrivateMessage&amp;messageId={$privatemessage->getId()}" title="{$locale->tr("delete")}">
           <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
        </a>
-   </td>   
+   </td>
   </tr>
   {/foreach}
- </tbody> 
+ </tbody>
  </table>
  </div>
  <div id="list_action_bar">
   {adminpager style=list}
   <input type="hidden" name="op" value="deleteLinkCategories"/>
   <input type="submit" name="Delete selected" value="{$locale->tr("delete")}"/>
- </div> 
+ </div>
  </form>
 
 {include file="$admintemplatepath/footernavigation.template"}

Modified: plog/trunk/templates/admin/newprivatemessage.template
===================================================================
--- plog/trunk/templates/admin/newprivatemessage.template	2007-07-11 07:05:01 UTC (rev 5642)
+++ plog/trunk/templates/admin/newprivatemessage.template	2007-07-11 10:20:25 UTC (rev 5643)
@@ -4,12 +4,12 @@
  <form name="addNewPrivateMessage" method="post" action="admin.php">
   <fieldset class="inputField">
    <legend>{$locale->tr("newPrivateMessage")}</legend>
-   {include file="$admintemplatepath/formvalidate.template"}   
-   
+   {include file="$admintemplatepath/formvalidate.template"}
+
    <div class="field">
     <label for="receiverName">{$locale->tr("receiver_name")}</label>
     <span class="required">*</span><br/>
-    <div class="formHelp">{$locale->tr("receiver_name_help")}</div>     
+    <div class="formHelp">{$locale->tr("receiver_name_help")}</div>
      <input type="text" value="{$receiverName}" id="receiverName" name="receiverName" />
     {include file="$admintemplatepath/validate.template" field=receiverName message=$locale->tr("error_receiver_name")}
    </div>
@@ -17,7 +17,7 @@
    <div class="field">
     <label for="subject">{$locale->tr("subject")}</label>
     <span class="required">*</span><br/>
-    <div class="formHelp">{$locale->tr("subject_help")}</div>     
+    <div class="formHelp">{$locale->tr("subject_help")}</div>
      <input type="text" value="{$subject}" id="subject" name="subject" />
     {include file="$admintemplatepath/validate.template" field=subject message=$locale->tr("error_empty_subject")}
    </div>
@@ -25,9 +25,9 @@
    <div class="field">
     <label for="messageText">{$locale->tr("message_text")}</label>
     <span class="required">*</span>
-    <div class="formHelp">{$locale->tr("message_text_help")}</div> 
+    <div class="formHelp">{$locale->tr("message_text_help")}</div>
     <textarea name="messageText" cols="60" id="messageText" rows="5">{$messageText}</textarea>
-    {include file="$admintemplatepath/validate.template" field=messageText message=$locale->tr("error_empty_message_text")}  
+    {include file="$admintemplatepath/validate.template" field=messageText message=$locale->tr("error_empty_message_text")}
    </div>
 
    <div class="field">
@@ -35,9 +35,9 @@
     <div class="formHelp">
      <input class="checkbox" type="checkbox" id="backupPrivateMessage" name="backupPrivateMessage" value="1" {if $backupPrivateMessage}checked="checked"{/if} />
      {$locale->tr("backup_private_message_help")}
-    </div> 
+    </div>
    </div>
-   
+
   </fieldset>
   <div class="buttons">
    <input type="hidden" name="op" value="sendPrivateMessage" />

Added: plog/trunk/templates/admin/readinboxprivatemessage.template
===================================================================
--- plog/trunk/templates/admin/readinboxprivatemessage.template	                        (rev 0)
+++ plog/trunk/templates/admin/readinboxprivatemessage.template	2007-07-11 10:20:25 UTC (rev 5643)
@@ -0,0 +1,39 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editInboxPrivateMessages title=$locale->tr("readInboxPrivateMessage")}
+
+ <form name="readInboxPrivateMessage" method="post" action="admin.php">
+  <fieldset class="inputField">
+   <legend>{$locale->tr("readInboxPrivateMessage")}</legend>
+
+   <div class="field">
+    <label for="senderName">{$locale->tr("sender_name")}</label>
+    <span class="required"></span><br/>
+    <div class="formHelp">{$locale->tr("sender_name_help")}</div>
+     {assign var=senderInfo value=$privatemessage->getSenderInfo()}
+     <input type="text" value="{$senderInfo->getFullName()}" id="senderName" name="senderName" readonly=readonly />
+   </div>
+
+   <div class="field">
+    <label for="subject">{$locale->tr("subject")}</label>
+    <span class="required"></span><br/>
+    <div class="formHelp">{$locale->tr("subject_help")}</div>
+     <input type="text" value="{$privatemessage->getSubject()}" id="subject" name="subject" readonly=readonly />
+   </div>
+
+   <div class="field">
+    <label for="messageText">{$locale->tr("message_text")}</label>
+    <span class="required"></span>
+    <div class="formHelp">{$locale->tr("message_text_help")}</div>
+    <textarea name="messageText" cols="60" id="messageText" rows="5" readonly=readonly >{$privatemessage->getMessage()}</textarea>
+   </div>
+
+  </fieldset>
+  <div class="buttons">
+   <input type="hidden" name="op" value="replyPrivateMessage" />
+   <input type="hidden" name="messageId" value="{$messageId}" />
+   <input type="button" name="Delete" value="{$locale->tr("delete")}" />
+   <input type="button" name="Reply" value="{$locale->tr("reply")}" />
+  </div>
+ </form>
+{include file="$blogtemplate/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/readoutboxprivatemessage.template
===================================================================
--- plog/trunk/templates/admin/readoutboxprivatemessage.template	                        (rev 0)
+++ plog/trunk/templates/admin/readoutboxprivatemessage.template	2007-07-11 10:20:25 UTC (rev 5643)
@@ -0,0 +1,38 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editOutboxPrivateMessages title=$locale->tr("readOutboxPrivateMessage")}
+
+ <form name="readOutboxPrivateMessage" method="post" action="admin.php">
+  <fieldset class="inputField">
+   <legend>{$locale->tr("readOutboxPrivateMessage")}</legend>
+
+   <div class="field">
+    <label for="receiverName">{$locale->tr("receiver_name")}</label>
+    <span class="required"></span><br/>
+    <div class="formHelp">{$locale->tr("receiver_name_help")}</div>
+     {assign var=receiverInfo value=$privatemessage->getReceiverInfo()}
+     <input type="text" value="{$receiverInfo->getFullName()}" id="receiverName" name="receiverName" readonly=readonly />
+   </div>
+
+   <div class="field">
+    <label for="subject">{$locale->tr("subject")}</label>
+    <span class="required"></span><br/>
+    <div class="formHelp">{$locale->tr("subject_help")}</div>
+     <input type="text" value="{$privatemessage->getSubject()}" id="subject" name="subject" readonly=readonly />
+   </div>
+
+   <div class="field">
+    <label for="messageText">{$locale->tr("message_text")}</label>
+    <span class="required"></span>
+    <div class="formHelp">{$locale->tr("message_text_help")}</div>
+    <textarea name="messageText" cols="60" id="messageText" rows="5" readonly=readonly >{$privatemessage->getMessage()}</textarea>
+   </div>
+
+  </fieldset>
+  <div class="buttons">
+   <input type="hidden" name="op" value="deletePrivateMessage" />
+   <input type="hidden" name="messageId" value="{$messageId}" />
+   <input type="submit" name="Delete" value="{$locale->tr("delete")}" />
+  </div>
+ </form>
+{include file="$blogtemplate/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file



More information about the pLog-svn mailing list