phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] manual inc/class.help.inc.php inc/class.help_he...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] manual inc/class.help.inc.php inc/class.help_he...
Date: Wed, 07 Mar 2007 10:44:39 +0000

CVSROOT:        /sources/phpgroupware
Module name:    manual
Changes by:     Sigurd Nes <sigurdne>   07/03/07 10:44:39

Modified files:
        inc            : class.help.inc.php class.help_helper.inc.php 
                         class.uimanual.inc.php hook_help.inc.php 
        setup          : setup.inc.php 

Log message:
        enable active section and fix links in sidebox menu for manual

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/manual/inc/class.help.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/manual/inc/class.help_helper.inc.php?cvsroot=phpgroupware&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/manual/inc/class.uimanual.inc.php?cvsroot=phpgroupware&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/manual/inc/hook_help.inc.php?cvsroot=phpgroupware&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/manual/setup/setup.inc.php?cvsroot=phpgroupware&r1=1.12&r2=1.13

Patches:
Index: inc/class.help.inc.php
===================================================================
RCS file: /sources/phpgroupware/manual/inc/class.help.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- inc/class.help.inc.php      6 Mar 2007 13:38:47 -0000       1.3
+++ inc/class.help.inc.php      7 Mar 2007 10:44:39 -0000       1.4
@@ -22,7 +22,7 @@
        * along with this program; if not, write to the Free Software       *
        * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         *
        \*******************************************************************/
-       /* $Id: class.help.inc.php,v 1.3 2007/03/06 13:38:47 sigurdne Exp $ */
+       /* $Id: class.help.inc.php,v 1.4 2007/03/07 10:44:39 sigurdne Exp $ */
 
        class help
        {
@@ -44,6 +44,9 @@
                var $data;
 
                var $title;
+               var $section;
+               var $currentapp;
+               var $appsection = -1;
 
                /* This is the constructor for the object. */
 
@@ -232,9 +235,13 @@
                                $help_file = $this->check_file('/' . 
$this->app_name . '/help/EN/' . $file);
                        }
 
+                       if($this->section == basename($help_file, ".odt") && 
$this->app_name == $this->currentapp)
+                       {
+                               $this->appsection =count($this->data);
+                       }
                //      if ($help_file)
                        {
-                               return $GLOBALS['phpgw']->link('/index.php', 
array('menuaction'=>'manual.uimanual.help','app'=>$this->app_name,'section'=>basename($help_file,
 ".odt")));
+                               return $GLOBALS['phpgw']->link('/index.php', 
array('menuaction' => 'manual.uimanual.help','app' => $this->app_name,'section' 
=> basename($help_file, ".odt"), 'navbar' => true));
                        }
 
                        return False;

Index: inc/class.help_helper.inc.php
===================================================================
RCS file: /sources/phpgroupware/manual/inc/class.help_helper.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- inc/class.help_helper.inc.php       25 Oct 2006 13:53:34 -0000      1.1
+++ inc/class.help_helper.inc.php       7 Mar 2007 10:44:39 -0000       1.2
@@ -22,7 +22,7 @@
        * along with this program; if not, write to the Free Software       *
        * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         *
        \*******************************************************************/
-       /* $Id: class.help_helper.inc.php,v 1.1 2006/10/25 13:53:34 sigurdne 
Exp $ */
+       /* $Id: class.help_helper.inc.php,v 1.2 2007/03/07 10:44:39 sigurdne 
Exp $ */
 
        CreateObject('manual.help');
 
@@ -65,13 +65,15 @@
                                {
                                        $var[] = array
                                        (
+                                               'this'                          
        => $this->appsection==$x?true:false,
                                                'text'                          
        => $this->data[$x]['text'],
-                                               'link'                          
        => $this->data[$x]['link'],
+                                               'url'                           
        => $this->data[$x]['url'],
                                                'lang_link_statustext'  => 
$this->data[$x]['lang_link_statustext']
                                        );
                                }
                                $this->listbox = $var;
                        }
+                       $this->appsection = -1;
                        $this->set_internal($extra_data);
                        $this->draw_box();
                }
@@ -89,13 +91,15 @@
                                {
                                        $var[] = array
                                        (
+                                               'this'                          
        => $this->appsection==$x?true:false,
                                                'text'                          
        => $this->data[$x]['text'],
-                                               'link'                          
        => $this->data[$x]['link'],
+                                               'url'                           
        => $this->data[$x]['link'],
                                                'lang_link_statustext'  => 
$this->data[$x]['lang_link_statustext']
                                        );
                                }
                                $this->listbox = $var;
                        }
+                       $this->appsection = false;
                        $this->set_xinternal($extra_data);
                        $this->draw_box();
                }

Index: inc/class.uimanual.inc.php
===================================================================
RCS file: /sources/phpgroupware/manual/inc/class.uimanual.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- inc/class.uimanual.inc.php  6 Mar 2007 14:39:06 -0000       1.4
+++ inc/class.uimanual.inc.php  7 Mar 2007 10:44:39 -0000       1.5
@@ -7,7 +7,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package manual
-       * @version $Id: class.uimanual.inc.php,v 1.4 2007/03/06 14:39:06 
sigurdne Exp $
+       * @version $Id: class.uimanual.inc.php,v 1.5 2007/03/07 10:44:39 
sigurdne Exp $
        */
 
        /**
@@ -38,7 +38,7 @@
 
                function index()
                {
-                       $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
+//                     $GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
                        $this->currentapp               = 
get_var('app',array('POST','GET'));
 
                        if (!$this->currentapp || $this->currentapp == 'manual')
@@ -60,7 +60,9 @@
                
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
$appname . ' - ' . $appname;
 
-                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('help' => 
$GLOBALS['phpgw']->help->output));
+                       $GLOBALS['phpgw']->common->phpgw_header(true);
+//                     
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('help' => 
$GLOBALS['phpgw']->help->output));
+
                }
 
                function help()
@@ -72,10 +74,17 @@
                        $app            = $app?$app:'manual';
                        $section        = $section?$section:'overview';
                        $lang           = 
'en';isset($GLOBALS['phpgw_info']['user']['preferences']['common']['lang']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] ? 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang']: 'en';          
             
+                       $navbar = get_var('navbar',array('GET'));
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = $app . 
'::' . lang($section);
                        $GLOBALS['phpgw']->common->phpgw_header();
-//                     parse_navbar();
+                       if($navbar)
+                       {
+                               $GLOBALS['phpgw']->help->currentapp = $app;
+                               $GLOBALS['phpgw']->help->section = $section;
+                               
$GLOBALS['phpgw']->hooks->process('help',array('manual'));
+                               parse_navbar();
+                       }
                                
                        $odtfile = PHPGW_SERVER_ROOT . SEP . $app . SEP . 
'help' . SEP . strtoupper($lang) . SEP . $section . '.odt';
 

Index: inc/hook_help.inc.php
===================================================================
RCS file: /sources/phpgroupware/manual/inc/hook_help.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- inc/hook_help.inc.php       6 Mar 2007 13:38:47 -0000       1.6
+++ inc/hook_help.inc.php       7 Mar 2007 10:44:39 -0000       1.7
@@ -5,7 +5,7 @@
        * @copyright Copyright (C) 2000-2003,2005 Free Software Foundation, 
Inc. http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package manual
-       * @version $Id: hook_help.inc.php,v 1.6 2007/03/06 13:38:47 sigurdne 
Exp $
+       * @version $Id: hook_help.inc.php,v 1.7 2007/03/07 10:44:39 sigurdne 
Exp $
        */
 
        /**
@@ -21,14 +21,14 @@
        $GLOBALS['phpgw']->help->data[] = array
        (
                'text'                                  => lang('overview'),
-               'link'                                  => 
$GLOBALS['phpgw']->help->check_help_file('overview.odt'),
+               'url'                                   => 
$GLOBALS['phpgw']->help->check_help_file('overview.odt'),
                'lang_link_statustext'  => lang('overview')
        );
 
        $GLOBALS['phpgw']->help->data[] = array
        (
                'text'                                  => lang('home'),
-               'link'                                  => 
$GLOBALS['phpgw']->help->check_help_file('home.odt'),
+               'url'                                   => 
$GLOBALS['phpgw']->help->check_help_file('home.odt'),
                'lang_link_statustext'  => lang('home')
        );
 

Index: setup/setup.inc.php
===================================================================
RCS file: /sources/phpgroupware/manual/setup/setup.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- setup/setup.inc.php 6 Mar 2007 13:38:48 -0000       1.12
+++ setup/setup.inc.php 7 Mar 2007 10:44:39 -0000       1.13
@@ -6,7 +6,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package manual
        * @subpackage setup
-       * @version $Id: setup.inc.php,v 1.12 2007/03/06 13:38:48 sigurdne Exp $
+       * @version $Id: setup.inc.php,v 1.13 2007/03/07 10:44:39 sigurdne Exp $
        */
 
        // Basic information about this app
@@ -18,6 +18,7 @@
 
        // The hooks this app includes, needed for hooks registration
        $setup_info['manual']['hooks'][] = 'help';
+       $setup_info['manual']['hooks'][] = 'sidebox_menu';
 
        // Dependencies for this app to work
        $setup_info['manual']['depends'][] = array




reply via email to

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