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

oscar at devel.lifetype.net oscar at devel.lifetype.net
Fri Aug 10 17:57:04 EDT 2007


Author: oscar
Date: 2007-08-10 17:57:04 -0400 (Fri, 10 Aug 2007)
New Revision: 5816

Added:
   plog/trunk/templates/admin/createblog_form.template
   plog/trunk/templates/admin/createuser_form.template
   plog/trunk/templates/admin/editarticlecategory_form.template
   plog/trunk/templates/admin/editblog_form.template
   plog/trunk/templates/admin/editcomment_form.template
   plog/trunk/templates/admin/editcustomfield_form.template
   plog/trunk/templates/admin/editlink_form.template
   plog/trunk/templates/admin/editlinkcategory_form.template
   plog/trunk/templates/admin/edittemplatefile_form.template
   plog/trunk/templates/admin/newcustomfield_form.template
   plog/trunk/templates/admin/newlink_form.template
   plog/trunk/templates/admin/newlinkcategory_form.template
   plog/trunk/templates/admin/newpostcategory_form.template
   plog/trunk/templates/admin/userprofile_form.template
Modified:
   plog/trunk/class/action/action.class.php
   plog/trunk/class/action/admin/adminaction.class.php
   plog/trunk/class/action/admin/adminadduseraction.class.php
   plog/trunk/class/action/admin/adminblogcustomfieldsaction.class.php
   plog/trunk/class/action/admin/admincreateblogaction.class.php
   plog/trunk/class/action/admin/admincreateuseraction.class.php
   plog/trunk/class/action/admin/admindeletelinkaction.class.php
   plog/trunk/class/action/admin/admindeletepostaction.class.php
   plog/trunk/class/action/admin/admineditarticlecategoriesaction.class.php
   plog/trunk/class/action/admin/admineditarticlecategoryaction.class.php
   plog/trunk/class/action/admin/admineditblogaction.class.php
   plog/trunk/class/action/admin/admineditcommentaction.class.php
   plog/trunk/class/action/admin/admineditcommentsaction.class.php
   plog/trunk/class/action/admin/admineditcustomfieldaction.class.php
   plog/trunk/class/action/admin/admineditlinkaction.class.php
   plog/trunk/class/action/admin/admineditlinkcategoriesaction.class.php
   plog/trunk/class/action/admin/admineditlinkcategoryaction.class.php
   plog/trunk/class/action/admin/admineditlinksaction.class.php
   plog/trunk/class/action/admin/admineditpostsaction.class.php
   plog/trunk/class/action/admin/adminnewarticlecategoryaction.class.php
   plog/trunk/class/action/admin/adminnewcustomfieldaction.class.php
   plog/trunk/class/action/admin/adminnewlinkaction.class.php
   plog/trunk/class/action/admin/adminnewlinkcategoryaction.class.php
   plog/trunk/class/action/admin/adminsiteblogsaction.class.php
   plog/trunk/class/action/admin/adminsiteusersaction.class.php
   plog/trunk/class/action/admin/adminupdatetemplatefileaction.class.php
   plog/trunk/class/action/admin/adminupdateuserprofileaction.class.php
   plog/trunk/class/controller/controller.class.php
   plog/trunk/class/net/request.class.php
   plog/trunk/class/view/admin/adminadduserview.class.php
   plog/trunk/class/view/admin/adminarticlecategorieslistview.class.php
   plog/trunk/class/view/admin/adminarticlecommentslistview.class.php
   plog/trunk/class/view/admin/adminbloguserslistview.class.php
   plog/trunk/class/view/admin/admincreateblogview.class.php
   plog/trunk/class/view/admin/admincustomfieldslistview.class.php
   plog/trunk/class/view/admin/admineditlinkview.class.php
   plog/trunk/class/view/admin/admineditsiteblogview.class.php
   plog/trunk/class/view/admin/adminedittemplatefileview.class.php
   plog/trunk/class/view/admin/adminedittemplateview.class.php
   plog/trunk/class/view/admin/adminlinkcategorieslistview.class.php
   plog/trunk/class/view/admin/adminlinkslistview.class.php
   plog/trunk/class/view/admin/adminnewlinkview.class.php
   plog/trunk/class/view/admin/adminpostslistview.class.php
   plog/trunk/class/view/admin/adminreferrersview.class.php
   plog/trunk/class/view/admin/adminsiteblogslistview.class.php
   plog/trunk/class/view/admin/adminsiteuserslistview.class.php
   plog/trunk/locale/admin/locale_en_UK.php
   plog/trunk/templates/admin/createblog.template
   plog/trunk/templates/admin/createuser.template
   plog/trunk/templates/admin/editarticlecategory.template
   plog/trunk/templates/admin/editblog.template
   plog/trunk/templates/admin/editcomment.template
   plog/trunk/templates/admin/editcomments.template
   plog/trunk/templates/admin/editcomments_table.template
   plog/trunk/templates/admin/editcustomfield.template
   plog/trunk/templates/admin/editlink.template
   plog/trunk/templates/admin/editlinkcategory.template
   plog/trunk/templates/admin/editlinks_table.template
   plog/trunk/templates/admin/editpost.template
   plog/trunk/templates/admin/edittemplatefile.template
   plog/trunk/templates/admin/menus.xml
   plog/trunk/templates/admin/newcustomfield.template
   plog/trunk/templates/admin/newlink.template
   plog/trunk/templates/admin/newlinkcategory.template
   plog/trunk/templates/admin/newpost.template
   plog/trunk/templates/admin/newpostcategory.template
   plog/trunk/templates/admin/siteblogs_table.template
   plog/trunk/templates/admin/userprofile.template
Log:
Quite many files changes, but with this change we ensure that even if javascript is disabled or not working, Lifetype can still operate more or less at the same level than when javascript is available.


Modified: plog/trunk/class/action/action.class.php
===================================================================
--- plog/trunk/class/action/action.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/action.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -185,6 +185,11 @@
 			return( new AjaxView());
 		}
 		
+		function getXHRErrorView()
+		{
+			
+		}
+		
 		/**
 		 * This method will be called when a validation error happens. Child classes are
 		 * free to extend or reimplement this one and can be used as some sort of a trigger
@@ -196,7 +201,7 @@
 		{
 			$this->_form->setFormIsValid( false );
 			
-			if( $this->_request->isAjax()) {
+			if( $this->_request->isXHR()) {
 				// if the output happens to be 'json'/ajax, then we can do some lighter processing
 				// all we need to output whenever there is a validation error when using ajax
 				// is the error message adn the FormValidator object containing information about
@@ -205,6 +210,9 @@
 				$this->_view->setSuccess( false );
 				$this->_view->setErrorMessage( $this->_validationErrorView->getErrorMessage());
 				$this->_view->setValue( "form", $this->_form );
+				
+				if( $this->_view instanceof AdminView )
+					$this->setCommonData();
 			}
 			else {
 				// this is the normal processing for html views
@@ -217,7 +225,7 @@
 					$this->_view->setValue( "$fieldName", $fieldValue );
 				}				
 				
-				$this->setCommonData();				
+				$this->setCommonData();
 			}
 	
 			return true;

Modified: plog/trunk/class/action/admin/adminaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -202,7 +202,7 @@
         function mustAuthenticatePage()
         {
 			$locale = $this->getLocale();
-			if( $this->_request->isAjax()) {
+			if( $this->_request->isXHR()) {
 				// if the client is expecting ajax output, then we should return an error
 				// message in json format
 				$view = $this->getAjaxErrorView();
@@ -335,8 +335,16 @@
 		 */
 		function getAjaxErrorView()
 		{
-			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );			
-			return( new AdminAjaxView( $this->_blogInfo ));
+			if( $this->_request->getOutput() == Request::REQUEST_OUTPUT_JSON ) {
+				lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+				$view = new AdminAjaxView( $this->_blogInfo );
+			}
+			else {
+				lt_include( PLOG_CLASS_PATH."class/view/admin/adminerrordialogview.class.php" );
+				$view = new AdminErrorDialogView( $this->_blogInfo );				
+			}
+			
+			return( $view );
 		}		
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/adminadduseraction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminadduseraction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminadduseraction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -150,7 +150,7 @@
 	
 			$result = $this->addUser();
 			if( $result )
-            	$this->_view->setSuccessMessage( $this->_locale->pr("user_added_ok", $user->getUsername()));
+            	$this->_view->setSuccessMessage( $this->_locale->pr("user_added_ok", $result->getUsername()));
 			else
 				$this->_view->setErrorMessage( $this->_locale->tr("error_adding_user" ));
 			

Modified: plog/trunk/class/action/admin/adminblogcustomfieldsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminblogcustomfieldsaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminblogcustomfieldsaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -29,5 +29,10 @@
 			$this->_view = new AdminCustomFieldsListView( $this->_blogInfo );
 			$this->setCommonData();
         }
+
+		function performAjax()
+		{
+			return( $this->perform());
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/admincreateblogaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admincreateblogaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admincreateblogaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -24,5 +24,10 @@
 
             return true;
         }
+
+		function performAjax()
+		{
+			return( $this->perform());
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/admincreateuseraction.class.php
===================================================================
--- plog/trunk/class/action/admin/admincreateuseraction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admincreateuseraction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -25,5 +25,10 @@
 
             return true;
         }
+
+		function performAjax()
+		{
+			return( $this->perform());
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/admindeletelinkaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admindeletelinkaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admindeletelinkaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -118,4 +118,4 @@
             return( Array( "errorMessage" => $errorMessage, "successMessage" => $successMessage ));
         }
     }
-?>
+?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/admindeletepostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admindeletepostaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admindeletepostaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -136,12 +136,11 @@
 			$results = $this->_deletePosts();
 			
 			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
-            $this->_view = new AdminAjaxView( $this->_blogInfo );
+	        $this->_view = new AdminAjaxView( $this->_blogInfo );
 			$this->_view->setMessage( $results );
 			$this->_view->setSuccess( true );
-
-            // better to return true if everything fine
-            return true;			
+			
+	        return true;
 		}                
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/admineditarticlecategoriesaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditarticlecategoriesaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditarticlecategoriesaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -38,15 +38,20 @@
 
 		function performAjax()
 		{
-			if( $this->_request->loadAllData()) {
+			if( $this->_request->getOutput() == Request::REQUEST_OUTPUT_JSON ) {
+				if( $this->_request->loadAllData()) {
+				}
+				else {
+					$categoriesListView = new AdminArticleCategoriesListView( $this->_blogInfo );
+					$categoriesListView->loadData();
+					lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
+					$this->_view = new AjaxViewRenderer( $categoriesListView );
+					$this->_view->setResultObject( "categories" );
+				}
 			}
 			else {
-				$categoriesListView = new AdminArticleCategoriesListView( $this->_blogInfo );
-				$categoriesListView->loadData();
-				lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
-				$this->_view = new AjaxViewRenderer( $categoriesListView );
-				$this->_view->setResultObject( "categories" );
-			}			
+				return( $this->perform());
+			}
 		}
     }
 ?>

Modified: plog/trunk/class/action/admin/admineditarticlecategoryaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditarticlecategoryaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditarticlecategoryaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -2,7 +2,8 @@
 
 	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/adminerrordialogview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminarticlecategorieslistview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminerrordialogview.class.php" );	
     lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
@@ -31,7 +32,7 @@
 			$this->registerFieldValidator( "categoryId", new IntegerValidator());
 			$this->_form->registerField( "categoryName" );
 			$this->_form->registerField( "categoryDescription" );
-			$errorView = new AdminErrorDialogView( $this->_blogInfo, $this->_locale->tr("error_incorrect_category_id"));
+			$errorView = new AdminArticleCategoriesListView( $this->_blogInfo, $this->_locale->tr("error_incorrect_category_id"));
 			$this->setValidationErrorView( $errorView );
 			
 			$this->requirePermission( "update_category" );
@@ -58,7 +59,11 @@
 			$category = $this->loadData();
             // show an error if we couldn't fetch the category
             if( !$category ) {
-            	$this->_view = new AdminErrorDialogView( $this->_blogInfo );
+				if( Request::isXHR())
+            		$this->_view = new AdminErrorDialogView( $this->_blogInfo );
+				else
+					$this->_view = new AdminArticleCategoriesListView( $this->_blogInfo );
+					
                 $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_category") );
 				$this->_view->setError( true );
                 $this->setCommonData();
@@ -67,7 +72,10 @@
             }
 			
             // otherwise show the form to edit its fields
-        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "editarticlecategory" );
+			if( $this->_request->isXHR())
+				$this->_view = new AdminTemplatedView( $this->_blogInfo, "editarticlecategory_form" );
+			else
+        		$this->_view = new AdminTemplatedView( $this->_blogInfo, "editarticlecategory" );
             $this->_view->setValue( "category", $category );
 			$this->_view->setValue( "categoryName", $category->getName());
 			$this->_view->setValue( "categoryDescription", $category->getDescription());
@@ -81,17 +89,22 @@
 
 		function performAjax()
 		{
-			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
-			$this->_view = new AdminAjaxView( $this->_blogInfo );
+			if( $this->_request->getOutput() == Request::REQUEST_OUTPUT_JSON ) {
+				lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+				$this->_view = new AdminAjaxView( $this->_blogInfo );
 			
-			$category = $this->loadData();
-			if( $category ) {
-				$this->_view->setSuccess( true );
-				$this->_view->setResult( $category );
+				$category = $this->loadData();
+				if( $category ) {
+					$this->_view->setSuccess( true );
+					$this->_view->setResult( $category );
+				}
+				else {
+					$this->_view->setSuccess( false );
+					$this->_view->setMessage( $this->_locale->tr("error_fetching_category" ));
+				}
 			}
 			else {
-				$this->_view->setSuccess( false );
-				$this->_view->setMessage( $this->_locale->tr("error_fetching_category" ));
+				return( $this->perform());
 			}
 		}
     }

Modified: plog/trunk/class/action/admin/admineditblogaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditblogaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditblogaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -60,5 +60,10 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			return( $this->perform());
+		}
     }
 ?>

Modified: plog/trunk/class/action/admin/admineditcommentaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditcommentaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditcommentaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -4,6 +4,7 @@
 	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminarticlecommentslistview.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminerrordialogview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminarticlecommentslistview.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );	
 
 	/**
@@ -17,7 +18,9 @@
 			$this->AdminAction( $actionInfo, $request );
 			
 			$this->registerFieldValidator( "commentId", new IntegerValidator());
-			$view = new AdminErrorDialogView( $this->_blogInfo, $this->_locale->tr( "error_incorrect_comment_id" ));
+			$view = new AdminArticleCommentsListView( $this->_blogInfo);
+			$view->setErrorMessage( $this->_locale->tr( "error_incorrect_comment_id" ));
+			$this->setValidationErrorView( $view );
 			
 			$this->requirePermission( "update_comment" );
 		}
@@ -39,7 +42,10 @@
 		function perform()
 		{
 			if(( $comment = $this->getComment())) {
-            	$this->_view = new AdminTemplatedView( $this->_blogInfo, "editcomment" );
+				if( Request::isXHR())
+            		$this->_view = new AdminTemplatedView( $this->_blogInfo, "editcomment_form" );
+				else
+					$this->_view = new AdminTemplatedView( $this->_blogInfo, "editcomment" );				
 
 	            $statusList = ArticleCommentStatus::getStatusList();
 	            $this->_view->setValue( "commentstatus", $statusList );
@@ -59,7 +65,12 @@
 				$this->_view->setValue( "articleId", $comment->getArticleId());
 			}
 			else {
-				$this->_view = new AdminErrorDialogView( $this->_blogInfo, $this->_locale->tr( "error_incorrect_comment_id" ));
+				if( Request::isXHR())				
+					$this->_view = new AdminErrorDialogView( $this->_blogInfo );
+				else
+					$this->_view = new AdminArticleCommentsListView( $this->_blogInfo );
+					
+				$this->_view->setErrorMessage( $this->_locale->tr( "error_incorrect_comment_id" ));
 			}
 			
 			$this->setCommonData();

Modified: plog/trunk/class/action/admin/admineditcommentsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditcommentsaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditcommentsaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -82,32 +82,36 @@
 		 */
 		function performAjax()
 		{			
-			$params = $this->loadViewParameters();			
-			if( (isset( $params["articleId"] )) && ($params["articleId"] > 0 )) {
-				$articles = new Articles();
-				$article = $articles->getBlogArticle( $params["articleId"], $this->_blogInfo->getId());
-				if( !$article ) {
-					lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
-					$view = new AdminAjaxView( $this->_blogInfo );
-					$view->setErrorMessage( $this->_locale->tr("error_fetching_article" ));				
-					return( false );
-				}			
+			if( $this->_request->getOutput() == Request::REQUEST_OUTPUT_JSON ) {
+				$params = $this->loadViewParameters();			
+				if( (isset( $params["articleId"] )) && ($params["articleId"] > 0 )) {
+					$articles = new Articles();
+					$article = $articles->getBlogArticle( $params["articleId"], $this->_blogInfo->getId());
+					if( !$article ) {
+						lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+						$view = new AdminAjaxView( $this->_blogInfo );
+						$view->setErrorMessage( $this->_locale->tr("error_fetching_article" ));				
+						return( false );
+					}			
+					else {
+						$params["article"] = $article;
+						$view = new AdminArticleCommentsListView( $this->_blogInfo, $params );
+					}
+				}
 				else {
-					$params["article"] = $article;
-					$view = new AdminArticleCommentsListView( $this->_blogInfo, $params );
+					// if there is no article id, then we will show all comments from all posts...
+					$view = new AdminArticleCommentsListView( $this->_blogInfo, $params );					
 				}
-			}
-			else {
-				// if there is no article id, then we will show all comments from all posts...
-				$view = new AdminArticleCommentsListView( $this->_blogInfo, $params );					
-			}
 			
-			$view->loadData();
-			lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
-			$this->_view = new AjaxViewRenderer( $view );
-			$this->_view->setResultObject( "comments" );
+				$view->loadData();
+				lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
+				$this->_view = new AjaxViewRenderer( $view );
+				$this->_view->setResultObject( "comments" );
 			
-			return( true );
+				return( true );
+			}
+			else
+				return( $this->perform());
 		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/admineditcustomfieldaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditcustomfieldaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditcustomfieldaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -23,7 +23,8 @@
 			
 			// validate data
 			$this->registerFieldValidator( "fieldId", new IntegerValidator());
-			$view = new AdminErrorDialogView( $this->_blogInfo, $this->_locale->tr( "error_fetching_custom_field" ));
+			$view = new AdminCustomFieldsListView( $this->_blogInfo );
+			$view->setErrorMessage( $this->_locale->tr( "error_fetching_custom_field" ));
 			$this->setValidationErrorView( $view );
 			
 			$this->requirePermission( "update_custom_field" );
@@ -50,10 +51,18 @@
             // show an error if we couldn't fetch the link
 			$field = $this->getCustomField();
             if( !$field ) {
-				$this->_view = new AdminErrorDialogView( $this->_blogInfo, $this->_locale->tr( "error_fetching_custom_field" ));
+				if( Request::isXHR())
+					$this->_view = new AdminErrorDialogView( $this->_blogInfo );
+				else
+					$this->_view = new AdminCustomFieldsListView( $this->_blogInfo );
+					
+				$this->_view->setErrorMessage( $this->_locale->tr( "error_fetching_custom_field" ));
             }
 			else {			
-				$this->_view = new AdminTemplatedView( $this->_blogInfo, "editcustomfield" );
+				if( Request::isXHR())
+					$this->_view = new AdminTemplatedView( $this->_blogInfo, "editcustomfield_form" );
+				else
+					$this->_view = new AdminTemplatedView( $this->_blogInfo, "editcustomfield" );
 				$this->_view->setValue( "fieldName", $field->getName());
 				$this->_view->setValue( "fieldDescription", $field->getDescription());
 				$this->_view->setValue( "fieldId", $field->getId());
@@ -71,14 +80,19 @@
 
 		function performAjax()
 		{
-			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
-			$this->_view = new AdminAjaxView( $this->_blogInfo );
-			$field = $this->getCustomField();
-			if( !$field )
-				$this->_view->setErrorMessage($this->_locale->tr("error_fetching_custom_field"));
+			if( $this->_request->getOutput() == Request::REQUEST_OUTPUT_JSON ) {
+				lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+				$this->_view = new AdminAjaxView( $this->_blogInfo );
+				$field = $this->getCustomField();
+				if( !$field )
+					$this->_view->setErrorMessage($this->_locale->tr("error_fetching_custom_field"));
+				else {
+					$this->_view->setSuccess( true );
+					$this->_view->setResult( $field );
+				}
+			}
 			else {
-				$this->_view->setSuccess( true );
-				$this->_view->setResult( $field );
+				return( $this->perform());
 			}
 			
 			return( false );

Modified: plog/trunk/class/action/admin/admineditlinkaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditlinkaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditlinkaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -33,7 +33,8 @@
 			$this->_form->registerField( "linkName" );
 			$this->_form->registerField( "linkRssFeed" );
 			$this->_form->registerField( "linkUrl" );
-			$view = new AdminErrorDialogView( $this->_blogInfo, $this->_locale->tr("error_fetching_link" ));
+			$view = new AdminLinksListView( $this->_blogInfo );
+			$view->setErrorMessage( $this->_locale->tr("error_fetching_link" ));
 			$this->setValidationErrorView( $view );
 
 			// permission checks
@@ -63,7 +64,13 @@
         {			
 			$link = $this->loadLink();
             if( !$link ) {
-                $this->_view = new AdminErrorDialogView( $this->_blogInfo, $this->_locale->tr("error_fetching_link" ));
+	
+				if( $this->_request->isXHR())
+		            $this->_view = new AdminErrorDialogView( $this->_blogInfo );
+				else
+                	$this->_view = new AdminLinksListView( $this->_blogInfo );
+
+				$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link" ));
                 $this->setCommonData();
                 return false;
             }			
@@ -83,19 +90,7 @@
 
 		function performAjax()
 		{
-			$link = $this->loadLink();
-			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
-			$this->_view = new AdminAjaxView( $this->_blogInfo );			
-			if( $link ) {
-				$this->_view->setSuccess( true );
-				$this->_view->setResult( $link );
-			}
-			else {
-				$this->_view->setSucess( false );
-				$this->_view->setMessage( $this->_locale->tr("error_fetching_link" ));
-			}
-			
-			return( false );
+			return( $this->perform());
 		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/admineditlinkcategoriesaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditlinkcategoriesaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditlinkcategoriesaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -40,27 +40,32 @@
 		 */
 		function performAjax()
 		{
-			if( $this->_request->loadAllData()) {
-				// in this case, we load all data
-				lt_include( PLOG_CLASS_PATH."class/dao/mylinkscategories.class.php" );
-				$blogSettings = $this->_blogInfo->getSettings();
-				$linkCategoriesOrder = $blogSettings->getValue( "link_categories_order", MYLINKS_CATEGORIES_NO_ORDER );			
-				// get the link categories
-	            $linkCategories = new MyLinksCategories();
-	            $blogLinkCategories = $linkCategories->getMyLinksCategories( $this->_blogInfo->getId(), 
-				                                                             $linkCategoriesOrder );
-				// pass it to the view
-				lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
-				$this->_view = new AdminAjaxView( $this->_blogInfo );
-				$this->_view->setSuccess( true );
-				$this->_view->setResult( $blogLinkCategories );															
+			if( $this->_request->getOutput() == Request::REQUEST_OUTPUT_JSON ) {
+				if( $this->_request->loadAllData()) {
+					// in this case, we load all data
+					lt_include( PLOG_CLASS_PATH."class/dao/mylinkscategories.class.php" );
+					$blogSettings = $this->_blogInfo->getSettings();
+					$linkCategoriesOrder = $blogSettings->getValue( "link_categories_order", MYLINKS_CATEGORIES_NO_ORDER );			
+					// get the link categories
+		            $linkCategories = new MyLinksCategories();
+		            $blogLinkCategories = $linkCategories->getMyLinksCategories( $this->_blogInfo->getId(), 
+					                                                             $linkCategoriesOrder );
+					// pass it to the view
+					lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+					$this->_view = new AdminAjaxView( $this->_blogInfo );
+					$this->_view->setSuccess( true );
+					$this->_view->setResult( $blogLinkCategories );															
+				}
+				else {
+					lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
+					$searchTerms = $this->_request->getValue( "searchTerms" );				
+					$this->_view = new AjaxViewRenderer( new AdminLinkCategoriesListView( $this->_blogInfo, Array( "searchTerms" => $searchTerms )));
+					$this->_view->setSuccess( true );
+					$this->_view->setResultObject( "linkcategories" );
+				}
 			}
 			else {
-				lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
-				$searchTerms = $this->_request->getValue( "searchTerms" );				
-				$this->_view = new AjaxViewRenderer( new AdminLinkCategoriesListView( $this->_blogInfo, Array( "searchTerms" => $searchTerms )));
-				$this->_view->setSuccess( true );
-				$this->_view->setResultObject( "linkcategories" );
+				return( $this->perform());
 			}
 			
 			return( true );

Modified: plog/trunk/class/action/admin/admineditlinkcategoryaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditlinkcategoryaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditlinkcategoryaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -3,6 +3,7 @@
 	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/adminerrordialogview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminlinkcategorieslistview.class.php" );	
     lt_include( PLOG_CLASS_PATH."class/dao/mylinkscategories.class.php" );
     lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
 
@@ -14,7 +15,6 @@
      */
     class AdminEditLinkCategoryAction extends AdminAction 
 	{
-
     	var $_categoryId;
 
     	/**
@@ -28,7 +28,8 @@
 			// data validation
 			$this->registerFieldValidator( "categoryId", new IntegerValidator());
 			$this->_form->registerField( "categoryName" );
-			$view = new AdminErrorDialogView( $this->_blogInfo, $this->_locale->tr("error_incorrect_link_category_id"));
+			$view = new AdminLinkCategoriesListView( $this->_blogInfo );
+			$view->setErrorMessage( $this->_locale->tr("error_fetching_link_category" ));
 			$this->setValidationErrorView( $view );
 			
 			// permission checks
@@ -57,14 +58,22 @@
         {
 			$category = $this->getLinkCategory();
 			if( !$category ) {
-				$this->_view = new AdminErrorDialogView( $this->_blogInfo );
+				if( Request::isXHR())
+					$this->_view = new AdminErrorDialogView( $this->_blogInfo );
+				else
+					$this->_view = new AdminLinkCategoriesListView( $this->_blogInfo, $this->_locale->tr("error_incorrect_link_category_id"));
+					
                 $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link_category"));
                 $this->setCommonData();
 				return( false );
 			}
 						
             // otherwise show the form to edit its fields
-        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "editlinkcategory" );
+			if( Request::isXHR())
+        		$this->_view = new AdminTemplatedView( $this->_blogInfo, "editlinkcategory_form" );
+			else
+				$this->_view = new AdminTemplatedView( $this->_blogInfo, "editlinkcategory" );
+							
 			$this->_view->setValue( "linkCategoryName", $category->getName());
 			$this->_view->setValue( "linkCategoryId", $category->getId());
             $this->setCommonData();
@@ -75,20 +84,25 @@
 
 		function performAjax()
 		{
-			$category = $this->getLinkCategory();
-			if( !$category ) {
-				$this->_view = $this->getAjaxErrorView();
-                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link_category"));
-				return( false );
-			}
+			if( $this->_request->getOutput() == Request::REQUEST_OUTPUT_JSON ) {
+				$category = $this->getLinkCategory();
+				if( !$category ) {
+					$this->_view = $this->getAjaxErrorView();
+	                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link_category"));
+					return( false );
+				}
 						
-            // otherwise show the form to edit its fields
-			lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
-        	$this->_view = new AdminAjaxView( $this->_blogInfo );
-			$this->_view->setResult( $category );
+	            // otherwise show the form to edit its fields
+				lt_include( PLOG_CLASS_PATH."class/view/admin/ajax/adminajaxview.class.php" );
+	        	$this->_view = new AdminAjaxView( $this->_blogInfo );
+				$this->_view->setResult( $category );
 
-            // better to return true if everything fine
-            return true;			
+	            // better to return true if everything fine
+	            return true;			
+			}
+			else {
+				return( $this->perform());
+			}
 		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/admineditlinksaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditlinksaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditlinksaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -58,17 +58,18 @@
 
 		function performAjax()
 		{
-			if( $this->_request->loadAllData()) {
-			}
-			else {
+			if( $this->_request->getOutput() == Request::REQUEST_OUTPUT_JSON ) {
 				$linksListView = new AdminLinksListView( $this->_blogInfo, Array( "showCategory" => $this->_categoryId,
 																 "searchTerms" => $this->_searchTerms, 			
-																 "showOrder" => $this->_linkCategoriesOrder ));
+															 "showOrder" => $this->_linkCategoriesOrder ));
 				$linksListView->loadData();
 				lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
 				$this->_view = new AjaxViewRenderer( $linksListView );
-				$this->_view->setResultObject( "links" );
+				$this->_view->setResultObject( "links" );				
 			}
+			else {
+				return( $this->perform());
+			}
 		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/admineditpostsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditpostsaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/admineditpostsaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -78,22 +78,27 @@
 		{
 			// use the same view class as in the perform() method 
 			// but then convert it to Ajax with the help of this view renderer
-			lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
-			// create the view
-			$articlesListView = new AdminPostsListView( $this->_blogInfo, 
-		    	Array( "showCategory" => $this->_request->getValue( "showCategory" ),
-		            	"showStatus" => $this->_request->getValue( "showStatus" ),
-						"showUser" => $this->_request->getValue( "showUser" ),
-						"showMonth" => $this->_request->getValue( "showMonth" ),
-						"searchTerms" => $this->_request->getValue( "searchTerms" ),
-						"showLocation" => $this->_request->getValue( "showLocation" )));
-			// inform it to load the data
-			$articlesListView->loadArticles();
-			// and finally attempt to convert it, it should work :)
-			$this->_view = new AjaxViewRenderer( $articlesListView );
-			$this->_view->setSuccess( true );
-			$this->_view->setResultObject( "posts" );			
-			return( true );
+			if( $this->_request->getOutput() == Request::REQUEST_OUTPUT_JSON ) {
+				lt_include( PLOG_CLASS_PATH."class/view/renderer/ajaxviewrenderer.class.php" );
+				// create the view
+				$articlesListView = new AdminPostsListView( $this->_blogInfo, 
+			    	Array( "showCategory" => $this->_request->getValue( "showCategory" ),
+			            	"showStatus" => $this->_request->getValue( "showStatus" ),
+							"showUser" => $this->_request->getValue( "showUser" ),
+							"showMonth" => $this->_request->getValue( "showMonth" ),
+							"searchTerms" => $this->_request->getValue( "searchTerms" ),
+							"showLocation" => $this->_request->getValue( "showLocation" )));
+				// inform it to load the data
+				$articlesListView->loadArticles();
+				// and finally attempt to convert it, it should work :)
+				$this->_view = new AjaxViewRenderer( $articlesListView );
+				$this->_view->setSuccess( true );
+				$this->_view->setResultObject( "posts" );			
+				return( true );
+			}
+			else {
+				return( $this->perform());
+			}
 		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/adminnewarticlecategoryaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminnewarticlecategoryaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminnewarticlecategoryaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -31,7 +31,11 @@
         function perform()
         {
         	// initialize the view
-        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "newpostcategory" );
+			if( Request::isXHR())
+        		$this->_view = new AdminTemplatedView( $this->_blogInfo, "newpostcategory_form" );
+			else
+				$this->_view = new AdminTemplatedView( $this->_blogInfo, "newpostcategory" );	
+				
             $this->setCommonData();
 
             // fetch the categories
@@ -46,5 +50,10 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			return( $this->perform());
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/adminnewcustomfieldaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminnewcustomfieldaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminnewcustomfieldaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -30,5 +30,14 @@
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "newcustomfield_form" );
+			$this->setCommonData();
+
+            // better to return true if everything fine
+            return true;			
+		}
     }
 ?>

Modified: plog/trunk/class/action/admin/adminnewlinkaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminnewlinkaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminnewlinkaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -54,6 +54,11 @@
 
             // better to return true if everything fine
             return true;
-        }        
+        }
+
+		function performAjax()
+		{
+			return( $this->perform());
+		}
     }
-?>
+?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/adminnewlinkcategoryaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminnewlinkcategoryaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminnewlinkcategoryaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -28,11 +28,20 @@
          */
         function perform()
         {
-        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "newlinkcategory" );
+			if( $this->_request->isXHR())
+        		$this->_view = new AdminTemplatedView( $this->_blogInfo, "newlinkcategory_form" );
+			else
+        		$this->_view = new AdminTemplatedView( $this->_blogInfo, "newlinkcategory" );
+
             $this->setCommonData();
 
             // better to return true if everything fine
             return true;
         }
+
+		function performAjax()
+		{
+			return( $this->perform());
+		}
     }
 ?>

Modified: plog/trunk/class/action/admin/adminsiteblogsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminsiteblogsaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminsiteblogsaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -27,5 +27,10 @@
 	        
             return true;
         }
+
+		function performAjax()
+		{
+			return( $this->perform());
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/action/admin/adminsiteusersaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminsiteusersaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminsiteusersaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -26,5 +26,10 @@
 
             return true;
         }
+
+		function performAjax()
+		{
+			return( $this->perform());
+		}
     }
 ?>

Modified: plog/trunk/class/action/admin/adminupdatetemplatefileaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdatetemplatefileaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminupdatetemplatefileaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -7,6 +7,7 @@
 	lt_include( PLOG_CLASS_PATH."class/template/templatesets/templatesets.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/template/editor/templatetools.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminsitetemplateslistview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminedittemplateview.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminedittemplatefileview.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/file/file.class.php" );
 
@@ -72,9 +73,25 @@
 			
 			$f = new File( $filePath );
 			$f->open( "w+" );
-			return( $f->write( $this->_request->getValue( "fileContent" )));			
+			return( $f->write( $this->_request->getValue( "fileContent" )));
 		}
 		
+		function perform()
+		{
+			$result = $this->writeFile();
+			
+			$this->_view = new AdminEditTemplateView( $this->_blogInfo, $this->_templateId, $this->_path );
+			
+			if( $result )
+				$this->_view->setSuccessMessage( $this->_locale->tr( "template_file_updated_ok" ));
+			else
+				$this->_view->setErrorMessage( $this->_locale->tr( "error_updating_template_file" ));			
+				
+			$this->setCommonData();
+			
+			return( true );			
+		}
+		
 		function performAjax()
 		{
 			$result = $this->writeFile();

Modified: plog/trunk/class/action/admin/adminupdateuserprofileaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdateuserprofileaction.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/action/admin/adminupdateuserprofileaction.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -68,9 +68,9 @@
 
             // if no info could be fetched, shown an error and quit
             if( !$user ) {
-            	//$this->_view = new AdminSiteUsersListView( $this->_blogInfo );
-                //$this->_view->setErrorMessage( $this->_locale->tr("error_invalid_user") );
-                //$this->setCommonData();
+            	$this->_view = new AdminSiteUsersListView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_invalid_user") );
+                $this->setCommonData();
                 return false;
             }
 			

Modified: plog/trunk/class/controller/controller.class.php
===================================================================
--- plog/trunk/class/controller/controller.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/controller/controller.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -341,7 +341,7 @@
 					$actionObject->setPreviousAction( $_plogController_previousAction );
 					
 					// determine whether we should be calling the Ajax stuff or the normal stuff
-					$request->isAjax() ? $method = "performAjax" : $method = "perform";
+					$request->isXHR() ? $method = "performAjax" : $method = "perform";
 					
 					if( $actionObject->canPerform()) {
 	                    // we can use the validate method to check the values of the form variables. If validate()

Modified: plog/trunk/class/net/request.class.php
===================================================================
--- plog/trunk/class/net/request.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/net/request.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -25,6 +25,8 @@
 
         var $_paramsRaw;
 		var $_stripSlashes;
+		
+		const REQUEST_OUTPUT_JSON = "json";
 
         /**
          * Initializes the request object
@@ -39,6 +41,7 @@
             	$this->Properties( $values );
 				
 			$this->_stripSlashes = true;
+
         }
 
 		function getRequest()
@@ -85,42 +88,6 @@
 		}
 		
 		/**
-		 * Returns true if the request is an Ajax request. Ajax requests are detected
-		 * based on the existence of a parameter called 'output' in the request, whose
-		 * whose value should be 'json' or 'ajax'
-		 *
-		 * @return True if the request is an Ajax request
-		 */
-		function isAjax()
-		{
-			return( strtolower($this->getOutput()) == "ajax" || strtolower($this->getOutput()) == "json" );
-		}
-		
-		/**
-		 * Returns true if the request has the "output" parameter set to "tableOnly". While this
-		 * is meaningless to most client classes, there are some views that require and make use
-		 * of this method.
-		 *
-		 * @return True if the request is an Ajax request
-		 */		
-		function isTableOnly()
-		{
-			return( strtolower($this->getOutput()) == "tableonly" );
-		}
-		
-		/**
-		 * Returns true if the request has the "output" parameter set to "formOnly". While this
-		 * is meaningless to most client classes, there are some views that require and make use
-		 * of this method.
-		 *
-		 * @return True if the request is an Ajax request
-		 */		
-		function isFormOnly()
-		{
-			return( strtolower($this->getOutput()) == "formonly" );
-		}		
-		
-		/**
 		 * Returns the value of the "output" parameter, used by some actions and views
 		 */
 		function getOutput()
@@ -137,5 +104,17 @@
 		{
 			return( $this->getValue( "all", "") == "all" || $this->getValue( "all", "" ) == "1" );			
 		}
+		
+		/**
+		 * Returns true if the request was made via XmlHttpRequest
+		 */
+		function isXHR()
+		{
+			if( isset( $_SERVER["HTTP_X_REQUESTED_WITH"] )) {
+				return( strtolower( $_SERVER["HTTP_X_REQUESTED_WITH"] ) == 'xmlhttprequest' ); 
+			}
+			else
+				return( false );
+		}
     }
 ?>
\ No newline at end of file

Modified: plog/trunk/class/view/admin/adminadduserview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminadduserview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminadduserview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -17,7 +17,10 @@
 	
 		function AdminAddUserView( $blogInfo )
 		{
-			$this->AdminTemplatedView( $blogInfo, 'createuser' );	
+			if( Request::isXHR())
+				$this->AdminTemplatedView( $blogInfo, 'createuser_form' );	
+			else
+				$this->AdminTemplatedView( $blogInfo, 'createuser' );				
 		}
 		
 		function render()

Modified: plog/trunk/class/view/admin/adminarticlecategorieslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminarticlecategorieslistview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminarticlecategorieslistview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -21,8 +21,7 @@
          */
         function AdminArticleCategoriesListView( $blogInfo, $page = 1 )
         {
-			$r =& Request::getRequest();
-			if( $r->isTableOnly())
+			if( Request::isXHR())
 				$template = "editarticlecategories_table";
 			else
         		$template ="editarticlecategories";

Modified: plog/trunk/class/view/admin/adminarticlecommentslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminarticlecommentslistview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminarticlecommentslistview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -21,8 +21,7 @@
 	
 		function AdminArticleCommentsListView( $blogInfo, $params = Array())
 		{
-			$r =& Request::getRequest();
-			if( $r->isTableOnly())
+			if( Request::isXHR())
 				$template = "editcomments_table";
 			else
         		$template = "editcomments";

Modified: plog/trunk/class/view/admin/adminbloguserslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminbloguserslistview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminbloguserslistview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -14,8 +14,7 @@
 	
 		function AdminBlogUsersListView( $blogInfo )
 		{
-			$r =& Request::getRequest();
-			if( $r->isTableOnly())			
+			if( Request::isXHR())			
 				$this->AdminTemplatedView( $blogInfo, "blogusers_table" );
 			else
 				$this->AdminTemplatedView( $blogInfo, "blogusers" );			

Modified: plog/trunk/class/view/admin/admincreateblogview.class.php
===================================================================
--- plog/trunk/class/view/admin/admincreateblogview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/admincreateblogview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -13,7 +13,10 @@
 	
 		function AdminCreateBlogView( $blogInfo )
 		{
-			$this->AdminTemplatedView( $blogInfo, "createblog" );			
+			if( Request::isXHR())
+				$this->AdminTemplatedView( $blogInfo, "createblog_form" );
+			else
+				$this->AdminTemplatedView( $blogInfo, "createblog" );
 		}
 		
 		function render()

Modified: plog/trunk/class/view/admin/admincustomfieldslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/admincustomfieldslistview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/admincustomfieldslistview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -17,8 +17,7 @@
 	
 		function AdminCustomFieldsListView( $blogInfo )
 		{
-			$r =& Request::getRequest();
-			if( $r->isTableOnly())
+			if( Request::isXHR())
 				$template = "customfields_table";
 			else
         		$template = "customfields";			

Modified: plog/trunk/class/view/admin/admineditlinkview.class.php
===================================================================
--- plog/trunk/class/view/admin/admineditlinkview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/admineditlinkview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -12,7 +12,10 @@
 		
 		function AdminEditLinkView( $blogInfo, $params = Array())
 		{
-			$this->AdminTemplatedView( $blogInfo, "editlink" );
+			if( Request::isXHR())
+				$this->AdminTemplatedView( $blogInfo, "editlink_form" );
+			else
+				$this->AdminTemplatedView( $blogInfo, "editlink" );			
 		}
 		
         /**

Modified: plog/trunk/class/view/admin/admineditsiteblogview.class.php
===================================================================
--- plog/trunk/class/view/admin/admineditsiteblogview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/admineditsiteblogview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -28,7 +28,10 @@
 			
 			// this stuff is a bit weird but I couldn't find a better way to do it!
 			if( $this->_editBlogInfo ) {
-				$this->AdminTemplatedView( $blogInfo, 'editblog' );
+				if( Request::isXHR())
+					$this->AdminTemplatedView( $blogInfo, 'editblog_form' );
+				else
+					$this->AdminTemplatedView( $blogInfo, 'editblog' );
 				$this->_error = false;
 				$this->setSessionValue( 'editBlogInfo', $this->_editBlogInfo );
 				// ...

Modified: plog/trunk/class/view/admin/adminedittemplatefileview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminedittemplatefileview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminedittemplatefileview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -6,7 +6,10 @@
 	{
 		function __construct( $blogInfo )
 		{
-			$this->AdminTemplatedView( $blogInfo, "edittemplatefile" );
+			if( Request::isXHR())
+				$this->AdminTemplatedView( $blogInfo, "edittemplatefile_form" );
+			else
+				$this->AdminTemplatedView( $blogInfo, "edittemplatefile" );			
 		}
 	}
 ?>
\ No newline at end of file

Modified: plog/trunk/class/view/admin/adminedittemplateview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminedittemplateview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminedittemplateview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -10,9 +10,7 @@
 		
 		function __construct( $blogInfo, $templateId, $path = "" )
 		{
-			
-			$r =& Request::getRequest();
-			if( $r->isTableOnly())			
+			if( Request::isXHR())			
 				$this->AdminTemplatedView( $blogInfo, "edittemplate_table" );
 			else
 				$this->AdminTemplatedView( $blogInfo, "edittemplate" );

Modified: plog/trunk/class/view/admin/adminlinkcategorieslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminlinkcategorieslistview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminlinkcategorieslistview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -16,8 +16,7 @@
 	
 		function AdminLinkCategoriesListView( $blogInfo, $params = Array())
 		{
-			$r =& Request::getRequest();
-			if( $r->isTableOnly())
+			if( Request::isXHR())
 				$template = "editlinkcategories_table";
 			else
         		$template = "editlinkcategories";

Modified: plog/trunk/class/view/admin/adminlinkslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminlinkslistview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminlinkslistview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -21,8 +21,7 @@
          */
         function AdminLinksListview( $blogInfo, $params = Array())
         {	
-			$r =& Request::getRequest();
-			if( $r->isTableOnly())
+			if( Request::isXHR())
 				$this->AdminTemplatedView( $blogInfo, "editlinks_table" );
 			else
         		$this->AdminTemplatedView( $blogInfo, "editlinks" );

Modified: plog/trunk/class/view/admin/adminnewlinkview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminnewlinkview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminnewlinkview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -20,8 +20,10 @@
          */
         function AdminNewLinkView( $blogInfo, $params = Array())
         {
-
-        	$this->AdminTemplatedView( $blogInfo, "newlink" );
+			if( Request::isXHR())
+        		$this->AdminTemplatedView( $blogInfo, "newlink_form" );
+			else
+				$this->AdminTemplatedView( $blogInfo, "newlink" );
         }
 
         /**

Modified: plog/trunk/class/view/admin/adminpostslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminpostslistview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminpostslistview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -31,8 +31,7 @@
 	
 		function AdminPostsListView( $blogInfo, $params = Array())
 		{
-			$r =& Request::getRequest();
-			if( $r->isTableOnly())
+			if( Request::isXHR())
 				$template = "editposts_table";
 			else
         		$template ="editposts";			

Modified: plog/trunk/class/view/admin/adminreferrersview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminreferrersview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminreferrersview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -12,8 +12,7 @@
 	
 		function AdminReferrersView( $blogInfo )
 		{
-			$r =& Request::getRequest();
-			if( $r->isTableOnly())			
+			if( Request::isXHR())			
 				$this->AdminTemplatedView( $blogInfo, "statistics_table" );
 			else
 				$this->AdminTemplatedView( $blogInfo, "statistics" );

Modified: plog/trunk/class/view/admin/adminsiteblogslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminsiteblogslistview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminsiteblogslistview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -21,8 +21,7 @@
 		{
 			$this->_pagerUrl = "?op=editSiteBlogs";
 			if( $this->_templateName == "" )
-				$r =& Request::getRequest();
-				if( $r->isTableOnly())			
+				if( Request::isXHR())			
 					$this->_templateName = "siteblogs_table";
 				else
 					$this->_templateName = "siteblogs";

Modified: plog/trunk/class/view/admin/adminsiteuserslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminsiteuserslistview.class.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/class/view/admin/adminsiteuserslistview.class.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -25,8 +25,7 @@
 		function AdminSiteUsersListView( $blogInfo )
 		{
 			if( $this->_templateName == "" ) {
-				$r =& Request::getRequest();
-				if( $r->isTableOnly())
+				if( Request::isXHR())
 					$this->_templateName = "siteusers_table";
 				else
 					$this->_templateName = "siteusers";

Modified: plog/trunk/locale/admin/locale_en_UK.php
===================================================================
--- plog/trunk/locale/admin/locale_en_UK.php	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/locale/admin/locale_en_UK.php	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1309,4 +1309,6 @@
 $messages['error_deleting_template_file'] = 'error_deleting_template_file';
 $messages['new_folder'] = 'New Folder';
 $messages['upload_file'] = 'Upload file';
+
+$messages['editTemplateFile'] = 'Edit Template File';
 ?>
\ No newline at end of file

Modified: plog/trunk/templates/admin/createblog.template
===================================================================
--- plog/trunk/templates/admin/createblog.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/createblog.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,53 +1,7 @@
- <form id="addBlog" name="addBlog" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Blogs.addSubmitHook(this);return(false);">
-   <fieldset class="inputField">
-     <legend>{$locale->tr("createBlog")}</legend>
-    {include file="$admintemplatepath/formvalidateajax.template"}   
-     <div class="field">
-       <label for="blogName">{$locale->tr("name")}</label>
-       <span class="required">*</span>
-       <div class="formHelp">{$locale->tr("blog_name_help")}</div>
-       <input type="text" style="width:95%" name="blogName" id="blogName" value="{$blogName}"/>
-       {include file="$admintemplatepath/validateajax.template" field=blogName}
-     </div>
-	
-    {if $blogDomainsEnabled}
-    <div class="field">
-      <label for="blogSubDomain">{$locale->tr("domain")}</label>
-      <div class="formHelp">{$locale->tr("register_blog_domain_help")}</div>
-      <input type="text" name="blogSubDomain" id="blogSubDomain" 
-             style="width:150px" value="{$blogSubDomain}" />
-      <select name="blogMainDomain" id="blogMainDomain">
-       {foreach from=$blogAvailableDomains item=domain}
-        <option value="{$domain}"
-             {if $domain == $blogMainDomain}selected{/if}>
-             {if $domain == "?"}
-               {$locale->tr("subdomains_any_domain")}
-             {else}
-               .{$domain}
-             {/if}
-        </option>
-       {/foreach}
-      </select>
-      {include file="$admintemplatepath/validateajax.template" field=blogSubDomain}
-      {include file="$admintemplatepath/validateajax.template" field=blogMainDomain}
-    </div>
-    {/if}
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editSiteBlogs title=$locale->tr("createBlog")}
 
-     <div class="field">
-       <label for="blogOwner">{$locale->tr("owner")}</label>
-       <span class="required">*</span>
-       <div class="formHelp">{$locale->tr("blog_owner_help")}</div>
-       <input type="text" name="userName" id="userName" style="width:40%" value="{$userName}" readonly="readonly" />
-	   <input type="hidden" name="userId" id="userId" value="{$userId}" />
-	   <a href="#" onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">
-	    {$locale->tr("select")}
-	   </a>	
-       {include file="$admintemplatepath/validateajax.template" field=userId}	   
-     </div>
-    </fieldset>
-    <div class="buttons">
-       <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
-       <input type="submit" name="Add Blog" value="{$locale->tr("add")}"/>
-       <input type="hidden" name="op" value="addBlog" />
-    </div>
- </form>
\ No newline at end of file
+{include file="$admintemplatepath/createblog_form.template"}
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/createblog_form.template
===================================================================
--- plog/trunk/templates/admin/createblog_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/createblog_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,53 @@
+ <form id="addBlog" name="addBlog" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Blogs.addSubmitHook(this);return(false);">
+   <fieldset class="inputField">
+     <legend>{$locale->tr("createBlog")}</legend>
+    {include file="$admintemplatepath/formvalidateajax.template"}   
+     <div class="field">
+       <label for="blogName">{$locale->tr("name")}</label>
+       <span class="required">*</span>
+       <div class="formHelp">{$locale->tr("blog_name_help")}</div>
+       <input type="text" style="width:95%" name="blogName" id="blogName" value="{$blogName}"/>
+       {include file="$admintemplatepath/validateajax.template" field=blogName}
+     </div>
+	
+    {if $blogDomainsEnabled}
+    <div class="field">
+      <label for="blogSubDomain">{$locale->tr("domain")}</label>
+      <div class="formHelp">{$locale->tr("register_blog_domain_help")}</div>
+      <input type="text" name="blogSubDomain" id="blogSubDomain" 
+             style="width:150px" value="{$blogSubDomain}" />
+      <select name="blogMainDomain" id="blogMainDomain">
+       {foreach from=$blogAvailableDomains item=domain}
+        <option value="{$domain}"
+             {if $domain == $blogMainDomain}selected{/if}>
+             {if $domain == "?"}
+               {$locale->tr("subdomains_any_domain")}
+             {else}
+               .{$domain}
+             {/if}
+        </option>
+       {/foreach}
+      </select>
+      {include file="$admintemplatepath/validateajax.template" field=blogSubDomain}
+      {include file="$admintemplatepath/validateajax.template" field=blogMainDomain}
+    </div>
+    {/if}
+
+     <div class="field">
+       <label for="blogOwner">{$locale->tr("owner")}</label>
+       <span class="required">*</span>
+       <div class="formHelp">{$locale->tr("blog_owner_help")}</div>
+       <input type="text" name="userName" id="userName" style="width:40%" value="{$userName}" readonly="readonly" />
+	   <input type="hidden" name="userId" id="userId" value="{$userId}" />
+	   <a href="#" onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">
+	    {$locale->tr("select")}
+	   </a>	
+       {include file="$admintemplatepath/validateajax.template" field=userId}	   
+     </div>
+    </fieldset>
+    <div class="buttons">
+       <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
+       <input type="submit" name="Add Blog" value="{$locale->tr("add")}"/>
+       <input type="hidden" name="op" value="addBlog" />
+    </div>
+ </form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/createuser.template
===================================================================
--- plog/trunk/templates/admin/createuser.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/createuser.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,75 +1,7 @@
-<form id="addUser" name="addUser" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Users.addSubmitHook(this);return(false);">
-  <fieldset class="inputField">
-    <legend>{$locale->tr("createUser")}</legend>
-   {include file="$admintemplatepath/formvalidateajax.template"}
-	<div style="float:left;width:50%">
-    <div class="field">
-      <label for="userName">{$locale->tr("username")}</label>
-      <span class="required">*</span>
-      <div class="formHelp">{$locale->tr("username_help")}</div>
-      <input type="text" name="userName" value="{$userName}" id="userName" />
-      {include file="$admintemplatepath/validateajax.template" field=userName}
-    </div>
-    <div class="field">
-      <label for="userFullName">{$locale->tr("full_name")}</label>
-      <div class="formHelp">{$locale->tr("full_name_help")}</div>
-      <input type="text" name="userFullName" value="{$userFullName}" id="userFullName" />
-    </div>
-    <div class="field">
-      <label for="newUserPassword">{$locale->tr("password")}</label>
-      <span class="required">*</span>
-      <div class="formHelp">{$locale->tr("password_help")}</div>
-      <input type="password" name="newUserPassword" value="{$newUserPassword}" id="newUserPassword" />
-      {include file="$admintemplatepath/validateajax.template" field=newUserPassword}
-    </div>
-    <div class="field">
-      <label for="userEmail">{$locale->tr("email")}</label>
-      <span class="required">*</span>
-      <div class="formHelp">{$locale->tr("email_help")}</div>
-      <input type="text" name="userEmail" value="{$userEmail}" id="userEmail" />
-      {include file="$admintemplatepath/validateajax.template" field=userEmail}
-    </div>
-	<div class="field">
-	  <label for="userStatus">{$locale->tr("status")}</label>
-	  <span class="required">*</span>
-	  <div class="formHelp">{$locale->tr("user_status_help")}</div>
-	  <select name="userStatus" id="userStatus">
-	   {foreach from=$userStatusList item=status key=statusKey}
-	     <option value="{$status}" {if $userStatus==$status}selected="selected"{/if}>{$locale->tr($statusKey)}</option>
-	   {/foreach}
-	  </select>
-	</div>
-	</div>
-	<div style="float:right;width:50%">
-    <div class="field">
-      <label for="userBlog">{$locale->tr("blog")}</label>
-      <div class="formHelp">{$locale->tr("user_blog_help")}</div>
-	  <input type="hidden" name="blogId" id="blogId" value="{$blogId}" />
-	  <input type="text" name="blogName" id="blogName" style="width:50%" readonly="readonly" value="{$blogName}" />
-	  <a href="#" onclick="window.open('?op=siteBlogsChooser','BlogChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">
-	   {$locale->tr("select")}
-	  </a> 
-      {include file="$admintemplatepath/validateajax.template" field=blogId}
-    </div>		
-	<div class="field">
-		<label for="userPermissions">{$locale->tr("permissions")}</label>
-		<div class="formHelp">{$locale->tr("admin_user_permissions_help")}</div>
-		<div id="permissions" style="overflow:auto;height:300px;">
-		{foreach from=$permissions item=perm}
-			{if $perm->isAdminOnlyPermission()}
-			  {assign var=permId value=$perm->getId()}
-			  <input type="checkbox" class="checkbox" name="userPermissions[{$perm->getId()}]" value="{$perm->getId()}" {if $userPermissions[$permId]}checked="checked"{/if} />
-			  {assign var=permDesc value=$perm->getDescription()}
-			  {$locale->tr($permDesc)}<br/>
-			{/if}
-		{/foreach}
-		</div>
-    </div>
-    </div>
-  </fieldset>
-  <div class="buttons">
-    <input type="reset" name="resetButton" value="{$locale->tr("reset")}"/>
-    <input type="submit" name="Add User" value="{$locale->tr("add")}"/>
-    <input type="hidden" name="op" value="addUser" />
-  </div>
- </form>
\ No newline at end of file
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editSiteUsers title=$locale->tr("createUser")}
+
+{include file="$admintemplatepath/createuser_form.template"}
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/createuser_form.template
===================================================================
--- plog/trunk/templates/admin/createuser_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/createuser_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,75 @@
+<form id="addUser" name="addUser" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Users.addSubmitHook(this);return(false);">
+  <fieldset class="inputField">
+    <legend>{$locale->tr("createUser")}</legend>
+   {include file="$admintemplatepath/formvalidateajax.template"}
+	<div style="float:left;width:50%">
+    <div class="field">
+      <label for="userName">{$locale->tr("username")}</label>
+      <span class="required">*</span>
+      <div class="formHelp">{$locale->tr("username_help")}</div>
+      <input type="text" name="userName" value="{$userName}" id="userName" />
+      {include file="$admintemplatepath/validateajax.template" field=userName}
+    </div>
+    <div class="field">
+      <label for="userFullName">{$locale->tr("full_name")}</label>
+      <div class="formHelp">{$locale->tr("full_name_help")}</div>
+      <input type="text" name="userFullName" value="{$userFullName}" id="userFullName" />
+    </div>
+    <div class="field">
+      <label for="newUserPassword">{$locale->tr("password")}</label>
+      <span class="required">*</span>
+      <div class="formHelp">{$locale->tr("password_help")}</div>
+      <input type="password" name="newUserPassword" value="{$newUserPassword}" id="newUserPassword" />
+      {include file="$admintemplatepath/validateajax.template" field=newUserPassword}
+    </div>
+    <div class="field">
+      <label for="userEmail">{$locale->tr("email")}</label>
+      <span class="required">*</span>
+      <div class="formHelp">{$locale->tr("email_help")}</div>
+      <input type="text" name="userEmail" value="{$userEmail}" id="userEmail" />
+      {include file="$admintemplatepath/validateajax.template" field=userEmail}
+    </div>
+	<div class="field">
+	  <label for="userStatus">{$locale->tr("status")}</label>
+	  <span class="required">*</span>
+	  <div class="formHelp">{$locale->tr("user_status_help")}</div>
+	  <select name="userStatus" id="userStatus">
+	   {foreach from=$userStatusList item=status key=statusKey}
+	     <option value="{$status}" {if $userStatus==$status}selected="selected"{/if}>{$locale->tr($statusKey)}</option>
+	   {/foreach}
+	  </select>
+	</div>
+	</div>
+	<div style="float:right;width:50%">
+    <div class="field">
+      <label for="userBlog">{$locale->tr("blog")}</label>
+      <div class="formHelp">{$locale->tr("user_blog_help")}</div>
+	  <input type="hidden" name="blogId" id="blogId" value="{$blogId}" />
+	  <input type="text" name="blogName" id="blogName" style="width:50%" readonly="readonly" value="{$blogName}" />
+	  <a href="#" onclick="window.open('?op=siteBlogsChooser','BlogChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">
+	   {$locale->tr("select")}
+	  </a> 
+      {include file="$admintemplatepath/validateajax.template" field=blogId}
+    </div>		
+	<div class="field">
+		<label for="userPermissions">{$locale->tr("permissions")}</label>
+		<div class="formHelp">{$locale->tr("admin_user_permissions_help")}</div>
+		<div id="permissions" style="overflow:auto;height:300px;">
+		{foreach from=$permissions item=perm}
+			{if $perm->isAdminOnlyPermission()}
+			  {assign var=permId value=$perm->getId()}
+			  <input type="checkbox" class="checkbox" name="userPermissions[{$perm->getId()}]" value="{$perm->getId()}" {if $userPermissions[$permId]}checked="checked"{/if} />
+			  {assign var=permDesc value=$perm->getDescription()}
+			  {$locale->tr($permDesc)}<br/>
+			{/if}
+		{/foreach}
+		</div>
+    </div>
+    </div>
+  </fieldset>
+  <div class="buttons">
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}"/>
+    <input type="submit" name="Add User" value="{$locale->tr("add")}"/>
+    <input type="hidden" name="op" value="addUser" />
+  </div>
+ </form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/editarticlecategory.template
===================================================================
--- plog/trunk/templates/admin/editarticlecategory.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editarticlecategory.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,35 +1,7 @@
-<form name="editArticleCategory" id="editArticleCategory" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.ArticleCategories.updateSubmitHook(this);return(false);">
-  <fieldset class="inputField">
-   <legend>{$locale->tr("editArticleCategories")}</legend>
-   {include file="$admintemplatepath/formvalidateajax.template"}
-   <div class="field">
-    <label for="categoryName">{$locale->tr("name")}</label>
-    <span class="required">*</span>
-    <div class="formHelp">{$locale->tr("category_name_help")}</div>
-    <input type="text" id="categoryName" name="categoryName" value="{$categoryName|escape:"html"}"/>
-    {include file="$admintemplatepath/validateajax.template" field=categoryName}
-   </div>
-   <div class="field">
-    <label for="categoryDescription">{$locale->tr("description")}</label>
-    <span class="required"></span>
-    <div class="formHelp">{$locale->tr("category_description_help")}</div>
-    <textarea name="categoryDescription" id="categoryDescription" cols="60" rows="5">{$categoryDescription}</textarea>
-    {include file="$admintemplatepath/validateajax.template" field=categoryDescription}
-  </div>
-   <div class="field">
-    <label for="categoryInMainPage">{$locale->tr("show_in_main_page")}</label>
-    <span class="required"></span>
-    <div class="formHelp">
-      <input class="checkbox" type="checkbox" value="1" id="categoryInMainPage" name="categoryInMainPage" {if $categoryInMainPage}checked="checked"{/if}/>	
-	  {$locale->tr("show_in_main_page_help")}
-	</div>  
-   </div>
-  </fieldset>
-  <div class="buttons">   
-    <input type="hidden" name="categoryUrl" value="" />
-    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
-    <input type="submit" name="Update" value="{$locale->tr("update")}" />
-    <input type="hidden" name="op" value="updateArticleCategory" />
-    <input type="hidden" name="categoryId" value="{$categoryId}" />
-  </div>
-</form>
\ No newline at end of file
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editArticleCategories title=$locale->tr("editArticleCategories")}
+
+{include file="$admintemplatepath/editarticlecategory_form.template"}
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/editarticlecategory_form.template
===================================================================
--- plog/trunk/templates/admin/editarticlecategory_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/editarticlecategory_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,35 @@
+<form name="editArticleCategory" id="editArticleCategory" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.ArticleCategories.updateSubmitHook(this);return(false);">
+  <fieldset class="inputField">
+   <legend>{$locale->tr("editArticleCategories")}</legend>
+   {include file="$admintemplatepath/formvalidateajax.template"}
+   <div class="field">
+    <label for="categoryName">{$locale->tr("name")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("category_name_help")}</div>
+    <input type="text" id="categoryName" name="categoryName" value="{$categoryName|escape:"html"}"/>
+    {include file="$admintemplatepath/validateajax.template" field=categoryName}
+   </div>
+   <div class="field">
+    <label for="categoryDescription">{$locale->tr("description")}</label>
+    <span class="required"></span>
+    <div class="formHelp">{$locale->tr("category_description_help")}</div>
+    <textarea name="categoryDescription" id="categoryDescription" cols="60" rows="5">{$categoryDescription}</textarea>
+    {include file="$admintemplatepath/validateajax.template" field=categoryDescription}
+  </div>
+   <div class="field">
+    <label for="categoryInMainPage">{$locale->tr("show_in_main_page")}</label>
+    <span class="required"></span>
+    <div class="formHelp">
+      <input class="checkbox" type="checkbox" value="1" id="categoryInMainPage" name="categoryInMainPage" {if $categoryInMainPage}checked="checked"{/if}/>	
+	  {$locale->tr("show_in_main_page_help")}
+	</div>  
+   </div>
+  </fieldset>
+  <div class="buttons">   
+    <input type="hidden" name="categoryUrl" value="" />
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
+    <input type="submit" name="Update" value="{$locale->tr("update")}" />
+    <input type="hidden" name="op" value="updateArticleCategory" />
+    <input type="hidden" name="categoryId" value="{$categoryId}" />
+  </div>
+</form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/editblog.template
===================================================================
--- plog/trunk/templates/admin/editblog.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editblog.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,96 +1,7 @@
- <form id="blogSettings" name="blogSettings" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Blogs.updateSubmitHook(this);return(false);">
-   <fieldset class="inputField">
-    <legend>{$locale->tr("editBlog")}</legend>
-	{include file="$admintemplatepath/formvalidateajax.template"}
-	<div style="float:left;width:50%">
-    <div class="field">
-      <label for="ro_blogLink">{$locale->tr("blog_link")}</label>
-      <span class="required"></span>
-      <div class="formHelp">{$locale->tr("blog_link_help")}</div>
-      {assign var=editBlogUrlGenerator value=$editblog->getBlogRequestGenerator()} 
-      <input style="width:100%" type="text" readonly="readonly" id="ro_blogLink" name="ro_blogLink" class="readOnly" value="{$editBlogUrlGenerator->blogLink()}" />
-    </div>
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editSiteBlogs title=$locale->tr("editBlog")}
 
-    {if $blogDomainsEnabled}
-    <div class="field">
-      <label for="blogSubDomain">{$locale->tr("domain")}</label>
-      <div class="formHelp">{$locale->tr("register_blog_domain_help")}</div>
-      <input type="text" name="blogSubDomain" id="blogSubDomain" style="width:150px" value="{$blogSubDomain}" />
-      <select name="blogMainDomain" id="blogMainDomain">
-       {foreach from=$blogAvailableDomains item=domain}
-        <option value="{$domain}"
-             {if $domain == $blogMainDomain}selected{/if}>
-             {if $domain == "?"}
-               {$locale->tr("subdomains_any_domain")}
-             {else}
-               .{$domain}
-             {/if}
-        </option>
-       {/foreach}
-      </select>
-      {include file="$admintemplatepath/validateajax.template" field=blogSubDomain}
-      {include file="$admintemplatepath/validateajax.template" field=blogMainDomain}
-    </div>
-    {/if}
+{include file="$admintemplatepath/editblog_form.template"}
 
-
-    <div class="field">
-      <label for="blogName">{$locale->tr("name")}</label>
-      <span class="required">*</span>
-      <div class="formHelp">{$locale->tr("blog_name_help")}</div>
-      <input type="text" name="blogName" style="width:100%" id="blogName" value="{$blogName|escape:"html"}" />
-       {include file="$admintemplatepath/validateajax.template" field=blogName}
-    </div>
-
-    <div class="field">
-      <label for="blogStatus">{$locale->tr("status")}</label>
-      <span class="required">*</span>
-      <div class="formHelp">{$locale->tr("blog_status_help")}</div>
-      <select name="blogStatus" id="blogStatus">
-	{foreach from=$blogStatusList key=statusName item=blogStatusValue}
-	 <option value="{$blogStatusValue}" {if $blogStatus==$blogStatusValue}selected="selected"{/if}>{$locale->tr($statusName)}</option>
-	{/foreach}
-       </select>
-    </div>
-
-    <div class="field">
-      <label for="blogOwner">{$locale->tr("owner")}</label>
-      <span class="required">*</span>
-      <div class="formHelp">{$locale->tr("blog_owner_help")}</div>
-	  <input type="hidden" id="userId" name="userId" value="{if $userId==""}{$blogOwnerInfo->getId()}{else}{$userId}{/if}" />
-	  <input type="text" id="userName" name="userName" value="{if $userName==""}{$blogOwnerInfo->getUsername()}{else}{$userName}{/if}" style="width:50%" readonly="readonly"/>
-	  <a href="#" title="UserChooser" onClick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');return(false);">
-	   {$locale->tr("select")}
-	   </a>
-       {include file="$admintemplatepath/validateajax.template" field=userId}	   	   
-    </div>
-
-    <div class="field">
-     <label for="blogResourcesQuota">{$locale->tr("quota")}</label>
-     <div class="formHelp">{$locale->tr("blog_quota_help")}</div>
-     <input type="text" id="blogResourcesQuota" name="blogResourcesQuota" value="{$blogResourcesQuota}" />
-     {include file="$admintemplatepath/validate.template" field=blogResourcesQuota}
-    </div>
-	</div>
-	<div style="float:right;width:50%">
-    <div class="field">
-	<label for="blog_users">{$locale->tr("users")}</label>
-        <div class="formHelp">{$locale->tr("blog_users_help")}</div>
-	   {assign var=owner value=$editblog->getOwnerInfo()}
-	   <div style="overflow:auto;height:250px">
-	   {foreach from=$blogusers item=bloguser}
-	    {if $owner->getUsername() != $bloguser->getUsername()}
-  	      {check_perms adminperm=edit_blog_admin_mode}<a href="?op=adminBlogSelect&amp;blogId={$editblog->getId()}&amp;action=editBlogUser&amp;userId={$bloguser->getId()}">{/check_perms}{$bloguser->getUsername()}{check_perms adminperm=edit_blog_admin_mode}</a>{/check_perms}<br/>
-        {/if} 
-        </div> 
-	   {/foreach}
-       </div>
-     </div>
-    </fieldset>
-    <div class="buttons">
-      <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
-      <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}" />
-      <input type="hidden" name="op" value="updateEditBlog" />
-      <input type="hidden" name="blogId" value="{$editblog->getId()}"/>
-    </div>
- </form>
\ No newline at end of file
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/editblog_form.template
===================================================================
--- plog/trunk/templates/admin/editblog_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/editblog_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,96 @@
+ <form id="blogSettings" name="blogSettings" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Blogs.updateSubmitHook(this);return(false);">
+   <fieldset class="inputField">
+    <legend>{$locale->tr("editBlog")}</legend>
+	{include file="$admintemplatepath/formvalidateajax.template"}
+	<div style="float:left;width:50%">
+    <div class="field">
+      <label for="ro_blogLink">{$locale->tr("blog_link")}</label>
+      <span class="required"></span>
+      <div class="formHelp">{$locale->tr("blog_link_help")}</div>
+      {assign var=editBlogUrlGenerator value=$editblog->getBlogRequestGenerator()} 
+      <input style="width:100%" type="text" readonly="readonly" id="ro_blogLink" name="ro_blogLink" class="readOnly" value="{$editBlogUrlGenerator->blogLink()}" />
+    </div>
+
+    {if $blogDomainsEnabled}
+    <div class="field">
+      <label for="blogSubDomain">{$locale->tr("domain")}</label>
+      <div class="formHelp">{$locale->tr("register_blog_domain_help")}</div>
+      <input type="text" name="blogSubDomain" id="blogSubDomain" style="width:150px" value="{$blogSubDomain}" />
+      <select name="blogMainDomain" id="blogMainDomain">
+       {foreach from=$blogAvailableDomains item=domain}
+        <option value="{$domain}"
+             {if $domain == $blogMainDomain}selected{/if}>
+             {if $domain == "?"}
+               {$locale->tr("subdomains_any_domain")}
+             {else}
+               .{$domain}
+             {/if}
+        </option>
+       {/foreach}
+      </select>
+      {include file="$admintemplatepath/validateajax.template" field=blogSubDomain}
+      {include file="$admintemplatepath/validateajax.template" field=blogMainDomain}
+    </div>
+    {/if}
+
+
+    <div class="field">
+      <label for="blogName">{$locale->tr("name")}</label>
+      <span class="required">*</span>
+      <div class="formHelp">{$locale->tr("blog_name_help")}</div>
+      <input type="text" name="blogName" style="width:100%" id="blogName" value="{$blogName|escape:"html"}" />
+       {include file="$admintemplatepath/validateajax.template" field=blogName}
+    </div>
+
+    <div class="field">
+      <label for="blogStatus">{$locale->tr("status")}</label>
+      <span class="required">*</span>
+      <div class="formHelp">{$locale->tr("blog_status_help")}</div>
+      <select name="blogStatus" id="blogStatus">
+	{foreach from=$blogStatusList key=statusName item=blogStatusValue}
+	 <option value="{$blogStatusValue}" {if $blogStatus==$blogStatusValue}selected="selected"{/if}>{$locale->tr($statusName)}</option>
+	{/foreach}
+       </select>
+    </div>
+
+    <div class="field">
+      <label for="blogOwner">{$locale->tr("owner")}</label>
+      <span class="required">*</span>
+      <div class="formHelp">{$locale->tr("blog_owner_help")}</div>
+	  <input type="hidden" id="userId" name="userId" value="{if $userId==""}{$blogOwnerInfo->getId()}{else}{$userId}{/if}" />
+	  <input type="text" id="userName" name="userName" value="{if $userName==""}{$blogOwnerInfo->getUsername()}{else}{$userName}{/if}" style="width:50%" readonly="readonly"/>
+	  <a href="#" title="UserChooser" onClick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');return(false);">
+	   {$locale->tr("select")}
+	   </a>
+       {include file="$admintemplatepath/validateajax.template" field=userId}	   	   
+    </div>
+
+    <div class="field">
+     <label for="blogResourcesQuota">{$locale->tr("quota")}</label>
+     <div class="formHelp">{$locale->tr("blog_quota_help")}</div>
+     <input type="text" id="blogResourcesQuota" name="blogResourcesQuota" value="{$blogResourcesQuota}" />
+     {include file="$admintemplatepath/validate.template" field=blogResourcesQuota}
+    </div>
+	</div>
+	<div style="float:right;width:50%">
+    <div class="field">
+	<label for="blog_users">{$locale->tr("users")}</label>
+        <div class="formHelp">{$locale->tr("blog_users_help")}</div>
+	   {assign var=owner value=$editblog->getOwnerInfo()}
+	   <div style="overflow:auto;height:250px">
+	   {foreach from=$blogusers item=bloguser}
+	    {if $owner->getUsername() != $bloguser->getUsername()}
+  	      {check_perms adminperm=edit_blog_admin_mode}<a href="?op=adminBlogSelect&amp;blogId={$editblog->getId()}&amp;action=editBlogUser&amp;userId={$bloguser->getId()}">{/check_perms}{$bloguser->getUsername()}{check_perms adminperm=edit_blog_admin_mode}</a>{/check_perms}<br/>
+        {/if} 
+        </div> 
+	   {/foreach}
+       </div>
+     </div>
+    </fieldset>
+    <div class="buttons">
+      <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
+      <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}" />
+      <input type="hidden" name="op" value="updateEditBlog" />
+      <input type="hidden" name="blogId" value="{$editblog->getId()}"/>
+    </div>
+ </form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/editcomment.template
===================================================================
--- plog/trunk/templates/admin/editcomment.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editcomment.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,96 +1,7 @@
-<link rel="stylesheet" type="text/css" media="all" href="js/jscalendar/calendar-win2k-cold-1.css" title="win2k-cold-1" />
-<script type="text/javascript" src="js/jscalendar/calendar_stripped.js"></script>
-<script type="text/javascript" src="js/jscalendar/lang/calendar-en.js"></script>
-<script type="text/javascript" src="js/jscalendar/calendar-setup_stripped.js"></script>
-<form id="editComment" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Comments.submitHook(this);return(false);">
-<fieldset class="inputField">
-<legend>{$locale->tr("newLink")}</legend>
-{include file="$admintemplatepath/formvalidateajax.template"}
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editComments title=$locale->tr("editComments")}
 
-<div id="mainPanel" style="float:left; width: 70%; border-right: 1px solid #DEDEDE;">
-<div class="field">
-<label for="commentTopic">{$locale->tr("topic")}</label>
-<div class="formHelp"></div>
-<input size="50" type="text" name="commentTopic" id="commentTopic" value="{$commentTopic}" />
-</div>
+{include file="$admintemplatepath/editcomment_form.template"}
 
-<div class="field">
-<label for="commentText">{$locale->tr("text")}</label>
-<span class="required">*</span>
-<div class="formHelp"></div>
-<textarea name="commentText" id="commentText" rows="10" cols="50">{$commentText}</textarea>
-{include file="$admintemplatepath/validateajax.template" field=commentText}
-</div>
-
-<div class="field">
-<label for="authorName">{$locale->tr("author")} {if $userAuth}({$locale->tr("authenticated")}{/if})</label>
-<span class="required">*</span>
-<div class="formHelp"></div>
-<input type="text" name="authorName" id="authorName" value="{$authorName}" {if $userAuth}readonly="readonly"{/if} />
-</div>
-
-<div class="field">
-<label for="authorEmail">{$locale->tr("email")}</label>
-<div class="formHelp"></div>
-<input size="30" type="text" name="authorEmail" id="authorEmail" value="{$authorEmail}" />
-{include file="$admintemplatepath/validateajax.template" field=authorEmail}
-</div>
-
-<div class="field">
-<label for="authorUrl">{$locale->tr("url")}</label>
-<div class="formHelp"></div>
-<input size=60 type="text" name="authorUrl" id="authorUrl" value="{$authorUrl}" />
-{include file="$admintemplatepath/validateajax.template" field=authorUrl}
-</div>
-</div>
-
-<div id="optionPanel" style="float:left; width: 26%; margin-left: 8px;">
-<div class="field">
-<label for="commentDateTime">{$locale->tr("date")}</label>
-	     <input name="commentDateTime" id="commentDateTime" class="dateTime" readonly="true" type="text" size="16" value="{$commentDateTime}" style="margin-bottom: 4px;" /> 
-	     <img src="imgs/admin/icon_calendar-16.png" id="commentDateTimeSelector" alt="{$locale->tr("date")}" style="cursor: pointer; border: 0px; width: 16px; height: 14px; padding: 0;" /> 
-	   <script type="text/javascript">
-	   var MondayFirstDay = ( {$locale->firstDayOfWeek()} == 1);
-       {literal}
-	       Calendar.setup({
-	           inputField  : "commentDateTime",
-	           ifFormat    : "%d/%m/%Y %H:%M",
-	           button      : "commentDateTimeSelector",
-	           showsTime   : true,
-	           timeFormat  : "24",
-	           electric    : false,
-	           align       : "Bl",
-	           firstDay    : MondayFirstDay,
-	           singleClick : true
-	       });
-	   {/literal}
-	   </script>
-
-<div class="field">
-	<label for="commentStatus">{$locale->tr("status")}</label>
-	<div class="formHelp"></div>
-       <select name="commentStatus" id="commentStatus">
-         {foreach from=$commentstatus key=name item=status}
-           <option value="{$status}"
-             {if $commentStatus == $status} selected{/if}>
-           {$locale->tr($name)}</option>
-         {/foreach}
-       </select>
-</div>
-
-<div class="field">
-	<div class="formHelp"></div>
-	<label for="commentIp">IP</label>
-	<input type="text" name="commentIp" readonly="readonly" id="commentIp" value="{$commentIp}" />
-</div>
-</div>
-
-</fieldset>
- <div class="buttons">
-  <input type="hidden" name="op" value="updateComment" />
-  <input type="hidden" name="commentId" value="{$commentId}" />
-  <input type="hidden" name="articleId" value="{$articleId}" />
-  <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
-  <input type="submit" name="update" value="{$locale->tr("update")}" />
- </div>
-</form>
\ No newline at end of file
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/editcomment_form.template
===================================================================
--- plog/trunk/templates/admin/editcomment_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/editcomment_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,96 @@
+<link rel="stylesheet" type="text/css" media="all" href="js/jscalendar/calendar-win2k-cold-1.css" title="win2k-cold-1" />
+<script type="text/javascript" src="js/jscalendar/calendar_stripped.js"></script>
+<script type="text/javascript" src="js/jscalendar/lang/calendar-en.js"></script>
+<script type="text/javascript" src="js/jscalendar/calendar-setup_stripped.js"></script>
+<form id="editComment" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Comments.submitHook(this);return(false);">
+<fieldset class="inputField">
+<legend>{$locale->tr("newLink")}</legend>
+{include file="$admintemplatepath/formvalidateajax.template"}
+
+<div id="mainPanel" style="float:left; width: 70%; border-right: 1px solid #DEDEDE;">
+<div class="field">
+<label for="commentTopic">{$locale->tr("topic")}</label>
+<div class="formHelp"></div>
+<input size="50" type="text" name="commentTopic" id="commentTopic" value="{$commentTopic}" />
+</div>
+
+<div class="field">
+<label for="commentText">{$locale->tr("text")}</label>
+<span class="required">*</span>
+<div class="formHelp"></div>
+<textarea name="commentText" id="commentText" rows="10" cols="50">{$commentText}</textarea>
+{include file="$admintemplatepath/validateajax.template" field=commentText}
+</div>
+
+<div class="field">
+<label for="authorName">{$locale->tr("author")} {if $userAuth}({$locale->tr("authenticated")}{/if})</label>
+<span class="required">*</span>
+<div class="formHelp"></div>
+<input type="text" name="authorName" id="authorName" value="{$authorName}" {if $userAuth}readonly="readonly"{/if} />
+</div>
+
+<div class="field">
+<label for="authorEmail">{$locale->tr("email")}</label>
+<div class="formHelp"></div>
+<input size="30" type="text" name="authorEmail" id="authorEmail" value="{$authorEmail}" />
+{include file="$admintemplatepath/validateajax.template" field=authorEmail}
+</div>
+
+<div class="field">
+<label for="authorUrl">{$locale->tr("url")}</label>
+<div class="formHelp"></div>
+<input size=60 type="text" name="authorUrl" id="authorUrl" value="{$authorUrl}" />
+{include file="$admintemplatepath/validateajax.template" field=authorUrl}
+</div>
+</div>
+
+<div id="optionPanel" style="float:left; width: 26%; margin-left: 8px;">
+<div class="field">
+<label for="commentDateTime">{$locale->tr("date")}</label>
+	     <input name="commentDateTime" id="commentDateTime" class="dateTime" readonly="true" type="text" size="16" value="{$commentDateTime}" style="margin-bottom: 4px;" /> 
+	     <img src="imgs/admin/icon_calendar-16.png" id="commentDateTimeSelector" alt="{$locale->tr("date")}" style="cursor: pointer; border: 0px; width: 16px; height: 14px; padding: 0;" /> 
+	   <script type="text/javascript">
+	   var MondayFirstDay = ( {$locale->firstDayOfWeek()} == 1);
+       {literal}
+	       Calendar.setup({
+	           inputField  : "commentDateTime",
+	           ifFormat    : "%d/%m/%Y %H:%M",
+	           button      : "commentDateTimeSelector",
+	           showsTime   : true,
+	           timeFormat  : "24",
+	           electric    : false,
+	           align       : "Bl",
+	           firstDay    : MondayFirstDay,
+	           singleClick : true
+	       });
+	   {/literal}
+	   </script>
+
+<div class="field">
+	<label for="commentStatus">{$locale->tr("status")}</label>
+	<div class="formHelp"></div>
+       <select name="commentStatus" id="commentStatus">
+         {foreach from=$commentstatus key=name item=status}
+           <option value="{$status}"
+             {if $commentStatus == $status} selected{/if}>
+           {$locale->tr($name)}</option>
+         {/foreach}
+       </select>
+</div>
+
+<div class="field">
+	<div class="formHelp"></div>
+	<label for="commentIp">IP</label>
+	<input type="text" name="commentIp" readonly="readonly" id="commentIp" value="{$commentIp}" />
+</div>
+</div>
+
+</fieldset>
+ <div class="buttons">
+  <input type="hidden" name="op" value="updateComment" />
+  <input type="hidden" name="commentId" value="{$commentId}" />
+  <input type="hidden" name="articleId" value="{$articleId}" />
+  <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
+  <input type="submit" name="update" value="{$locale->tr("update")}" />
+ </div>
+</form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/editcomments.template
===================================================================
--- plog/trunk/templates/admin/editcomments.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editcomments.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -56,8 +56,7 @@
 		</div>
 		{/check_perms}
 		
-        <form id="postCommentsList" action="admin.php" method="post"
-        onSubmit="Lifetype.Forms.performRequest(this);return(false);">
+        <form id="postCommentsList" action="admin.php" method="post" onSubmit="Lifetype.Forms.performRequest(this);return(false);">
   {include file="$admintemplatepath/viewvalidateajax.template"}
         <div id="list">
   {include file="$admintemplatepath/editcomments_table.template"}

Modified: plog/trunk/templates/admin/editcomments_table.template
===================================================================
--- plog/trunk/templates/admin/editcomments_table.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editcomments_table.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -94,4 +94,4 @@
         {/foreach}
     </tbody>
 </table>
-{adminpagerajax style=list}
+{adminpagerajax style=list}
\ No newline at end of file

Modified: plog/trunk/templates/admin/editcustomfield.template
===================================================================
--- plog/trunk/templates/admin/editcustomfield.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editcustomfield.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,65 +1,7 @@
-<form name="updateCustomField" id="updateCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.CustomFields.updateSubmitHook(this);return false">
-  <fieldset class="inputField">
-   <legend>{$locale->tr("editCustomField")}</legend>
-   {include file="$admintemplatepath/formvalidateajax.template"} 
-   
-   <div class="field">
-    <label for="fieldName">{$locale->tr("name")}</label>
-    <span class="required">*</span>
-    <div class="formHelp">{$locale->tr("field_name_help")}</div>
-    <input type="text" name="fieldName" value="{$fieldName}" id="fieldName" />
-    {include file="$admintemplatepath/validateajax.template" field=fieldName}
-   </div>
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=blogCustomFields title=$locale->tr("blogCustomFields")}
 
-   <div class="field">
-    <label for="fieldDescription">{$locale->tr("description")}</label>
-    <span class="required">*</span>
-    <div class="formHelp">{$locale->tr("field_description_help")}</div>
-    <input type="text" name="fieldDescription" value="{$fieldDescription}" id="fieldDescription" />
-    {include file="$admintemplatepath/validateajax.template" field=fieldDescription}
-   </div>
-  
-   <div class="field">
-    <label for="fieldType">{$locale->tr("type")}</label>
-    <span class="required">*</span>
-    <div class="formHelp">{$locale->tr("field_type_help")}</div>
-    <select name="fieldType" id="fieldType" onChange="Lifetype.UI.Pages.CustomFields.fieldTypeOnChangeHandler(this)">
-     <option value="1" {if $fieldType == 1}selected="selected"{/if}>{$locale->tr("text_field")}</option>
-     <option value="2" {if $fieldType == 2}selected="selected"{/if}>{$locale->tr("text_area")}</option>
-     <option value="3" {if $fieldType == 3}selected="selected"{/if}>{$locale->tr("checkbox")}</option>
-     <option value="4" {if $fieldType == 4}selected="selected"{/if}>{$locale->tr("date_field")}</option>    
-     <option value="5" {if $fieldType == 5}selected="selected"{/if}>{$locale->tr("dropdown_list_field")}</option>
-    </select>   
-   </div>
+{include file="$admintemplatepath/editcustomfield_form.template"}
 
-   <div class="field" id="fieldValuesBlock" {if $fieldType != 5}style="display:none"{/if}>
-	<label for="fieldValues">{$locale->tr("values")}</label>
-	<span class="required">*</span>
-	<div class="formHelp">{$locale->tr("field_values")}</div>
-		<select name="fieldValues[]" id="fieldValues" multiple="multiple" style="width:40%" size="5">
-		{foreach from=$fieldValues item=value}
-		  <option value="{$value}">{$value}</option>
-		{/foreach}
-		</select>
-		<br />
-		<input type="button" class="button" onClick="Lifetype.UI.Pages.CustomFields.addFieldValue()" value="{$locale->tr("add")}" />
-		<input type="button" class="button" onClick="Lifetype.Forms.List.removeSelected('fieldValues')" value="{$locale->tr("remove_selected")}" />
-   </div>
-     
-   <div class="field">
-    <label for="fieldHidden">{$locale->tr("hidden")}</label>
-    <span class="required">*</span>
-    <div class="formHelp">
-	  <input class="checkbox" type="checkbox" name="fieldHidden" id="fieldHidden" value="1" {if $fieldHidden}checked="checked"{/if} />
-	  {$locale->tr("field_hidden_help")}
-	</div>
-   </div>
-  </fieldset>  
-  
-  <div class="buttons">
-    <input type="hidden" name="op" value="updateCustomField" />
-    <input type="hidden" name="fieldId" value="{$fieldId}" />
-    <input type="reset" name="Rest" value="{$locale->tr("reset")}" />	
-    <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}" />
-  </div> 	
- </form>
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/editcustomfield_form.template
===================================================================
--- plog/trunk/templates/admin/editcustomfield_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/editcustomfield_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,65 @@
+<form name="updateCustomField" id="updateCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.CustomFields.updateSubmitHook(this);return false">
+  <fieldset class="inputField">
+   <legend>{$locale->tr("editCustomField")}</legend>
+   {include file="$admintemplatepath/formvalidateajax.template"} 
+   
+   <div class="field">
+    <label for="fieldName">{$locale->tr("name")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("field_name_help")}</div>
+    <input type="text" name="fieldName" value="{$fieldName}" id="fieldName" />
+    {include file="$admintemplatepath/validateajax.template" field=fieldName}
+   </div>
+
+   <div class="field">
+    <label for="fieldDescription">{$locale->tr("description")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("field_description_help")}</div>
+    <input type="text" name="fieldDescription" value="{$fieldDescription}" id="fieldDescription" />
+    {include file="$admintemplatepath/validateajax.template" field=fieldDescription}
+   </div>
+  
+   <div class="field">
+    <label for="fieldType">{$locale->tr("type")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("field_type_help")}</div>
+    <select name="fieldType" id="fieldType" onChange="Lifetype.UI.Pages.CustomFields.fieldTypeOnChangeHandler(this)">
+     <option value="1" {if $fieldType == 1}selected="selected"{/if}>{$locale->tr("text_field")}</option>
+     <option value="2" {if $fieldType == 2}selected="selected"{/if}>{$locale->tr("text_area")}</option>
+     <option value="3" {if $fieldType == 3}selected="selected"{/if}>{$locale->tr("checkbox")}</option>
+     <option value="4" {if $fieldType == 4}selected="selected"{/if}>{$locale->tr("date_field")}</option>    
+     <option value="5" {if $fieldType == 5}selected="selected"{/if}>{$locale->tr("dropdown_list_field")}</option>
+    </select>   
+   </div>
+
+   <div class="field" id="fieldValuesBlock" {if $fieldType != 5}style="display:none"{/if}>
+	<label for="fieldValues">{$locale->tr("values")}</label>
+	<span class="required">*</span>
+	<div class="formHelp">{$locale->tr("field_values")}</div>
+		<select name="fieldValues[]" id="fieldValues" multiple="multiple" style="width:40%" size="5">
+		{foreach from=$fieldValues item=value}
+		  <option value="{$value}">{$value}</option>
+		{/foreach}
+		</select>
+		<br />
+		<input type="button" class="button" onClick="Lifetype.UI.Pages.CustomFields.addFieldValue()" value="{$locale->tr("add")}" />
+		<input type="button" class="button" onClick="Lifetype.Forms.List.removeSelected('fieldValues')" value="{$locale->tr("remove_selected")}" />
+   </div>
+     
+   <div class="field">
+    <label for="fieldHidden">{$locale->tr("hidden")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">
+	  <input class="checkbox" type="checkbox" name="fieldHidden" id="fieldHidden" value="1" {if $fieldHidden}checked="checked"{/if} />
+	  {$locale->tr("field_hidden_help")}
+	</div>
+   </div>
+  </fieldset>  
+  
+  <div class="buttons">
+    <input type="hidden" name="op" value="updateCustomField" />
+    <input type="hidden" name="fieldId" value="{$fieldId}" />
+    <input type="reset" name="Rest" value="{$locale->tr("reset")}" />	
+    <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}" />
+  </div> 	
+ </form>

Modified: plog/trunk/templates/admin/editlink.template
===================================================================
--- plog/trunk/templates/admin/editlink.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editlink.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,56 +1,7 @@
-<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Links.updateSubmitHook(this);return(false);">       
-        <fieldset class="inputField">
-        <legend>{$locale->tr("editLink")}</legend>
-		{include file="$admintemplatepath/formvalidateajax.template"}
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editLinks title=$locale->tr("editLinks")}
 
-        <div class="field">
-            <label for="linkName">{$locale->tr("name")}</label>
-            <span class="required">*</span>
-            <div class="formHelp">{$locale->tr("link_name_help")}</div>
-            <input type="text" name="linkName" id="linkName" value="{$linkName|escape:"html"}" />
-			{include file="$admintemplatepath/validateajax.template" field=linkName message=$locale->tr("error_empty_name")}
-        </div>
-		
-        <div class="field">
-            <label for="linkUrl">{$locale->tr("url")}</label>
-            <span class="required">*</span>
-            <div class="formHelp">{$locale->tr("link_url_help")}</div>
-            <input type="text" name="linkUrl" id="linkUrl" value="{$linkUrl}" />
-			{include file="$admintemplatepath/validateajax.template" field=linkUrl message=$locale->tr("error_invalid_url")}
-        </div>		
+{include file="$admintemplatepath/editlink_form.template"}
 
-        <div class="field">
-            <label for="linkDescription">{$locale->tr("description")}</label>
-            <span class="required"></span>
-            <div class="formHelp">{$locale->tr("link_description_help")}</div>
-            <input type="text" name="linkDescription" id="linkDescription" value="{$linkDescription}" />
-        </div>
-		
-        <div class="field">
-            <label for="linkRssFeed">{$locale->tr("feed")}</label>
-            <span class="required"></span>
-            <div class="formHelp">{$locale->tr("link_feed_help")}</div>
-            <input type="text" name="linkRssFeed" id="linkRssFeed" value="{$linkRssFeed}" />
-			{include file="$admintemplatepath/validateajax.template" field=linkRssFeed message=$locale->tr("error_invalid_url")}			
-        </div>			
-
-        <div class="field">
-            <label for="linkCategory">{$locale->tr("category")}</label>
-            <span class="required">*</span>
-            <div class="formHelp">{$locale->tr("link_category_help")}</div>
-			<select name="linkCategoryId" id="linkCategoryId">
-			 {foreach from=$linkcategories item=linkcategory}
-			  <option value="{$linkcategory->getId()}" {if $linkCategoryId == $linkcategory->getId()}selected="selected"{/if}>
-			    {$linkcategory->getName()}
-			  </option>
-			 {/foreach}
-			</select>
-        </div>
-        </fieldset>
-		<div class="buttons">
-		   <input type="hidden" name="linkId" value="{$linkId}"/>
-		   <input type="hidden" value="updateLink" name="op"/>
-           <input type="reset" value="{$locale->tr("reset")}" name="resetButton"/>		    		   
-		   <input type="submit" value="{$locale->tr("update")}" name="Update"/>
-		</div>
-</form>
\ No newline at end of file
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/editlink_form.template
===================================================================
--- plog/trunk/templates/admin/editlink_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/editlink_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,56 @@
+<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Links.updateSubmitHook(this);return(false);">       
+        <fieldset class="inputField">
+        <legend>{$locale->tr("editLink")}</legend>
+		{include file="$admintemplatepath/formvalidateajax.template"}
+
+        <div class="field">
+            <label for="linkName">{$locale->tr("name")}</label>
+            <span class="required">*</span>
+            <div class="formHelp">{$locale->tr("link_name_help")}</div>
+            <input type="text" name="linkName" id="linkName" value="{$linkName|escape:"html"}" />
+			{include file="$admintemplatepath/validateajax.template" field=linkName message=$locale->tr("error_empty_name")}
+        </div>
+		
+        <div class="field">
+            <label for="linkUrl">{$locale->tr("url")}</label>
+            <span class="required">*</span>
+            <div class="formHelp">{$locale->tr("link_url_help")}</div>
+            <input type="text" name="linkUrl" id="linkUrl" value="{$linkUrl}" />
+			{include file="$admintemplatepath/validateajax.template" field=linkUrl message=$locale->tr("error_invalid_url")}
+        </div>		
+
+        <div class="field">
+            <label for="linkDescription">{$locale->tr("description")}</label>
+            <span class="required"></span>
+            <div class="formHelp">{$locale->tr("link_description_help")}</div>
+            <input type="text" name="linkDescription" id="linkDescription" value="{$linkDescription}" />
+        </div>
+		
+        <div class="field">
+            <label for="linkRssFeed">{$locale->tr("feed")}</label>
+            <span class="required"></span>
+            <div class="formHelp">{$locale->tr("link_feed_help")}</div>
+            <input type="text" name="linkRssFeed" id="linkRssFeed" value="{$linkRssFeed}" />
+			{include file="$admintemplatepath/validateajax.template" field=linkRssFeed message=$locale->tr("error_invalid_url")}			
+        </div>			
+
+        <div class="field">
+            <label for="linkCategory">{$locale->tr("category")}</label>
+            <span class="required">*</span>
+            <div class="formHelp">{$locale->tr("link_category_help")}</div>
+			<select name="linkCategoryId" id="linkCategoryId">
+			 {foreach from=$linkcategories item=linkcategory}
+			  <option value="{$linkcategory->getId()}" {if $linkCategoryId == $linkcategory->getId()}selected="selected"{/if}>
+			    {$linkcategory->getName()}
+			  </option>
+			 {/foreach}
+			</select>
+        </div>
+        </fieldset>
+		<div class="buttons">
+		   <input type="hidden" name="linkId" value="{$linkId}"/>
+		   <input type="hidden" value="updateLink" name="op"/>
+           <input type="reset" value="{$locale->tr("reset")}" name="resetButton"/>		    		   
+		   <input type="submit" value="{$locale->tr("update")}" name="Update"/>
+		</div>
+</form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/editlinkcategory.template
===================================================================
--- plog/trunk/templates/admin/editlinkcategory.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editlinkcategory.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,19 +1,7 @@
-<form id="editLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.LinkCategories.updateSubmitHook(this);return(false);">
-   <fieldset class="inputField">
-   {include file="$admintemplatepath/formvalidateajax.template"}   
-   <legend>{$locale->tr("editLinkCategory")}</legend>
-   <div class="field">
-     <label for="linkCategoryName">{$locale->tr("name")}</label>
-     <span class="required">*</span>
-     <div class="formHelp">{$locale->tr("link_category_name_help")}</div>
-     <input type="text" id="linkCategoryName" name="linkCategoryName" value="{$linkCategoryName}"/>
-     {include file="$admintemplatepath/validateajax.template" field=linkCategoryName}
-   </div>
-  </fieldset> 
-  <div class="buttons">
-    <input type="hidden" name="op" value="updateLinkCategory" />
-    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
-    <input type="submit" name="subOp" value="{$locale->tr("update")}" />
-    <input type="hidden" name="linkCategoryId" value="{$linkCategoryId}" />
-  </div>
-</form>
\ No newline at end of file
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editLinkCategories title=$locale->tr("editLinkCategory")}
+
+{include file="$admintemplatepath/editlinkcategory_form.template"}
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/editlinkcategory_form.template
===================================================================
--- plog/trunk/templates/admin/editlinkcategory_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/editlinkcategory_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,19 @@
+<form id="editLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.LinkCategories.updateSubmitHook(this);return(false);">
+   <fieldset class="inputField">
+   {include file="$admintemplatepath/formvalidateajax.template"}   
+   <legend>{$locale->tr("editLinkCategory")}</legend>
+   <div class="field">
+     <label for="linkCategoryName">{$locale->tr("name")}</label>
+     <span class="required">*</span>
+     <div class="formHelp">{$locale->tr("link_category_name_help")}</div>
+     <input type="text" id="linkCategoryName" name="linkCategoryName" value="{$linkCategoryName}"/>
+     {include file="$admintemplatepath/validateajax.template" field=linkCategoryName}
+   </div>
+  </fieldset> 
+  <div class="buttons">
+    <input type="hidden" name="op" value="updateLinkCategory" />
+    <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
+    <input type="submit" name="subOp" value="{$locale->tr("update")}" />
+    <input type="hidden" name="linkCategoryId" value="{$linkCategoryId}" />
+  </div>
+</form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/editlinks_table.template
===================================================================
--- plog/trunk/templates/admin/editlinks_table.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editlinks_table.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -48,4 +48,4 @@
  {/foreach}
  </tbody>
  </table>
- {adminpagerajax style=list}
+ {adminpagerajax style=list}
\ No newline at end of file

Modified: plog/trunk/templates/admin/editpost.template
===================================================================
--- plog/trunk/templates/admin/editpost.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/editpost.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -19,10 +19,10 @@
   <script type="text/javascript" src="js/editor/lifetypeeditor.js"></script>
  {/if} 
  <script type="text/javascript">  
-  // some messages that we are going to need in the functions above 
+  // this needs to be pre-initialized
   Lifetype.UI.Pages.Posts.preview = false;
  </script>
-  <form name="postEdit" id="postEdit" action="admin.php" method="post" onSubmit="return Lifetype.UI.Pages.Posts.selectOperation(this,'updatePost');" target="admin">   
+  <form name="postEdit" id="postEdit" action="admin.php" method="post" onSubmit="this.target='admin';return Lifetype.UI.Pages.Posts.selectOperation(this,'updatePost');">   
    <fieldset class="inputField">
    <legend>{$locale->tr("editPost")}</legend>
    <div id="mainPanel" style="float:left; width: 73%; border-right: 1px solid #DEDEDE;">  

Modified: plog/trunk/templates/admin/edittemplatefile.template
===================================================================
--- plog/trunk/templates/admin/edittemplatefile.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/edittemplatefile.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,36 +1,7 @@
-<div class="extraFunctions">
-	<div class="right">
-		<a href="?op=editTemplate&amp;templateId={$template}">{$template}</a> &raquo; {$path}: {$file}
-	</div>
-</div>
-<br style="clear:both" />
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=siteTemplates title=$locale->tr("editTemplateFile")}
 
-{include file="$admintemplatepath/formvalidateajax.template"}
-<form id="editTemplateFile" name="editTemplateFile" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);">
- <fieldset class="inputField">
- <legend>{$locale->tr("edit_template_file")}</legend>  
-  {include file="$admintemplatepath/successmessage.template"}
-  {include file="$admintemplatepath/errormessage.template"}   
+{include file="$admintemplatepath/edittemplatefile_form.template"}
 
-  <div class="field">
-   <textarea rows="20" id="fileContent" name="fileContent" style="width:100%">{$fileContent|escape:"html"}</textarea>
-   <script type="text/javascript">var ed1 = new Lifetype.UI.Editor('fileContent','ed1');ed1.init()</script>
-  </div>  
-
- <select id="smartySnippets">
-  <option value="">Posts loop</option>
-  <option value="">Archives loop</option>
-  <option value="">Links look</option>
- </select>&nbsp;
- <a href="#" onClick="return(false);">{$locale->tr("insert")}</a>
- </fieldset>  
-
- <div class="buttons">
-  <input type="hidden" name="templateId" value="{$template}" />
-  <input type="hidden" name="path" value="{$path}" />
-  <input type="hidden" name="file" value="{$file}" />
-  <input type="hidden" name="op" value="updateTemplateFile" />
-  <input type="reset" name="{$locale->tr("reset")}" />    
-  <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}" />
- </div>
-</form>
\ No newline at end of file
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/edittemplatefile_form.template
===================================================================
--- plog/trunk/templates/admin/edittemplatefile_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/edittemplatefile_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,36 @@
+<div class="extraFunctions">
+	<div class="right">
+		<a href="?op=editTemplate&amp;templateId={$template}">{$template}</a> &raquo; {$path}: {$file}
+	</div>
+</div>
+<br style="clear:both" />
+
+{include file="$admintemplatepath/formvalidateajax.template"}
+<form id="editTemplateFile" name="editTemplateFile" method="post" onSubmit="Lifetype.Forms.AjaxFormProcessor(this.id,'?output=json');return(false);">
+ <fieldset class="inputField">
+ <legend>{$locale->tr("edit_template_file")}</legend>  
+  {include file="$admintemplatepath/successmessage.template"}
+  {include file="$admintemplatepath/errormessage.template"}   
+
+  <div class="field">
+   <textarea rows="20" id="fileContent" name="fileContent" style="width:100%">{$fileContent|escape:"html"}</textarea>
+   <script type="text/javascript">var ed1 = new Lifetype.UI.Editor('fileContent','ed1');ed1.init()</script>
+  </div>  
+
+ <select id="smartySnippets">
+  <option value="">Posts loop</option>
+  <option value="">Archives loop</option>
+  <option value="">Links look</option>
+ </select>&nbsp;
+ <a href="#" onClick="return(false);">{$locale->tr("insert")}</a>
+ </fieldset>  
+
+ <div class="buttons">
+  <input type="hidden" name="templateId" value="{$template}" />
+  <input type="hidden" name="path" value="{$path}" />
+  <input type="hidden" name="file" value="{$file}" />
+  <input type="hidden" name="op" value="updateTemplateFile" />
+  <input type="reset" name="{$locale->tr("reset")}" />    
+  <input type="submit" name="{$locale->tr("update")}" value="{$locale->tr("update")}" />
+ </div>
+</form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/menus.xml
===================================================================
--- plog/trunk/templates/admin/menus.xml	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/menus.xml	2007-08-10 21:57:04 UTC (rev 5816)
@@ -7,7 +7,7 @@
 	       <editComments url="?op=editComments" andPerms="view_comments" />
 	       <editLinks url="?op=editLinks" andPerms="view_links" />
 		   <editLinkCategories url="?op=editLinkCategories" andPerms="view_link_categories" />	
-		  <blogCustomFields url="?op=blogCustomFields" andPerms="view_custom_fields" />		
+		   <blogCustomFields url="?op=blogCustomFields" andPerms="view_custom_fields" />
  		</managePosts>
 	</Content>
 	<resources url="?op=resources" andPerms="view_resources" />

Modified: plog/trunk/templates/admin/newcustomfield.template
===================================================================
--- plog/trunk/templates/admin/newcustomfield.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/newcustomfield.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,63 +1,7 @@
-<form name="newCustomField" id="newCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.CustomFields.addSubmitHook(this);return false">
-  <fieldset class="inputField">
-   <legend>{$locale->tr("newCustomField")}</legend>
-   {include file="$admintemplatepath/formvalidateajax.template"}      
-   <div class="field">
-    <label for="fieldName">{$locale->tr("name")}</label>
-    <span class="required">*</span>
-    <div class="formHelp">{$locale->tr("field_name_help")}</div>
-    <input type="text" name="fieldName" value="{$fieldName}" id="fieldName" />
-    {include file="$admintemplatepath/validateajax.template" field=fieldName}
-   </div>
-   
-   <div class="field">
-    <label for="fieldDescription">{$locale->tr("description")}</label>
-    <span class="required"></span>
-    <div class="formHelp">{$locale->tr("field_description_help")}</div>
-    <input type="text" name="fieldDescription" value="{$fieldDescription}" id="fieldDescription" />
-    {include file="$admintemplatepath/validateajax.template" field=fieldDescription}
-   </div>
-   
-   <div class="field">
-    <label for="fieldType">{$locale->tr("type")}</label>
-    <span class="required">*</span>
-    <div class="formHelp">{$locale->tr("field_type_help")}</div>
-    <select name="fieldType" id="fieldType" onChange="Lifetype.UI.Pages.CustomFields.fieldTypeOnChangeHandler(this)">
-     <option value="1" {if $fieldType == 1}selected="selected"{/if}>{$locale->tr("text_field")}</option>
-     <option value="2" {if $fieldType == 2}selected="selected"{/if}>{$locale->tr("text_area")}</option>
-     <option value="3" {if $fieldType == 3}selected="selected"{/if}>{$locale->tr("checkbox")}</option>
-     <option value="4" {if $fieldType == 4}selected="selected"{/if}>{$locale->tr("date_field")}</option>    
-	 <option value="5" {if $fieldType == 5}selected="selected"{/if}>{$locale->tr("dropdown_list_field")}</option>
-    </select>   
-   </div>
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=blogCustomFields title=$locale->tr("newCustomField")}
 
-   <div class="field" id="fieldValuesBlock" {if $fieldType != 5}style="display:none"{/if}>
-	<label for="fieldValues">{$locale->tr("values")}</label>
-	<span class="required">*</span>
-	<div class="formHelp">{$locale->tr("field_values")}</div>
-		<select name="fieldValues[]" id="fieldValues" multiple="multiple" style="width:40%" size="5">
-		{foreach from=$fieldValues item=value}
-		   <option value="{$value}">{$value}</option>
-		{/foreach}
-		</select>
-		<br />
-		<input type="button" class="button" onClick="Lifetype.UI.Pages.CustomFields.addFieldValue()" value="{$locale->tr("add")}" />
-		<input type="button" class="button" onClick="Lifetype.Forms.List.removeSelected('fieldValues')" value="{$locale->tr("remove_selected")}" />
-   </div>
+{include file="$admintemplatepath/newcustomfield_form.template"}
 
-   <div class="field">
-    <label for="fieldHidden">{$locale->tr("hidden")}</label>
-    <span class="required">*</span>
-    <div class="formHelp">
-	  <input class="checkbox" type="checkbox" id="fieldHidden" name="fieldHidden" value="1" {if $fieldHidden}checked="checked"{/if} />
-	  {$locale->tr("field_hidden_help")}
-	</div>
-   </div>
-  </fieldset>  
-  <div class="buttons"> 
-    <input type="hidden" name="fieldSearchable" value="1" />
-    <input type="hidden" name="op" value="addCustomField" />
-    <input type="reset" name="Rest" value="{$locale->tr("reset")}" />
-    <input type="submit" name="{$locale->tr("add")}" value="{$locale->tr("add")}" />
-  </div>  
- </form>
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/newcustomfield_form.template
===================================================================
--- plog/trunk/templates/admin/newcustomfield_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/newcustomfield_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,63 @@
+<form name="newCustomField" id="newCustomField" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.CustomFields.addSubmitHook(this);return false">
+  <fieldset class="inputField">
+   <legend>{$locale->tr("newCustomField")}</legend>
+   {include file="$admintemplatepath/formvalidateajax.template"}      
+   <div class="field">
+    <label for="fieldName">{$locale->tr("name")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("field_name_help")}</div>
+    <input type="text" name="fieldName" value="{$fieldName}" id="fieldName" />
+    {include file="$admintemplatepath/validateajax.template" field=fieldName}
+   </div>
+   
+   <div class="field">
+    <label for="fieldDescription">{$locale->tr("description")}</label>
+    <span class="required"></span>
+    <div class="formHelp">{$locale->tr("field_description_help")}</div>
+    <input type="text" name="fieldDescription" value="{$fieldDescription}" id="fieldDescription" />
+    {include file="$admintemplatepath/validateajax.template" field=fieldDescription}
+   </div>
+   
+   <div class="field">
+    <label for="fieldType">{$locale->tr("type")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("field_type_help")}</div>
+    <select name="fieldType" id="fieldType" onChange="Lifetype.UI.Pages.CustomFields.fieldTypeOnChangeHandler(this)">
+     <option value="1" {if $fieldType == 1}selected="selected"{/if}>{$locale->tr("text_field")}</option>
+     <option value="2" {if $fieldType == 2}selected="selected"{/if}>{$locale->tr("text_area")}</option>
+     <option value="3" {if $fieldType == 3}selected="selected"{/if}>{$locale->tr("checkbox")}</option>
+     <option value="4" {if $fieldType == 4}selected="selected"{/if}>{$locale->tr("date_field")}</option>    
+	 <option value="5" {if $fieldType == 5}selected="selected"{/if}>{$locale->tr("dropdown_list_field")}</option>
+    </select>   
+   </div>
+
+   <div class="field" id="fieldValuesBlock" {if $fieldType != 5}style="display:none"{/if}>
+	<label for="fieldValues">{$locale->tr("values")}</label>
+	<span class="required">*</span>
+	<div class="formHelp">{$locale->tr("field_values")}</div>
+		<select name="fieldValues[]" id="fieldValues" multiple="multiple" style="width:40%" size="5">
+		{foreach from=$fieldValues item=value}
+		   <option value="{$value}">{$value}</option>
+		{/foreach}
+		</select>
+		<br />
+		<input type="button" class="button" onClick="Lifetype.UI.Pages.CustomFields.addFieldValue()" value="{$locale->tr("add")}" />
+		<input type="button" class="button" onClick="Lifetype.Forms.List.removeSelected('fieldValues')" value="{$locale->tr("remove_selected")}" />
+   </div>
+
+   <div class="field">
+    <label for="fieldHidden">{$locale->tr("hidden")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">
+	  <input class="checkbox" type="checkbox" id="fieldHidden" name="fieldHidden" value="1" {if $fieldHidden}checked="checked"{/if} />
+	  {$locale->tr("field_hidden_help")}
+	</div>
+   </div>
+  </fieldset>  
+  <div class="buttons"> 
+    <input type="hidden" name="fieldSearchable" value="1" />
+    <input type="hidden" name="op" value="addCustomField" />
+    <input type="reset" name="Rest" value="{$locale->tr("reset")}" />
+    <input type="submit" name="{$locale->tr("add")}" value="{$locale->tr("add")}" />
+  </div>  
+ </form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/newlink.template
===================================================================
--- plog/trunk/templates/admin/newlink.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/newlink.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,67 +1,7 @@
-<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Links.addSubmitHook(this);return(false);"> 
-      
-        <fieldset class="inputField">
-        <legend>{$locale->tr("newLink")}</legend>
-		{include file="$admintemplatepath/formvalidateajax.template"}
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editLinks title=$locale->tr("newLink")}
 
-        <div class="field">
-            <label for="linkName">{$locale->tr("name")}</label>
-            <span class="required">*</span>
-            <div class="formHelp">{$locale->tr("link_name_help")}</div>
-            <input type="text" name="linkName" id="linkName" value="{$linkName}" />
-			{include file="$admintemplatepath/validateajax.template" field=linkName}
-        </div>
+{include file="$admintemplatepath/newlink_form.template"}
 
-        <div class="field">
-            <label for="linkUrl">{$locale->tr("url")}</label>
-            <span class="required">*</span>
-            <div class="formHelp">{$locale->tr("link_url_help")}</div>
-            <input type="text" name="linkUrl" id="linkUrl" value="{$linkUrl}" />
-			{include file="$admintemplatepath/validateajax.template" field=linkUrl}
-        </div>
-
-        <div class="field">
-            <label for="linkDescription">{$locale->tr("description")}</label>
-            <span class="required"></span>
-            <div class="formHelp">{$locale->tr("link_description_help")}</div>
-            <input type="text" name="linkDescription" id="linkDescription" value="{$linkDescription}" />
-        </div>
-		
-        <div class="field">
-            <label for="linkRssFeed">{$locale->tr("feed")}</label>
-            <span class="required"></span>
-            <div class="formHelp">{$locale->tr("link_feed_help")}</div>
-            <input type="text" name="linkRssFeed" id="linkRssFeed" value="{$linkRssFeed}" />
-			{include file="$admintemplatepath/validateajax.template" field=linkRssFeed}
-        </div>		
-
-        <div class="field">
-            <label for="linkCategory">{$locale->tr("category")}</label>
-            <span class="required">*</span>
-            <div class="formHelp">{$locale->tr("link_category_help")}</div>
-			<select name="linkCategoryId" id="linkCategoryId">
-			 {foreach from=$linkcategories item=linkcategory}
-			  <option value="{$linkcategory->getId()}" {if $linkCategoryId == $linkcategory->getId()}selected="selected"{/if}>
-			    {$linkcategory->getName()}
-			  </option>
-			 {/foreach}
-			</select>
-        </div>
-
-
-	        <!--
-	        <div class="field">
-	        	<label for="bookmarklet">{$locale->tr("bookmarklet")}</label>
-	        	<div class="formHelp">{$locale->tr("bookmarklet_help")}</div>
-	        	<a href="javascript:void(ltbm=window.open('{$url->getAdminUrl()}?op=newLink&linkName='+encodeURIComponent(document.title)+'&linkUrl='+encodeURIComponent(location.href),'ltbm','toolbar=1,status=1,location=1,scrollbars=1,menubar=1,resizable=1'));" onclick="window.alert('{$locale->tr("bookmarklet_help")}');">{$locale->tr("bookmarkit_to_lifetype")}</a>
-	        </div>
-		-->
-        
-        </fieldset>
-        <div class="buttons">
-		    <input type="hidden" name="op" value="addLink" />
-            <input type="reset" value="{$locale->tr("reset")}" name="resetButton"/>
-			<input type="submit" name="Add" value="{$locale->tr("add")}"/>
-            <input type="hidden" value="addLink" name="op"/>
-        </div> 
-</form>
\ No newline at end of file
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/newlink_form.template
===================================================================
--- plog/trunk/templates/admin/newlink_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/newlink_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,67 @@
+<form id="newLink" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Links.addSubmitHook(this);return(false);"> 
+      
+        <fieldset class="inputField">
+        <legend>{$locale->tr("newLink")}</legend>
+		{include file="$admintemplatepath/formvalidateajax.template"}
+
+        <div class="field">
+            <label for="linkName">{$locale->tr("name")}</label>
+            <span class="required">*</span>
+            <div class="formHelp">{$locale->tr("link_name_help")}</div>
+            <input type="text" name="linkName" id="linkName" value="{$linkName}" />
+			{include file="$admintemplatepath/validateajax.template" field=linkName}
+        </div>
+
+        <div class="field">
+            <label for="linkUrl">{$locale->tr("url")}</label>
+            <span class="required">*</span>
+            <div class="formHelp">{$locale->tr("link_url_help")}</div>
+            <input type="text" name="linkUrl" id="linkUrl" value="{$linkUrl}" />
+			{include file="$admintemplatepath/validateajax.template" field=linkUrl}
+        </div>
+
+        <div class="field">
+            <label for="linkDescription">{$locale->tr("description")}</label>
+            <span class="required"></span>
+            <div class="formHelp">{$locale->tr("link_description_help")}</div>
+            <input type="text" name="linkDescription" id="linkDescription" value="{$linkDescription}" />
+        </div>
+		
+        <div class="field">
+            <label for="linkRssFeed">{$locale->tr("feed")}</label>
+            <span class="required"></span>
+            <div class="formHelp">{$locale->tr("link_feed_help")}</div>
+            <input type="text" name="linkRssFeed" id="linkRssFeed" value="{$linkRssFeed}" />
+			{include file="$admintemplatepath/validateajax.template" field=linkRssFeed}
+        </div>		
+
+        <div class="field">
+            <label for="linkCategory">{$locale->tr("category")}</label>
+            <span class="required">*</span>
+            <div class="formHelp">{$locale->tr("link_category_help")}</div>
+			<select name="linkCategoryId" id="linkCategoryId">
+			 {foreach from=$linkcategories item=linkcategory}
+			  <option value="{$linkcategory->getId()}" {if $linkCategoryId == $linkcategory->getId()}selected="selected"{/if}>
+			    {$linkcategory->getName()}
+			  </option>
+			 {/foreach}
+			</select>
+        </div>
+
+
+	        <!--
+	        <div class="field">
+	        	<label for="bookmarklet">{$locale->tr("bookmarklet")}</label>
+	        	<div class="formHelp">{$locale->tr("bookmarklet_help")}</div>
+	        	<a href="javascript:void(ltbm=window.open('{$url->getAdminUrl()}?op=newLink&linkName='+encodeURIComponent(document.title)+'&linkUrl='+encodeURIComponent(location.href),'ltbm','toolbar=1,status=1,location=1,scrollbars=1,menubar=1,resizable=1'));" onclick="window.alert('{$locale->tr("bookmarklet_help")}');">{$locale->tr("bookmarkit_to_lifetype")}</a>
+	        </div>
+		-->
+        
+        </fieldset>
+        <div class="buttons">
+		    <input type="hidden" name="op" value="addLink" />
+            <input type="reset" value="{$locale->tr("reset")}" name="resetButton"/>
+			<input type="submit" name="Add" value="{$locale->tr("add")}"/>
+            <input type="hidden" value="addLink" name="op"/>
+        </div> 
+</form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/newlinkcategory.template
===================================================================
--- plog/trunk/templates/admin/newlinkcategory.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/newlinkcategory.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,18 +1,7 @@
-<form id="newLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.LinkCategories.addSubmitHook(this);return(false);">
-   <fieldset class="inputField">
-   <legend>{$locale->tr("newLinkCategory")}</legend>   
-   {include file="$admintemplatepath/formvalidateajax.template"}
-   <div class="field">
-     <label for="linkCategoryName">{$locale->tr("name")}</label>
-     <span class="required">*</span>
-     <div class="formHelp">{$locale->tr("link_category_name_help")}</div>
-     <input type="text" id="linkCategoryName" name="linkCategoryName" value="{$linkCategoryName}"/>
-     {include file="$admintemplatepath/validateajax.template" field=linkCategoryName}
-   </div>
-  </fieldset> 
-  <div class="buttons">
-    <input type="reset" value="{$locale->tr("reset")}" name="resetButton"/>  
-    <input type="hidden" name="op" value="addLinkCategory"/>
-    <input type="submit" name="Add" value="{$locale->tr("add")}"/>
-  </div>  
-</form>
\ No newline at end of file
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editLinkCategories title=$locale->tr("newLinkCategory")}
+
+{include file="$admintemplatepath/newlinkcategory_form.template"}
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/newlinkcategory_form.template
===================================================================
--- plog/trunk/templates/admin/newlinkcategory_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/newlinkcategory_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,18 @@
+<form id="newLinkCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.LinkCategories.addSubmitHook(this);return(false);">
+   <fieldset class="inputField">
+   <legend>{$locale->tr("newLinkCategory")}</legend>   
+   {include file="$admintemplatepath/formvalidateajax.template"}
+   <div class="field">
+     <label for="linkCategoryName">{$locale->tr("name")}</label>
+     <span class="required">*</span>
+     <div class="formHelp">{$locale->tr("link_category_name_help")}</div>
+     <input type="text" id="linkCategoryName" name="linkCategoryName" value="{$linkCategoryName}"/>
+     {include file="$admintemplatepath/validateajax.template" field=linkCategoryName}
+   </div>
+  </fieldset> 
+  <div class="buttons">
+    <input type="reset" value="{$locale->tr("reset")}" name="resetButton"/>  
+    <input type="hidden" name="op" value="addLinkCategory"/>
+    <input type="submit" name="Add" value="{$locale->tr("add")}"/>
+  </div>  
+</form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/newpost.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -24,7 +24,7 @@
   Lifetype.UI.Pages.Posts.preview = false; 
 </script>
  
-  <form name="postEdit" id="postEdit" action="admin.php" method="post" onSubmit="return Lifetype.UI.Pages.Posts.selectOperation(this, 'addPost');" target="admin">   
+  <form name="postEdit" id="postEdit" action="admin.php" method="post" onSubmit="this.target='admin';return Lifetype.UI.Pages.Posts.selectOperation(this, 'addPost');">   
    <fieldset class="inputField">
    <legend>{$locale->tr("newPost")}</legend>
    <div id="mainPanel" style="float:left; width: 73%; border-right: 1px solid #DEDEDE;">

Modified: plog/trunk/templates/admin/newpostcategory.template
===================================================================
--- plog/trunk/templates/admin/newpostcategory.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/newpostcategory.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,32 +1,7 @@
-<form name="addArticleCategory" id="addArticleCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.ArticleCategories.addSubmitHook(this);return(false);">
-  <fieldset class="inputField">
-   <legend>{$locale->tr("newArticleCategory")}</legend>
-   {include file="$admintemplatepath/formvalidateajax.template"}   
-   <div class="field">
-    <label for="categoryName">{$locale->tr("name")}</label>
-    <span class="required">*</span>
-    <div class="formHelp">{$locale->tr("category_name_help")}</div>
-    <input type="text" value="{$categoryName}" id="categoryName" name="categoryName" />
-    {include file="$admintemplatepath/validateajax.template" field=categoryName}
-   </div>   
-   <div class="field">
-    <label for="categoryDescription">{$locale->tr("description")}</label>
-    <span class="required"></span>
-    <div class="formHelp">{$locale->tr("category_description_help")}</div>	
-    <textarea name="categoryDescription" cols="60" id="categoryDescription" rows="5">{$categoryDescription}</textarea>
-   </div>   
-   <div class="field">
-    <label for="categoryInMainPage">{$locale->tr("show_in_main_page")}</label>
-    <div class="formHelp">
-      <input class="checkbox" type="checkbox" value="1" name="categoryInMainPage" id="categoryInMainPage" {if $categoryInMainPage}checked="checked"{/if}/>	
-	  {$locale->tr("show_in_main_page_help")}
-	</div>  
-   </div>   
-  </fieldset>
-  <div class="buttons">
-   <input type="hidden" value="" name="categoryUrl" />
-   <input type="hidden" name="op" value="addArticleCategory" />
-   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
-   <input type="submit" name="Add" value="{$locale->tr("add")}" />
-  </div> 
-</form>
\ No newline at end of file
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editArticleCategories title=$locale->tr("editArticleCategories")}
+
+{include file="$admintemplatepath/newpostcategory_form.template"}
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/newpostcategory_form.template
===================================================================
--- plog/trunk/templates/admin/newpostcategory_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/newpostcategory_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,32 @@
+<form name="addArticleCategory" id="addArticleCategory" method="post" action="admin.php" onSubmit="Lifetype.UI.Pages.ArticleCategories.addSubmitHook(this);return(false);">
+  <fieldset class="inputField">
+   <legend>{$locale->tr("newArticleCategory")}</legend>
+   {include file="$admintemplatepath/formvalidateajax.template"}   
+   <div class="field">
+    <label for="categoryName">{$locale->tr("name")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("category_name_help")}</div>
+    <input type="text" value="{$categoryName}" id="categoryName" name="categoryName" />
+    {include file="$admintemplatepath/validateajax.template" field=categoryName}
+   </div>   
+   <div class="field">
+    <label for="categoryDescription">{$locale->tr("description")}</label>
+    <span class="required"></span>
+    <div class="formHelp">{$locale->tr("category_description_help")}</div>	
+    <textarea name="categoryDescription" cols="60" id="categoryDescription" rows="5">{$categoryDescription}</textarea>
+   </div>   
+   <div class="field">
+    <label for="categoryInMainPage">{$locale->tr("show_in_main_page")}</label>
+    <div class="formHelp">
+      <input class="checkbox" type="checkbox" value="1" name="categoryInMainPage" id="categoryInMainPage" {if $categoryInMainPage}checked="checked"{/if}/>	
+	  {$locale->tr("show_in_main_page_help")}
+	</div>  
+   </div>   
+  </fieldset>
+  <div class="buttons">
+   <input type="hidden" value="" name="categoryUrl" />
+   <input type="hidden" name="op" value="addArticleCategory" />
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
+   <input type="submit" name="Add" value="{$locale->tr("add")}" />
+  </div> 
+</form>
\ No newline at end of file

Modified: plog/trunk/templates/admin/siteblogs_table.template
===================================================================
--- plog/trunk/templates/admin/siteblogs_table.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/siteblogs_table.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -38,7 +38,7 @@
       <a href="?op=deleteBlog&amp;blogId={$siteblog->getId()}" title="{$locale->tr("delete")}" onClick="Lifetype.Forms.performRequest(this);return(false);">
 	       <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
 	     </a>
-      <a href="?op=editBlog&amp;blogId={$siteblog->getId()}" title="{$locale->tr("edit")}" rel="overlay">
+      <a href="?op=editBlog&amp;blogId={$siteblog->getId()}aa" title="{$locale->tr("edit")}" rel="overlay">
 	       <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
 	     </a>
 		 {assign var=blogUrl value=$siteblog->getBlogRequestGenerator()}

Modified: plog/trunk/templates/admin/userprofile.template
===================================================================
--- plog/trunk/templates/admin/userprofile.template	2007-08-10 21:54:10 UTC (rev 5815)
+++ plog/trunk/templates/admin/userprofile.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -1,84 +1,7 @@
-<form id="editUserProfile" name="editUserProfile" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Users.updateSubmitHook(this);return(false);">
-   <fieldset class="inputField">
-    <legend>{$locale->tr("editUser")}</legend>
-   {include file="$admintemplatepath/formvalidateajax.template"}
-    <div style="float:left;width:50%">
-    <div class="field">
-      <label for="userName">{$locale->tr("username")}</label>
-      <div class="formHelp">{$locale->tr("username_help")}</div>
-      <input type="text" id="userName" name="userName" value="{$userName}" readonly="readonly" />
-    </div>
-    <div class="field">
-      <label for="userFullName">{$locale->tr("full_name")}</label>
-      <span class="required"></span>
-      <div class="formHelp">{$locale->tr("full_name_help")}</div>
-      <input type="text" id="userFullName" name="userFullName" value="{$userFullName}"/>
-    </div>
-    <div class="field">
-      <label for="userProfilePassword">{$locale->tr("password")}</label>
-      <div class="formHelp">{$locale->tr("password_help")}</div>
-      <input type="password" name="userProfilePassword" id="userProfilePassword" value="{$userProfilePassword}" />
-      {include file="$admintemplatepath/validateajax.template" field=userProfilePassword}
-    </div>
-    <div class="field">
-      <label for="userEmail">{$locale->tr("email")}</label>
-      <span class="required">*</span>
-      <div class="formHelp">{$locale->tr("email_help")}</div>
-      <input type="text" name="userEmail" id="userEmail" value="{$userEmail}"/>
-      {include file="$admintemplatepath/validateajax.template" field=userEmail}
-    </div>
-    <div class="field">
-	  <label for="userStatus">{$locale->tr("status")}</label>
-	  <span class="required">*</span>
-	  <div class="formHelp">{$locale->tr("user_status_help")}</div>
-	  <select name="userStatus" id="userStatus">
-	   {foreach from=$userStatusList item=status key=statusKey}
-	     <option value="{$status}" {if $userStatus==$status}selected="selected"{/if}>{$locale->tr($statusKey)}</option>
-	   {/foreach}
-	  </select>
-    </div>
-    <div class="field">
-      <label for="userBlog">{$locale->tr("blogs")}</label>
-      <span class="required"></span>
-      <div class="formHelp">{$locale->tr("user_blogs_help")}</div>
-	  <div style="height:50px;overflow:auto">
-      {foreach from=$edituserblogs item=userblog}
-        <a id="userBlog" href="admin.php?op=editBlog&amp;blogId={$userblog->getId()}">{$userblog->getBlog()}</a><br/>
-      {/foreach}
-      </div>
-    </div>
-    </div>
-    <div style="float:right;width:50%">
-    <div class="field">
-      <label for="userIsSiteAdmin">{$locale->tr("site_admin")}</label>
-      <span class="required"></span>
-      <div class="formHelp">
-        <input class="checkbox" type="checkbox" value="1" id="userIsSiteAdmin" name="userIsSiteAdmin" {if $userIsSiteAdmin} checked="checked" {/if}/>
-		{$locale->tr("site_admin_help")}
-      </div>
-    </div>
-	<div class="field">
-		<label for="userPermissions">{$locale->tr("permissions")}</label>
-		<span class="required"></span>
-		<div class="formHelp">{$locale->tr("admin_user_permissions_help")}</div>
-		<div style="height:320px;overflow:auto">
-		{foreach from=$permissions item=perm}
-			{if $perm->isAdminOnlyPermission()}
-			  {assign var=permId value=$perm->getId()}
-			  <input type="checkbox" class="checkbox" name="userPermissions[{$perm->getId()}]" value="{$perm->getId()}" {if $userPermissions[$permId]}checked="checked"{/if} />
-			  {assign var=permDesc value=$perm->getDescription()}
-			  {$locale->tr($permDesc)}<br/>
-			{/if}
-		{/foreach}
-		</div>
-    <input type="hidden" name="userPictureId" value="{$edituser->getPictureId()}" />
-   </div>
-   </div>
-  </fieldset>  
-  <div class="buttons">
-   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
-   <input type="submit" name="Update" value="{$locale->tr("update")}"/>
-   <input type="hidden" name="userId" value="{$edituser->getId()}"/>
-   <input type="hidden" name="op" value="updateUserProfile" />
-  </div>
- </form>
\ No newline at end of file
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editSiteUsers title=$locale->tr("editUser")}
+
+{include file="$admintemplatepath/userprofile_form.template"}
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/userprofile_form.template
===================================================================
--- plog/trunk/templates/admin/userprofile_form.template	                        (rev 0)
+++ plog/trunk/templates/admin/userprofile_form.template	2007-08-10 21:57:04 UTC (rev 5816)
@@ -0,0 +1,84 @@
+<form id="editUserProfile" name="editUserProfile" action="admin.php" method="post" onSubmit="Lifetype.UI.Pages.Users.updateSubmitHook(this);return(false);">
+   <fieldset class="inputField">
+    <legend>{$locale->tr("editUser")}</legend>
+   {include file="$admintemplatepath/formvalidateajax.template"}
+    <div style="float:left;width:50%">
+    <div class="field">
+      <label for="userName">{$locale->tr("username")}</label>
+      <div class="formHelp">{$locale->tr("username_help")}</div>
+      <input type="text" id="userName" name="userName" value="{$userName}" readonly="readonly" />
+    </div>
+    <div class="field">
+      <label for="userFullName">{$locale->tr("full_name")}</label>
+      <span class="required"></span>
+      <div class="formHelp">{$locale->tr("full_name_help")}</div>
+      <input type="text" id="userFullName" name="userFullName" value="{$userFullName}"/>
+    </div>
+    <div class="field">
+      <label for="userProfilePassword">{$locale->tr("password")}</label>
+      <div class="formHelp">{$locale->tr("password_help")}</div>
+      <input type="password" name="userProfilePassword" id="userProfilePassword" value="{$userProfilePassword}" />
+      {include file="$admintemplatepath/validateajax.template" field=userProfilePassword}
+    </div>
+    <div class="field">
+      <label for="userEmail">{$locale->tr("email")}</label>
+      <span class="required">*</span>
+      <div class="formHelp">{$locale->tr("email_help")}</div>
+      <input type="text" name="userEmail" id="userEmail" value="{$userEmail}"/>
+      {include file="$admintemplatepath/validateajax.template" field=userEmail}
+    </div>
+    <div class="field">
+	  <label for="userStatus">{$locale->tr("status")}</label>
+	  <span class="required">*</span>
+	  <div class="formHelp">{$locale->tr("user_status_help")}</div>
+	  <select name="userStatus" id="userStatus">
+	   {foreach from=$userStatusList item=status key=statusKey}
+	     <option value="{$status}" {if $userStatus==$status}selected="selected"{/if}>{$locale->tr($statusKey)}</option>
+	   {/foreach}
+	  </select>
+    </div>
+    <div class="field">
+      <label for="userBlog">{$locale->tr("blogs")}</label>
+      <span class="required"></span>
+      <div class="formHelp">{$locale->tr("user_blogs_help")}</div>
+	  <div style="height:50px;overflow:auto">
+      {foreach from=$edituserblogs item=userblog}
+        <a id="userBlog" href="admin.php?op=editBlog&amp;blogId={$userblog->getId()}">{$userblog->getBlog()}</a><br/>
+      {/foreach}
+      </div>
+    </div>
+    </div>
+    <div style="float:right;width:50%">
+    <div class="field">
+      <label for="userIsSiteAdmin">{$locale->tr("site_admin")}</label>
+      <span class="required"></span>
+      <div class="formHelp">
+        <input class="checkbox" type="checkbox" value="1" id="userIsSiteAdmin" name="userIsSiteAdmin" {if $userIsSiteAdmin} checked="checked" {/if}/>
+		{$locale->tr("site_admin_help")}
+      </div>
+    </div>
+	<div class="field">
+		<label for="userPermissions">{$locale->tr("permissions")}</label>
+		<span class="required"></span>
+		<div class="formHelp">{$locale->tr("admin_user_permissions_help")}</div>
+		<div style="height:320px;overflow:auto">
+		{foreach from=$permissions item=perm}
+			{if $perm->isAdminOnlyPermission()}
+			  {assign var=permId value=$perm->getId()}
+			  <input type="checkbox" class="checkbox" name="userPermissions[{$perm->getId()}]" value="{$perm->getId()}" {if $userPermissions[$permId]}checked="checked"{/if} />
+			  {assign var=permDesc value=$perm->getDescription()}
+			  {$locale->tr($permDesc)}<br/>
+			{/if}
+		{/foreach}
+		</div>
+    <input type="hidden" name="userPictureId" value="{$edituser->getPictureId()}" />
+   </div>
+   </div>
+  </fieldset>  
+  <div class="buttons">
+   <input type="reset" name="resetButton" value="{$locale->tr("reset")}" />
+   <input type="submit" name="Update" value="{$locale->tr("update")}"/>
+   <input type="hidden" name="userId" value="{$edituser->getId()}"/>
+   <input type="hidden" name="op" value="updateUserProfile" />
+  </div>
+ </form>
\ No newline at end of file



More information about the pLog-svn mailing list