phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] [18610] applying patch from sv bug #23399


From: Dave Hall
Subject: [Phpgroupware-cvs] [18610] applying patch from sv bug #23399
Date: Mon, 09 Jun 2008 06:51:21 +0000

Revision: 18610
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18610
Author:   skwashd
Date:     2008-06-09 06:51:20 +0000 (Mon, 09 Jun 2008)

Log Message:
-----------
applying patch from sv bug #23399

Ticket Links:
:-----------
    http://savannah.gnu.org/bugs/?23399

Modified Paths:
--------------
    trunk/addressbook/inc/class.catalog_manager.inc.php
    trunk/addressbook/templates/base/config.tpl

Modified: trunk/addressbook/inc/class.catalog_manager.inc.php
===================================================================
--- trunk/addressbook/inc/class.catalog_manager.inc.php 2008-06-09 06:46:30 UTC 
(rev 18609)
+++ trunk/addressbook/inc/class.catalog_manager.inc.php 2008-06-09 06:51:20 UTC 
(rev 18610)
@@ -8,6 +8,7 @@
   *                                                                          *
   * Originally Written by Jonathan Alberto Rivera Gomez - jarg at co.com.mx  *
   * Current Maintained by Jonathan Alberto Rivera Gomez - jarg at co.com.mx  *
+  *                       jason king               pizza at netspace.net.au  *
   * --------------------------------------------                             *
   * Development of this application was funded by http://www.sogrp.com       *
   * --------------------------------------------                             *
@@ -19,19 +20,20 @@
 
        class catalog_manager
        {
-               var $form_action;
-               var $catalog_name;
-               var $headers;
-               var $array_name;
-               var $objs_data;
-               var $index;
-               var $entry;
-               var $action;
-               var $form_fields;
-               var $title;
-               var $catalog_button_name;
-               var $num_cols;
-               
+               public $form_action;
+               public $catalog_name;
+               public $headers;
+               public $array_name;
+               public $array_value;
+               public $objs_data;
+               public $index;
+               public $entry;
+               public $action;
+               public $form_fields;
+               public $title;
+               public $catalog_button_name;
+               public $num_cols;
+               public $key_edit_id;
                function catalog_manager()
                {
                }
@@ -61,7 +63,7 @@
                        $this->template->set_file(array('form' => 'form.tpl'));
                        $this->template->set_var('principal_tabs_inc', '');
                        $this->template->set_var('action', 
$GLOBALS['phpgw']->link('/index.php',
-                                                                               
   $this->form_action));
+                                                                               
  array('menuaction' => $this->form_action)));
                        $this->template->set_var('tab', '');
                        $this->template->set_var('current_tab_body', 
$this->current_body($catalog_name, $entry, $title));
                        $this->template->set_var('control_buttons', '');
@@ -112,7 +114,7 @@
 
                        if($button)
                        {
-                               $this->template->set_var('caption_detail', 
$title);
+                               $this->template->set_var('caption_detail', 
$this->title);
                                $this->template->set_var('add_button', 
$add_button);
                        }
                        else
@@ -120,9 +122,6 @@
                                $this->template->set_var('caption_detail', '');
                                $this->template->set_var('add_button', '');
                        }
-                       
-                        $this->template->set_var('row_bgc', 
$GLOBALS['phpgw_info']['theme']['th_bg']);
-                       $tr_color = $GLOBALS['phpgw_info']['theme']['row_on'];
 
                        $cols='';
                        foreach($headers as $head)
@@ -134,16 +133,15 @@
 
                         $this->template->fp('input_detail', 
'input_detail_data', True);
                         $this->template->fp('detail_body_set', 
'input_detail_row');
-
+                       $tr_class = 'row_off';
                         if (is_array($this->$array_name))
                         {
                                 foreach($this->$array_name as $k => $v)
                                {
-                                       $id = $v[$idx]; 
                                        $this->array_value = $v;
 
-                                       $tr_color = 
$this->nextmatchs->alternate_row_color($tr_color);
-                                       $this->template->set_var('row_bgc', 
$tr_color);
+                                       $tr_class = 
$this->nextmatchs->alternate_row_class($tr_class);
+                                       $this->template->set_var('row_bgc', 
$tr_class);
                                        
                                        $cols='';                       
                                        reset($objs_data);
@@ -158,12 +156,6 @@
                                        $this->template->fp('detail_body_set', 
'input_detail_row');
                                 }
                         }
-
-                        $this->template->set_var('th_bg',   
$GLOBALS['phpgw_info']['theme']['th_bg']);
-                        $this->template->set_var('th_text', 
$GLOBALS['phpgw_info']['theme']['th_text']);
-                        $this->template->set_var('row_on',  
$GLOBALS['phpgw_info']['theme']['row_on']);
-                        $this->template->set_var('row_off', 
$GLOBALS['phpgw_info']['theme']['row_off']);
-                        
$this->template->set_var('row_text',$GLOBALS['phpgw_info']['theme']['row_text']);
                         return $this->template->fp('out', 'detail_body');
                 }
 
@@ -188,25 +180,18 @@
                */
                function form_end()
                {
-                       $this->template->set_var('th_bg',   
$GLOBALS['phpgw_info']['theme']['th_bg']);
-                       $this->template->set_var('th_text', 
$GLOBALS['phpgw_info']['theme']['th_text']);
-                       $this->template->set_var('row_on',  
$GLOBALS['phpgw_info']['theme']['row_on']);
-                       $this->template->set_var('row_off', 
$GLOBALS['phpgw_info']['theme']['row_off']);
-                       
$this->template->set_var('row_text',$GLOBALS['phpgw_info']['theme']['row_text']);
                }
 
                function set_form_fields($form_fields)
                {
-                       $tr_color = $GLOBALS['phpgw_info']['theme']['row_on'];
-
                        ksort($form_fields, SORT_NUMERIC);
                        $last_element = count($form_fields);
                        $cols='';
                        $count=1;
-                       
+                       $tr_class = 'row_off';
                        foreach($form_fields as $key => $row)
                        {
-                               $tr_color = 
$this->nextmatchs->alternate_row_color($tr_color);
+                               $tr_class = 
$this->nextmatchs->alternate_row_class($tr_class);
                                $cols = $cols . 
'<td>'.$row[0].'</td>'.'<td>'.$row[1].'</td>';;
                                if($count == $this->num_cols || 
$key==$last_element)
                                {
@@ -257,6 +242,7 @@
                                $column_data = 
$this->array_value[$properties['field']];
                                break;
                        case 'text':
+                               $sub_name = "";
                                if(isset($properties['field']) && 
$properties['field']!='')
                                {
                                        $sub_name = '[' . 
$this->array_value[$properties['field']] . ']" ';
@@ -278,8 +264,12 @@
                                        .'" value="' . 
$this->array_value[$properties['value']] . '"'. $checked . '>';
                                break;
                        case 'link':
-                               $link = $GLOBALS['phpgw']->link('/index.php', 
$this->form_action)
-                                       . '&'. $properties['action'] . '=' . 
$this->array_value[$properties['key']] . $properties['extra'];
+                               $link_array = array(
+                                       'menuaction'    => $this->form_action,
+                                       'action'        => 
$this->array_value[$properties['key']]
+                               );
+                               $link = 
$GLOBALS['phpgw']->link('/index.php',$link_array);
+                               unset($link_array);
                                $column_data = '<a 
href="'.$link.'">'.$properties['mode'].'</a>';
                                break;
                        case 'combo':

Modified: trunk/addressbook/templates/base/config.tpl
===================================================================
--- trunk/addressbook/templates/base/config.tpl 2008-06-09 06:46:30 UTC (rev 
18609)
+++ trunk/addressbook/templates/base/config.tpl 2008-06-09 06:51:20 UTC (rev 
18610)
@@ -1,28 +1,31 @@
 <!-- BEGIN header -->
 <form method="POST" action="{action_url}">
 <table border="0" align="center">
-   <tr bgcolor="{th_bg}">
-          <td colspan="2"><font 
color="{th_text}">&nbsp;<b>{title}</b></font></td>
-   </tr>
-   <tr bgcolor="{th_err}">
-    <td colspan="2">&nbsp;<b>{error}</b></font></td>
-   </tr>
+  <thead>
+    <tr>
+      <td colspan="2">&nbsp;<b>{title}</b></td>
+    </tr>
+    <tr class="msg">
+       <td colspan="2">&nbsp;<b>{error}</b></td>
+    </tr>
+  </thead>
+  <tbody>
 <!-- END header -->
 <!-- BEGIN body -->
-   <tr bgcolor="{row_on}">
+   <tr class="row_on">
     <td colspan="2">&nbsp;</td>
    </tr>
-   <tr bgcolor="{row_off}">
+   <tr class="row_off">
     <td 
colspan="2">&nbsp;<b>{lang_Addressbook}/{lang_Contact_Settings}</b></font></td>
    </tr>
-   <tr bgcolor="{row_on}">
+   <tr class="row_on">
     <td>{lang_Contact_application}:</td>
     <td><input name="newsettings[contact_application]" 
value="{value_contact_application}"></td>
    </tr>
-   <tr bgcolor="{row_off}">
+   <tr class="row_off">
     <td align="center" 
colspan="2">{lang_WARNING!!_LDAP_is_valid_only_if_you_are_NOT_using_contacts_for_accounts_storage!}</td>
    </tr>
-   <tr bgcolor="{row_off}">
+   <tr class="row_off">
     <td>{lang_Select_where_you_want_to_store}/{lang_retrieve_contacts}.</td>
     <td>
      <select name="newsettings[contact_repository]">
@@ -31,25 +34,25 @@
      </select>
     </td>
    </tr>
-   <tr bgcolor="{row_on}">
+   <tr class="row_on">
     <td>{lang_LDAP_host_for_contacts}:</td>
     <td><input name="newsettings[ldap_contact_host]" 
value="{value_ldap_contact_host}"></td>
    </tr>
-   <tr bgcolor="{row_off}">
+   <tr class="row_off">
     <td>{lang_LDAP_context_for_contacts}:</td>
     <td><input name="newsettings[ldap_contact_context]" 
value="{value_ldap_contact_context}" size="40"></td>
    </tr>
-  <tr bgcolor="{row_on}">
+  <tr class="row_on">
    <td>{lang_LDAP_root_dn_for_contacts}:</td>
    <td><input name="newsettings[ldap_contact_dn]" 
value="{value_ldap_contact_dn}" size="40"></td>
   </tr>
-  <tr bgcolor="{row_off}">
+  <tr class="row_off">
    <td>{lang_LDAP_root_pw_for_contacts}:</td>
    <td><input name="newsettings[ldap_contact_pw]" type="password" 
value=""></td>
   </tr>
 <!-- END body -->
 <!-- BEGIN footer -->
-  <tr bgcolor="{th_bg}">
+  <tr class="th">
     <td colspan="2">
 &nbsp;
     </td>
@@ -60,6 +63,7 @@
       <input type="submit" name="cancel" value="{lang_cancel}">
     </td>
   </tr>
+  </tbody>
 </table>
 </form>
 <!-- END footer -->






reply via email to

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