CVS update: /cowiki/htdocs/tpl/africa/, /cowiki/htdocs/tpl/curare/, /cowiki/htdocs/tpl/default/, /cowiki/htdocs/tpl/spitsbergen/, /cowiki/includes/cowiki/plugin/

[email protected] 13 Sep 2005 01:47:25 -0000
Newsgroups gmane.comp.php.cowiki.cvs
Message-ID <[email protected]>
User: dgorski 
Date: 2005/09/12 18:47:25

Modified:
   cowiki/htdocs/tpl/africa/plugin.front.doc.edit.tpl
   cowiki/htdocs/tpl/curare/plugin.front.doc.edit.tpl
   cowiki/htdocs/tpl/default/plugin.front.doc.edit.tpl
   cowiki/htdocs/tpl/spitsbergen/plugin.front.doc.edit.tpl
   cowiki/includes/cowiki/plugin/class.PrivateFrontDocumentEditor.php

Log:
 Added "change log" input field for a short summary what a user has changed in a document

File Changes:

Directory: /cowiki/htdocs/tpl/africa/
=====================================

File [changed]: plugin.front.doc.edit.tpl
Url: http://cowiki.tigris.org/source/browse/cowiki/htdocs/tpl/africa/plugin.front.doc.edit.tpl?r1=1.2&r2=1.3
Delta lines:  +16 -0
--------------------
--- plugin.front.doc.edit.tpl	15 Jan 2005 23:38:30 -0000	1.2
+++ plugin.front.doc.edit.tpl	13 Sep 2005 01:47:22 -0000	1.3
@@ -97,6 +97,22 @@
     </td>
   </tr>
 
+  {ifdefined %TPL_EDITING_EXISTING_DOCUMENT%}
+    {* Separator *}
+    {include inc.window.tr.separator.tuborg.tpl}
+  
+    <tr>
+      <td style="padding: 0px 5px 0px 5px;">
+        <table cellpadding="2" cellspacing="0" border="0">
+          <tr>
+            <td nowrap>{%I18N_DOC_CHANGE_LOG%}:</td>
+            <td width="100%">{%TPL_ITEM_CHANGELOG%}</td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  {/ifdefined}
+
   {* Separator *}
   {include inc.window.tr.separator.tuborg.tpl}
 

Directory: /cowiki/htdocs/tpl/curare/
=====================================

File [changed]: plugin.front.doc.edit.tpl
Url: http://cowiki.tigris.org/source/browse/cowiki/htdocs/tpl/curare/plugin.front.doc.edit.tpl?r1=1.5&r2=1.6
Delta lines:  +16 -0
--------------------
--- plugin.front.doc.edit.tpl	15 Jan 2005 23:38:30 -0000	1.5
+++ plugin.front.doc.edit.tpl	13 Sep 2005 01:47:22 -0000	1.6
@@ -97,6 +97,22 @@
     </td>
   </tr>
 
+  {ifdefined %TPL_EDITING_EXISTING_DOCUMENT%}
+    {* Separator *}
+    {include inc.window.tr.separator.tuborg.tpl}
+  
+    <tr>
+      <td style="padding: 0px 5px 0px 5px;">
+        <table cellpadding="2" cellspacing="0" border="0">
+          <tr>
+            <td nowrap>{%I18N_DOC_CHANGE_LOG%}:</td>
+            <td width="100%">{%TPL_ITEM_CHANGELOG%}</td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  {/ifdefined}
+
   {* Separator *}
   {include inc.window.tr.separator.tuborg.tpl}
 

Directory: /cowiki/htdocs/tpl/default/
======================================

File [changed]: plugin.front.doc.edit.tpl
Url: http://cowiki.tigris.org/source/browse/cowiki/htdocs/tpl/default/plugin.front.doc.edit.tpl?r1=1.10&r2=1.11
Delta lines:  +16 -0
--------------------
--- plugin.front.doc.edit.tpl	15 Jan 2005 23:38:30 -0000	1.10
+++ plugin.front.doc.edit.tpl	13 Sep 2005 01:47:22 -0000	1.11
@@ -97,6 +97,22 @@
     </td>
   </tr>
 
+  {ifdefined %TPL_EDITING_EXISTING_DOCUMENT%}
+    {* Separator *}
+    {include inc.window.tr.separator.tuborg.tpl}
+  
+    <tr>
+      <td style="padding: 0px 5px 0px 5px;">
+        <table cellpadding="2" cellspacing="0" border="0">
+          <tr>
+            <td nowrap>{%I18N_DOC_CHANGE_LOG%}:</td>
+            <td width="100%">{%TPL_ITEM_CHANGELOG%}</td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  {/ifdefined}
+
   {* Separator *}
   {include inc.window.tr.separator.tuborg.tpl}
 

Directory: /cowiki/htdocs/tpl/spitsbergen/
==========================================

File [changed]: plugin.front.doc.edit.tpl
Url: http://cowiki.tigris.org/source/browse/cowiki/htdocs/tpl/spitsbergen/plugin.front.doc.edit.tpl?r1=1.2&r2=1.3
Delta lines:  +16 -0
--------------------
--- plugin.front.doc.edit.tpl	15 Jan 2005 23:38:30 -0000	1.2
+++ plugin.front.doc.edit.tpl	13 Sep 2005 01:47:22 -0000	1.3
@@ -97,6 +97,22 @@
     </td>
   </tr>
 
+  {ifdefined %TPL_EDITING_EXISTING_DOCUMENT%}
+    {* Separator *}
+    {include inc.window.tr.separator.tuborg.tpl}
+  
+    <tr>
+      <td style="padding: 0px 5px 0px 5px;">
+        <table cellpadding="2" cellspacing="0" border="0">
+          <tr>
+            <td nowrap>{%I18N_DOC_CHANGE_LOG%}:</td>
+            <td width="100%">{%TPL_ITEM_CHANGELOG%}</td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  {/ifdefined}
+
   {* Separator *}
   {include inc.window.tr.separator.tuborg.tpl}
 

Directory: /cowiki/includes/cowiki/plugin/
==========================================

File [changed]: class.PrivateFrontDocumentEditor.php
Url: http://cowiki.tigris.org/source/browse/cowiki/includes/cowiki/plugin/class.PrivateFrontDocumentEditor.php?r1=1.34&r2=1.35
Delta lines:  +21 -2
--------------------
--- class.PrivateFrontDocumentEditor.php	12 Sep 2005 20:05:50 -0000	1.34
+++ class.PrivateFrontDocumentEditor.php	13 Sep 2005 01:47:22 -0000	1.35
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.PrivateFrontDocumentEditor.php,v 1.34 2005/09/12 20:05:50 dgorski Exp $
+ * $Id: class.PrivateFrontDocumentEditor.php,v 1.35 2005/09/13 01:47:22 dgorski Exp $
  *
  * This file is part of coWiki. coWiki is free software under the terms of
  * the GNU General Public License (GPL). Read the LICENSE file. If you did
@@ -31,7 +31,7 @@
  * @author      Daniel T. Gorski, <[email protected]>
  * @copyright   (C) Daniel T. Gorski, {@link http://www.develnet.org}
  * @license     http://www.gnu.org/licenses/gpl.html
- * @version     $Revision: 1.34 $
+ * @version     $Revision: 1.35 $
  *
  */
 
@@ -99,6 +99,11 @@
         $bSubmitted = false;
         $bCreateNew = $this->Request->get('cmd') == CMD_NEWDOC;
 
+        // Variable for later template flow control.
+        if (!$bCreateNew) {
+            $this->Template->set('TPL_EDITING_EXISTING_DOCUMENT', true);
+        }
+
         // ----------------------------------------------------------------
 
         // Check user access.
@@ -130,6 +135,9 @@
             // Parse into raw coWiki representation
             $Edit->set('content', $RevParser->parse($Edit->get('content')));
 
+            // Reset the change log entry
+            $Edit->set('changelog', '');
+
         } else {
 
             // Create a new (empty) DocumentItem
@@ -183,6 +191,7 @@
 
                 $Edit->set('name',     trim($this->Request->get('name')));
                 $Edit->set('keywords', trim($this->Request->get('keywords')));
+                $Edit->set('changelog',trim($this->Request->get('changelog')));
                 $Edit->set('content',  $sContent);
 
                 // "Guest" must not change it
@@ -584,6 +593,16 @@
         $sStr .=  '</textarea>';
 
         $this->Template->set('TPL_ITEM_CONTENT', $sStr);
+
+        // ----------------------------------------------------------------
+
+        // Document change log
+        $sStr = '<input type="text" name="changelog" size="40"';
+        $sStr .=  ' style="width:100%"';
+        $sStr .=  ' value="'.escape($Edit->get('changelog')).'"';
+        $sStr .=  ' maxlength="255">';
+
+        $this->Template->set('TPL_ITEM_CHANGELOG', $sStr);
 
         // ----------------------------------------------------------------