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

Blaine Lang blaine at qs1489.pair.com
Sat Dec 1 16:20:22 EST 2007


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

Modified Files:
	config.class.php 
Log Message:
Change to now show the leftblocks and give UI full screen - did not see anyway to easily reduce the number of subgroup tabs and it does not look good when the navbar wraps. May need a way to get back to the main page easily.

Removed Javascript for configmanager out of template
Added logic to not show Config Group navbar if there was just one config group - as in "Core' 
Changed the way change results are displayed

Index: config.class.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/classes/config.class.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** config.class.php	25 Nov 2007 06:59:56 -0000	1.6
--- config.class.php	1 Dec 2007 21:20:20 -0000	1.7
***************
*** 321,339 ****
      function get_ui($sg=0, $change_result=null)
      {
!         global $LANG_coreconfigsubgroups;
          if (!SEC_inGroup('Root'))
              return config::_UI_perm_denied();
!         $t = new Template($GLOBALS['_CONF']['path_layout'] . 'admin/config');
          $t->set_file('main','configuration.thtml');
          $t->set_var( 'xhtml', XHTML );
!         $t->set_var('site_url',$GLOBALS['_CONF']['site_url']);
          $t->set_var('open_group', $this->ref);
          $t->set_block('main','group-selector','groups');
          $groups = config::_get_groups();
!         foreach ($groups as $group) {
!             $t->set_var("select_id", ($group === $this->ref ? 'id="current"' : ''));
!             $t->set_var("group_select_value", $group);
!             $t->set_var("group_display", ucwords($group));
!             $t->parse("groups", "group-selector", true);
          }
          $subgroups = $this->get_sgroups();
--- 321,343 ----
      function get_ui($sg=0, $change_result=null)
      {
!         global $_CONF,$LANG_coreconfigsubgroups;
          if (!SEC_inGroup('Root'))
              return config::_UI_perm_denied();
!         $t = new Template($_CONF['path_layout'] . 'admin/config');
          $t->set_file('main','configuration.thtml');
          $t->set_var( 'xhtml', XHTML );
!         $t->set_var('site_url',$_CONF['site_url']);
          $t->set_var('open_group', $this->ref);
          $t->set_block('main','group-selector','groups');
          $groups = config::_get_groups();
!         if (count($groups) > 1) {
!             foreach ($groups as $group) {
!                 $t->set_var("select_id", ($group === $this->ref ? 'id="current"' : ''));
!                 $t->set_var("group_select_value", $group);
!                 $t->set_var("group_display", ucwords($group));
!                 $t->parse("groups", "group-selector", true);
!             }
!         } else {
!             $t->set_var('hide_groupselection','none');
          }
          $subgroups = $this->get_sgroups();
***************
*** 364,370 ****
  
          // Output the result.
!         $display  = COM_siteHeader('menu');
!         $display .= COM_startBlock('Configuration');
!         $display .= config::_UI_get_change_block($change_result);
          $display .= $t->finish($t->parse("OUTPUT", "main"));
          $display .= COM_endBlock();
--- 368,378 ----
  
          // Output the result.
!         $display  = COM_siteHeader('none');
!         $display .= COM_startBlock('Configuration Manager');
!         if ($change_result != null AND $change_result !== array() ) {
!             $t->set_var('change_block',config::_UI_get_change_block($change_result));
!         } else {
!             $t->set_var('show_changeblock','none');
!         }
          $display .= $t->finish($t->parse("OUTPUT", "main"));
          $display .= COM_endBlock();
***************
*** 376,386 ****
      {
          if ($changes != null AND $changes !== array()) {
!             $display = COM_startBlock ('Results', '',
!                                        COM_getBlockTemplate ('_msg_block', 'header'));
!             $display .= '<p padding="5px">Changes were successfully made to:<ul>';
              foreach ($changes as $param_name => $success)
                  $display .= '<li>' . $param_name . '</li>';
!             $display .= '</ul></p>';
!             $display .= COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'));
              return $display;
          }
--- 384,391 ----
      {
          if ($changes != null AND $changes !== array()) {
!             $display .= '<ul style="margin-top:5px;">';
              foreach ($changes as $param_name => $success)
                  $display .= '<li>' . $param_name . '</li>';
!             $display .= '</ul>';
              return $display;
          }




More information about the geeklog-cvs mailing list