[geeklog-cvs] Geeklog-1.x/system/classes config.class.php, 1.21, 1.22

Blaine Lang blaine at qs1489.pair.com
Sat Feb 9 07:01:08 EST 2008


Update of /cvsroot/geeklog/Geeklog-1.x/system/classes
In directory qs1489.pair.com:/tmp/cvs-serv23660

Modified Files:
	config.class.php 
Log Message:
Tweak to config menu to not show current selected sub-group as a link in the menu.
Able to now set block templates for both config menus.

Index: config.class.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/classes/config.class.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** config.class.php	3 Feb 2008 09:53:49 -0000	1.21
--- config.class.php	9 Feb 2008 12:01:06 -0000	1.22
***************
*** 467,471 ****
          $cssfile = '<link rel="stylesheet" type="text/css" href="'.$_CONF['layout_url'] .'/droplinemenu.css" ' . XHTML .'>' . LB;
          $display  = COM_siteHeader('none','Configuration Manager',$cssfile);
!         $t->set_var('config_menu',$this->_UI_configmanager_menu($grp));
          if ($change_result != null AND $change_result !== array()) {
              $t->set_var('change_block',$this->_UI_get_change_block($change_result));
--- 467,471 ----
          $cssfile = '<link rel="stylesheet" type="text/css" href="'.$_CONF['layout_url'] .'/droplinemenu.css" ' . XHTML .'>' . LB;
          $display  = COM_siteHeader('none','Configuration Manager',$cssfile);
!         $t->set_var('config_menu',$this->_UI_configmanager_menu($grp,$sg));
          if ($change_result != null AND $change_result !== array()) {
              $t->set_var('change_block',$this->_UI_get_change_block($change_result));
***************
*** 679,683 ****
  
  
!     function _UI_configmanager_menu($conf_group)
      {
          global $_CONF, $LANG_ADMIN, $LANG_CONFIG,
--- 679,683 ----
  
  
!     function _UI_configmanager_menu($conf_group,$sg=0)
      {
          global $_CONF, $LANG_ADMIN, $LANG_CONFIG,
***************
*** 716,719 ****
--- 716,721 ----
                                                       'footer'));
  
+ 
+         /* Now display the sub-group menu for the selected config group */
          if (empty($LANG_configsections[$conf_group]['title'])) {
              $subgroup_title = ucwords($conf_group);
***************
*** 722,732 ****
          }
          $retval .= COM_startBlock($subgroup_title, '',
!                         COM_getBlockTemplate('configmanager_block', 'header'));
  
!         $groups = $this->get_sgroups($conf_group);
!         if (count($groups) > 0) {
!             foreach ($groups as $group) {
!                 $group_display =  $LANG_configsubgroups[$conf_group][$group];
!                 $retval .= "<div><a href=\"#\" onclick='open_subgroup(\"$conf_group\",\"$group\")'>$group_display</a></div>";
              }
          }
--- 724,741 ----
          }
          $retval .= COM_startBlock($subgroup_title, '',
!                         COM_getBlockTemplate('configmanager_subblock', 'header'));
  
!         $sgroups = $this->get_sgroups($conf_group);
!         if (count($sgroups) > 0) {
!             $i =0;
!             foreach ($sgroups as $sgroup) {
!                 $group_display =  $LANG_configsubgroups[$conf_group][$sgroup];
!                 // Create a menu item for each sub config group - disable the link for the current selected one
!                 if ($i == $sg) {
!                     $retval .= "<div>$group_display</div>";
!                 } else {
!                     $retval .= "<div><a href=\"#\" onclick='open_subgroup(\"$conf_group\",\"$sgroup\")'>$group_display</a></div>";
!                 }
!                 $i++;
              }
          }
***************
*** 738,740 ****
  }
  
! ?>
--- 747,749 ----
  }
  
! ?>
\ No newline at end of file




More information about the geeklog-cvs mailing list