[geeklog-cvs] Geeklog-1.x/system lib-admin.php,1.114,1.115

Oliver ospiess at qs1489.pair.com
Wed Aug 29 05:34:55 EDT 2007


Update of /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/system
In directory qs1489.pair.com:/tmp/cvs-serv15466

Modified Files:
	lib-admin.php 
Log Message:
display the menu by itself instead of piping it through the admin-list-functions

Index: lib-admin.php
===================================================================
RCS file: /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/system/lib-admin.php,v
retrieving revision 1.114
retrieving revision 1.115
diff -C2 -d -r1.114 -r1.115
*** lib-admin.php	29 Aug 2007 06:55:40 -0000	1.114
--- lib-admin.php	29 Aug 2007 09:34:53 -0000	1.115
***************
*** 53,57 ****
  */
  function ADMIN_simpleList($fieldfunction, $header_arr, $text_arr,
!                            $data_arr, $menu = '', $options = '', $form_arr='')
  {
      global $_CONF, $_TABLES, $LANG01, $LANG_ADMIN, $LANG_ACCESS, $_IMAGE_TYPE, $MESSAGE;
--- 53,57 ----
  */
  function ADMIN_simpleList($fieldfunction, $header_arr, $text_arr,
!                            $data_arr, $options = '', $form_arr='')
  {
      global $_CONF, $_TABLES, $LANG01, $LANG_ADMIN, $LANG_ACCESS, $_IMAGE_TYPE, $MESSAGE;
***************
*** 75,84 ****
  
      $admin_templates = new Template($_CONF['path_layout'] . 'admin/lists');
!     $admin_templates->set_file (array ('top_menu' => 'topmenu.thtml',
!                                        'list' => 'list.thtml',
!                                        'header' => 'header.thtml',
!                                        'row' => 'listitem.thtml',
!                                        'field' => 'field.thtml'
!                                       ));
      $admin_templates->set_var('site_url', $_CONF['site_url']);
      $admin_templates->set_var('layout_url', $_CONF['layout_url']);
--- 75,86 ----
  
      $admin_templates = new Template($_CONF['path_layout'] . 'admin/lists');
!     $admin_templates->set_file (
!         array (
!             'list' => 'list.thtml',
!             'header' => 'header.thtml',
!             'row' => 'listitem.thtml',
!             'field' => 'field.thtml'
!         )
!     );
      $admin_templates->set_var('site_url', $_CONF['site_url']);
      $admin_templates->set_var('layout_url', $_CONF['layout_url']);
***************
*** 97,103 ****
          $admin_templates->set_var('formfields_bottom', $form_arr['bottom']);
      }
-     if (!empty ($menu)) {
-         $admin_templates->set_var('top_menu', $menu);
-     }
  
      $icon_arr = array(
--- 99,102 ----
***************
*** 194,198 ****
  
  /**
! * Creates a list of data with a menu, search, filter, clickable headers etc.
  *
  * @param    string  $component      name of the list
--- 193,197 ----
  
  /**
! * Creates a list of data with a search, filter, clickable headers etc.
  *
  * @param    string  $component      name of the list
***************
*** 202,206 ****
  * @param    array   $query_arr      array with sql-options
  * @param    array   $defsort_arr    default sorting values
- * @param    string  $menu           string menu-entries
  * @param    string  $filter         additional drop-down filters
  * @param    string  $extra          additional values passed to fieldfunction
--- 201,204 ----
***************
*** 209,213 ****
  */
  function ADMIN_list($component, $fieldfunction, $header_arr, $text_arr,
!             $query_arr, $defsort_arr, $menu = '', $filter = '', $extra = '',
              $options = '', $form_arr='')
  {
--- 207,211 ----
  */
  function ADMIN_list($component, $fieldfunction, $header_arr, $text_arr,
!             $query_arr, $defsort_arr, $filter = '', $extra = '',
              $options = '', $form_arr='')
  {
***************
*** 327,334 ****
      }
  
-     if (!empty ($menu)) {
-         $admin_templates->set_var('top_menu', $menu);
-     }
- 
      $sql_query = addslashes ($query); # replace quotes etc for security
      $sql = $query_arr['sql']; # get sql from array that builds data
--- 325,328 ----
***************
*** 576,581 ****
  
      $menu_fields = '';
      for ($i = 0; $i < count($menu_arr); $i++) { # iterate through menu
!         $menu_fields .= COM_createLink($menu_arr[$i]['text'], $menu_arr[$i]['url']);
          if ($i < (count($menu_arr) -1)) {
              $menu_fields .= ' | '; # add separator
--- 570,576 ----
  
      $menu_fields = '';
+     $attr = array('class' => 'admin-menu-item');
      for ($i = 0; $i < count($menu_arr); $i++) { # iterate through menu
!         $menu_fields .= COM_createLink($menu_arr[$i]['text'], $menu_arr[$i]['url'], $attr);
          if ($i < (count($menu_arr) -1)) {
              $menu_fields .= ' | '; # add separator
***************
*** 583,587 ****
      }
      if (!empty ($icon)) {
!         $icon = COM_createImage($icon);
          $admin_templates->set_var('icon', $icon);
      }
--- 578,583 ----
      }
      if (!empty ($icon)) {
!         $attr = array('class' => 'admin-menu-icon');
!         $icon = COM_createImage($icon, '', $attr);
          $admin_templates->set_var('icon', $icon);
      }




More information about the geeklog-cvs mailing list