phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: wcm/inc class.boelement.inc.php,1.4,1.5 class.so


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: wcm/inc class.boelement.inc.php,1.4,1.5 class.soelement.inc.php,1.8,1.9 class.uielement.inc.php,1.6,1.7 class.uipage.inc.php,1.9,1.10
Date: Fri, 15 Feb 2002 09:09:20 -0500

Update of /cvsroot/phpgroupware/wcm/inc
In directory subversions:/tmp/cvs-serv3723/inc

Modified Files:
        class.boelement.inc.php class.soelement.inc.php 
        class.uielement.inc.php class.uipage.inc.php 
Log Message:
Allow pages to have top and bottom elements, e.g. banners or a page subheader



Index: class.boelement.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.boelement.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.boelement.inc.php     14 Feb 2002 01:04:12 -0000      1.4
--- class.boelement.inc.php     15 Feb 2002 14:09:17 -0000      1.5
***************
*** 116,119 ****
--- 116,129 ----
                }
  
+               function list_top($simple=False)
+               {
+                       return 
$this->so->list_top(array($this->start,$this->sort,$this->order,$this->query,$this->limit),$this->total,$simple);
+               }
+ 
+               function list_bottom($simple=False)
+               {
+                       return 
$this->so->list_bottom(array($this->start,$this->sort,$this->order,$this->query,$this->limit),$this->total,$simple);
+               }
+ 
                function read($id)
                {

Index: class.soelement.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.soelement.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.soelement.inc.php     14 Feb 2002 01:04:13 -0000      1.8
--- class.soelement.inc.php     15 Feb 2002 14:09:17 -0000      1.9
***************
*** 64,67 ****
--- 64,87 ----
                }
  
+               function list_top($data='',&$total,$simple=False)
+               {
+                       if(is_array($data))
+                       {
+                               if($this->debug) { _debug_array($data); }
+                               list($start,$sort,$order,$query,$limit) = $data;
+                       }
+                       return 
$this->get_list($start,$sort,$order,$query,$limit,$total,$simple,'top');
+               }
+ 
+               function list_bottom($data='',&$total,$simple=False)
+               {
+                       if(is_array($data))
+                       {
+                               if($this->debug) { _debug_array($data); }
+                               list($start,$sort,$order,$query,$limit) = $data;
+                       }
+                       return 
$this->get_list($start,$sort,$order,$query,$limit,$total,$simple,'bottom');
+               }
+ 
                function read($id)
                {
***************
*** 185,188 ****
--- 205,214 ----
                                        case 'footer':
                                                $whereclause = "WHERE 
element_hf='footer'";
+                                               break;
+                                       case 'top':
+                                               $whereclause = "WHERE 
element_hf='top'";
+                                               break;
+                                       case 'bottom':
+                                               $whereclause = "WHERE 
element_hf='bottom'";
                                                break;
                                        default:

Index: class.uielement.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.uielement.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** class.uielement.inc.php     14 Feb 2002 01:04:13 -0000      1.6
--- class.uielement.inc.php     15 Feb 2002 14:09:17 -0000      1.7
***************
*** 303,306 ****
--- 303,308 ----
                                        
$GLOBALS['phpgw']->template->set_var('selected_isheader',' checked');
                                        
$GLOBALS['phpgw']->template->set_var('selected_isfooter','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_istop','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isbottom','');
                                        break;
                                case 'footer':
***************
*** 308,311 ****
--- 310,329 ----
                                        
$GLOBALS['phpgw']->template->set_var('selected_isheader','');
                                        
$GLOBALS['phpgw']->template->set_var('selected_isfooter',' checked');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_istop','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isbottom','');
+                                       break;
+                               case 'top':
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isnormal','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isheader','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isfooter','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_istop',' checked');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isbottom','');
+                                       break;
+                               case 'bottom':
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isnormal','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isheader','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isfooter','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_istop','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isbottom',' checked');
                                        break;
                                default:
***************
*** 313,320 ****
                                        
$GLOBALS['phpgw']->template->set_var('selected_isheader','');
                                        
$GLOBALS['phpgw']->template->set_var('selected_isfooter','');
                        }
!                       
$GLOBALS['phpgw']->template->set_var('lang_is_normal',lang('Is a normal 
element'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_is_header',lang('Is a header'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_is_footer',lang('Is a footer'));
  
                        switch($element['element_type'])
--- 331,343 ----
                                        
$GLOBALS['phpgw']->template->set_var('selected_isheader','');
                                        
$GLOBALS['phpgw']->template->set_var('selected_isfooter','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_istop','');
+                                       
$GLOBALS['phpgw']->template->set_var('selected_isbottom','');
                        }
!                       
$GLOBALS['phpgw']->template->set_var('lang_ele_type',lang('Element type'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_normal',lang('normal'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_header',lang('header'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_footer',lang('footer'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_top',lang('top'));
!                       
$GLOBALS['phpgw']->template->set_var('lang_bottom',lang('bottom'));
  
                        switch($element['element_type'])

Index: class.uipage.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.uipage.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.uipage.inc.php        14 Feb 2002 01:04:13 -0000      1.9
--- class.uipage.inc.php        15 Feb 2002 14:09:17 -0000      1.10
***************
*** 237,240 ****
--- 237,242 ----
                        
$GLOBALS['phpgw']->template->set_block('form','edit','edithandle');
                        
$GLOBALS['phpgw']->template->set_block('form','elem','elementhandle');
+                       
$GLOBALS['phpgw']->template->set_block('form','top_elem','topelementhandle');
+                       
$GLOBALS['phpgw']->template->set_block('form','bottom_elem','botelementhandle');
  
                        $page_id = $GLOBALS['HTTP_POST_VARS']['page_id'] ? 
$GLOBALS['HTTP_POST_VARS']['page_id'] : $GLOBALS['HTTP_GET_VARS']['page_id'];
***************
*** 271,277 ****
                                                'admin_email'   => 
addslashes($GLOBALS['HTTP_POST_VARS']['admin_email']),
                                                'page_elements' => array(
!                                                       'left'  => 
$GLOBALS['HTTP_POST_VARS']['page_element_left'],
!                                                       'mid'   => 
$GLOBALS['HTTP_POST_VARS']['page_element_mid'],
!                                                       'right' => 
$GLOBALS['HTTP_POST_VARS']['page_element_right']
                                                ),
                                                'page_header'   => 
addslashes($GLOBALS['HTTP_POST_VARS']['page_header']),
--- 273,281 ----
                                                'admin_email'   => 
addslashes($GLOBALS['HTTP_POST_VARS']['admin_email']),
                                                'page_elements' => array(
!                                                       'top'    => 
$GLOBALS['HTTP_POST_VARS']['page_element_top'],
!                                                       'left'   => 
$GLOBALS['HTTP_POST_VARS']['page_element_left'],
!                                                       'mid'    => 
$GLOBALS['HTTP_POST_VARS']['page_element_mid'],
!                                                       'right'  => 
$GLOBALS['HTTP_POST_VARS']['page_element_right'],
!                                                       'bottom' => 
$GLOBALS['HTTP_POST_VARS']['page_element_bottom']
                                                ),
                                                'page_header'   => 
addslashes($GLOBALS['HTTP_POST_VARS']['page_header']),
***************
*** 337,340 ****
--- 341,346 ----
                        
$GLOBALS['phpgw']->template->set_var('lang_mid',lang('Middle'));
                        
$GLOBALS['phpgw']->template->set_var('lang_right',lang('Right'));
+                       
$GLOBALS['phpgw']->template->set_var('lang_top',lang('Top'));
+                       
$GLOBALS['phpgw']->template->set_var('lang_bottom',lang('Bottom'));
  
                        
$GLOBALS['phpgw']->template->set_var('page_name',$page['page_name']);
***************
*** 356,359 ****
--- 362,373 ----
                        
$GLOBALS['phpgw']->template->set_var('page_version',$page['page_version']);
  
+                       $list_top = $this->boelements->list_top(True);
+                       for($i=0;$i<3;$i++)
+                       {
+                               $GLOBALS['phpgw']->template->set_var('num',$i + 
1);
+                               
$GLOBALS['phpgw']->template->set_var('element_top',$this->formatted_list('page_element_top['
 . $i . ']',$list_top,$page['page_elements']['top'][$i],'---'));
+                               
$GLOBALS['phpgw']->template->fp('top_elements','top_elem',True);
+                       }
+ 
                        $list_normal = $this->boelements->list_normal(True);
                        for($i=0;$i<8;$i++)
***************
*** 366,372 ****
--- 380,396 ----
                        }
  
+                       $list_bottom = $this->boelements->list_bottom(True);
+                       for($i=0;$i<3;$i++)
+                       {
+                               $GLOBALS['phpgw']->template->set_var('num',$i + 
1);
+                               
$GLOBALS['phpgw']->template->set_var('element_bottom',$this->formatted_list('page_element_bottom['
 . $i . ']',$list_bottom,$page['page_elements']['bottom'][$i],'---'));
+                               
$GLOBALS['phpgw']->template->fp('bottom_elements','bottom_elem',True);
+                       }
+ 
                        $GLOBALS['phpgw']->template->set_var('edithandle','');
                        $GLOBALS['phpgw']->template->set_var('addhandle','');
                        
$GLOBALS['phpgw']->template->set_var('elementhandle','');
+                       
$GLOBALS['phpgw']->template->set_var('topelementhandle','');
+                       
$GLOBALS['phpgw']->template->set_var('botelementhandle','');
  
                        if(isset($page['page_id']) || $page_id)




reply via email to

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