phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] ged templates/base/update_file.tpl inc/class.fl...


From: Pascal Vilarem
Subject: [Phpgroupware-cvs] ged templates/base/update_file.tpl inc/class.fl...
Date: Mon, 12 Nov 2007 16:20:52 +0000

CVSROOT:        /sources/phpgroupware
Module name:    ged
Changes by:     Pascal Vilarem <maat>   07/11/12 16:20:52

Modified files:
        templates/base : update_file.tpl 
        inc            : class.flow_client.inc.php 

Log message:
        added : ability to define more freely version numbers

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/update_file.tpl?cvsroot=phpgroupware&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.flow_client.inc.php?cvsroot=phpgroupware&r1=1.9&r2=1.10

Patches:
Index: templates/base/update_file.tpl
===================================================================
RCS file: /sources/phpgroupware/ged/templates/base/update_file.tpl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- templates/base/update_file.tpl      26 Jul 2007 18:25:29 -0000      1.9
+++ templates/base/update_file.tpl      12 Nov 2007 16:20:51 -0000      1.10
@@ -11,7 +11,7 @@
 </td>
 </tr>                  
 <tr>
-<td style="vertical-align: top; width: 50px;">{lang_name}<br>
+<td style="vertical-align: top; width: 50px;">{lang_name} :<br>
 </td>
 <td style="vertical-align: top;"><input type="text" 
default_class="{input_default_class}"  focused_class="{input_active_class}" 
name="{file_name_field}" value="{file_name_value}" size="40" />
 </td>
@@ -24,9 +24,7 @@
 <td style="vertical-align: top;">{select_type} (CARE : if you change this 
field with a chrono type, reference will be overriden)
 </td>
 </tr>
-<td>
-  {lang_reference} : 
-</td>
+<td>{lang_reference} :</td>
 <td>  
   <input type="text" default_class="{input_default_class}"  
focused_class="{input_active_class}" name="{referenceq_field}" 
value="{new_reference}" size="40" maxlength="40"/>
 </td>
@@ -74,18 +72,17 @@
 </td>
 </tr>
 <tr>
-<td style="vertical-align: top; width: 50px;">Description<br>
+<td>
+  {lang_version} :
 </td>
-<td style="vertical-align: top;"><textarea name="{version_description_field}" 
name="description" rows="10" cols="50" wrap="off" 
>{version_description_value}</textarea>
+<td>  
+  <input type="text" default_class="{input_default_class}"  
focused_class="{input_active_class}" name="{major_field}" value="{major_value}" 
size="2" maxlength="2"/> . <input type="text" 
default_class="{input_default_class}"  focused_class="{input_active_class}" 
name="{minor_field}" value="{minor_value}" size="2" maxlength="2"/>
 </td>
 </tr>
 <tr>
-<td style="vertical-align: top; width: 50px;">type<br>
+<td style="vertical-align: top; width: 50px;">Description<br>
 </td>
-<td style="vertical-align: top;">
-<!-- BEGIN version_type_block -->
-{version_type_label} <input type="radio" name="{version_type_field}" 
value="{version_type_value}" {version_type_checked} /> 
-<!-- END version_type_block -->  
+<td style="vertical-align: top;"><textarea name="{version_description_field}" 
name="description" rows="10" cols="50" wrap="off" 
>{version_description_value}</textarea>
 </td>
 </tr>
 </table>

Index: inc/class.flow_client.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.flow_client.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- inc/class.flow_client.inc.php       9 Nov 2007 15:15:17 -0000       1.9
+++ inc/class.flow_client.inc.php       12 Nov 2007 16:20:52 -0000      1.10
@@ -478,13 +478,28 @@
              
                        }                       
                                                
-                       // TODO : replace with 2 fields allowing to set up 
version
-                       $version_type="major";
-                       
                        // display form if needed
                        if ( $function_result['status'] != 'ok')
                        {                               
                                
+                               if ( (int)$new_major_value != 0 )
+                               {
+                                       $major=$new_major_value;
+                               }
+                               else
+                               {
+                                       $major=$version['major'];
+                               }
+                               
+                               if ( (int)$new_minor_value != 0 )
+                               {
+                                       $minor=$new_minor_value;
+                               }
+                               else
+                               {
+                                       $minor=$version['minor']+1;
+                               }
+                               
                                
$this->t->set_file(array('update_file_tpl'=>'update_file.tpl'));
                                $this->load_template_defaults();
                                $this->display_app_header();                    
        
@@ -516,8 +531,8 @@
                                
                                $this->t->set_var('major_field', 'major');
                                $this->t->set_var('minor_field', 'minor');
-                               $this->t->set_var('major_value', 1);
-                               $this->t->set_var('minor_value', 0);
+                               $this->t->set_var('major_value', $major);
+                               $this->t->set_var('minor_value', $minor);
                                                
                                $this->t->set_var('file_description_field', 
'file_description');
                                $this->t->set_var('version_description_field', 
'version_description');




reply via email to

[Prev in Thread] Current Thread [Next in Thread]