phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.195,1.196 cl


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.195,1.196 class.preferences.inc.php,1.47,1.48
Date: Sat, 19 Apr 2003 19:17:43 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv10300

Modified Files:
        class.common.inc.php class.preferences.inc.php 
Log Message:
moved function deisplay_entry from admin to api

Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.195
retrieving revision 1.196
diff -C2 -r1.195 -r1.196
*** class.common.inc.php        30 Mar 2003 11:04:57 -0000      1.195
--- class.common.inc.php        19 Apr 2003 23:17:40 -0000      1.196
***************
*** 44,47 ****
--- 44,53 ----
                var $debug_info; // An array with debugging info from the API
                var $found_files;
+               var $output;
+ 
+               function common()
+               {
+                       $this->output = array();
+               }
  
                /*!
***************
*** 1059,1072 ****
                        $this->navbar();
                        
!                       $app_title = 
isset($GLOBALS['phpgw_info']['flags']['currentapp']) ? ' 
['.$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title'].']'
 : '';
                        $css = $this->get_css_url();
                        $var = array
                        (
                                'charset'                       => 
lang('charset'),
!                               'website_title'         => 
$GLOBALS['phpgw_info']['server']['site_title'].$app_title,
                                'webserver_url'         => 
$GLOBALS['phpgw_info']['server']['webserver_url'],
                                'phpgw_css_file'        => $css[0],
                                'theme_css_file'        => $css[1],
!                               'app_tpl'                       => $app_tpl
                        );
  
--- 1065,1079 ----
                        $this->navbar();
                        
!                       $cur_app        = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
!                       $app_title      = isset($cur_app) ? ' [' . 
$GLOBALS['phpgw_info']['apps'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']
 . ']' : '';
                        $css = $this->get_css_url();
                        $var = array
                        (
                                'charset'                       => 
lang('charset'),
!                               'website_title'         => 
$GLOBALS['phpgw_info']['server']['site_title'] . $app_title,
                                'webserver_url'         => 
$GLOBALS['phpgw_info']['server']['webserver_url'],
                                'phpgw_css_file'        => $css[0],
                                'theme_css_file'        => $css[1],
!                               'current_app'           => $cur_app
                        );
  
***************
*** 1080,1085 ****
                        }
  
-                       $cur_app = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
- 
                        switch 
($GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'])
                        {
--- 1087,1090 ----
***************
*** 1162,1171 ****
                                
                                case 'verdilak':
-                                       $app = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                                        $var['logo_img']        = 
$this->image('phpgwapi','logo');
!                                       $var['home_img']        = 
$this->image('phpgwapi','welcome-'.($app=='home' ? 'red' : 'grey'));
!                                       $var['prefs_img']       = 
$this->image('preferences','preferences-'.($app=='preferences' ? 'red' : 
'grey'));
                                        $var['logout_img']      = 
$this->image('phpgwapi','logout');
!                                       $var['about_img']       = 
$this->image('phpgwapi','about-'.($app=='about' ? 'red' : 'grey'));
                                        $var['help_img']        = 
$this->image('phpgwapi','help');
                                        $var['greybar']         = 
$this->image('phpgwapi','greybar');
--- 1167,1175 ----
                                
                                case 'verdilak':
                                        $var['logo_img']        = 
$this->image('phpgwapi','logo');
!                                       $var['home_img']        = 
$this->image('phpgwapi','welcome-'.($cur_app=='home' ? 'red' : 'grey'));
!                                       $var['prefs_img']       = 
$this->image('preferences','preferences-'.($cur_app=='preferences' ? 'red' : 
'grey'));
                                        $var['logout_img']      = 
$this->image('phpgwapi','logout');
!                                       $var['about_img']       = 
$this->image('phpgwapi','about-'.($cur_app=='about' ? 'red' : 'grey'));
                                        $var['help_img']        = 
$this->image('phpgwapi','help');
                                        $var['greybar']         = 
$this->image('phpgwapi','greybar');
***************
*** 1314,1318 ****
  
                        $var['app_tpl'] = '';
-                       $var['current_app'] = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
  
                        $menuaction     = get_var('menuaction',Array('GET'));
--- 1318,1321 ----
***************
*** 1639,1642 ****
--- 1642,1688 ----
                                        echo 'Page loaded in ' . 
($GLOBALS['debug_timer_stop'] - $GLOBALS['debug_timer_start']) . ' seconds.';
                                }
+                       }
+               }
+ 
+               
/**************************************************************************\
+               * function to display the applications preferences and admin 
links         *
+               
\**************************************************************************/
+ 
+               function display_mainscreen($appname,$file,$file2=False)
+               {
+                       if ($file2)
+                       {
+                               $file = $file2;
+                       }
+ 
+                       if(is_array($file))
+                       {
+                               $icon = 
$GLOBALS['phpgw']->common->image($appname,'navbar','',True);
+ 
+                               while(is_array($file) && list($text,$url) = 
each($file))
+                               {
+                                       $link_data[] = array
+                                       (
+                                               'pref_link'     => $url,
+                                               'pref_text'     => $text
+                                       );
+                               }
+ 
+                               if ($icon)
+                               {
+                                       $pref = 'app_row_icon';
+                               }
+                               else
+                               {
+                                       $pref = 'app_row_noicon';
+                               }
+ 
+                               $this->output[$pref][] = array
+                               (
+                                       'app_title' => 
$GLOBALS['phpgw_info']['apps'][$appname]['title'],
+                                       'app_name'      => $appname,
+                                       'app_icon'      => $icon,
+                                       'link_row'      => $link_data
+                               );
                        }
                }

Index: class.preferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.preferences.inc.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** class.preferences.inc.php   26 Dec 2002 20:43:00 -0000      1.47
--- class.preferences.inc.php   19 Apr 2003 23:17:40 -0000      1.48
***************
*** 5,12 ****
        * and Mark Peters <address@hidden>                               *
        * Manages user preferences                                              
   *
!       * Copyright (C) 2000, 2001 Joseph Engo                                  
   *
        * 
-------------------------------------------------------------------------*
        * This library is part of the phpGroupWare API                          
   *
!       * http://www.phpgroupware.org/api                                       
   *
        * 
------------------------------------------------------------------------ *
        * This library is free software; you can redistribute it and/or modify 
it  *
--- 5,12 ----
        * and Mark Peters <address@hidden>                               *
        * Manages user preferences                                              
   *
!       * Copyright (C) 2000 - 2003 Joseph Engo                                 
   *
        * 
-------------------------------------------------------------------------*
        * This library is part of the phpGroupWare API                          
   *
!       * http://www.phpgroupware.org                                           
   *
        * 
------------------------------------------------------------------------ *
        * This library is free software; you can redistribute it and/or modify 
it  *
***************
*** 22,26 ****
        * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA         
   *
        
\**************************************************************************/
- 
        /* $Id$ */
  
--- 22,25 ----
***************
*** 56,61 ****
                function preferences($account_id = '')
                {
!                       $this->db         = $GLOBALS['phpgw']->db;
!                       $this->account_id = get_account_id($account_id);
                }
  
--- 55,60 ----
                function preferences($account_id = '')
                {
!                       $this->db                       = $GLOBALS['phpgw']->db;
!                       $this->account_id       = get_account_id($account_id);
                }
  





reply via email to

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