removed var from hook_admin

This commit is contained in:
ceb 2002-11-03 01:03:07 +00:00
parent d537066c83
commit 6f6e06b39f
8 changed files with 70 additions and 63 deletions

View File

@ -20,6 +20,6 @@
'Global Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=' . $appname . '&global_cats=True')
);
//Do not modify below this line
display_section($appname,$appname,$file);
display_section($appname,$file);
}
?>

View File

@ -72,5 +72,5 @@
}
/* Do not modify below this line */
display_section('admin','admin',$file);
display_section('admin',$file);
?>

View File

@ -34,10 +34,10 @@
$GLOBALS['admin_tpl']->set_var('title',lang('Administration'));
// This func called by the includes to dump a row header
function section_start($name='',$icon='',$appname='')
function section_start($appname='',$icon='')
{
$GLOBALS['admin_tpl']->set_var('app_name',lang($name));
$GLOBALS['admin_tpl']->set_var('a_name',$appname);
$GLOBALS['admin_tpl']->set_var('app_title',lang($appname));
$GLOBALS['admin_tpl']->set_var('app_name',$appname);
$GLOBALS['admin_tpl']->set_var('app_icon',$icon);
if ($icon)
{
@ -61,20 +61,12 @@
$GLOBALS['admin_tpl']->parse('rows','spacer_row',True);
}
function display_section($appname,$title,$file)
function display_section($appname,$file)
{
if(is_array($file))
{
section_start($title,
$GLOBALS['phpgw']->common->image(
$appname,
Array(
'navbar',
$appname,
'nonav'
)
),
$appname
section_start($appname,
$GLOBALS['phpgw']->common->image($appname,Array('navbar',$appname,'nonav'),'',True)
);
while(list($text,$url) = each($file))
@ -86,7 +78,8 @@
}
$GLOBALS['phpgw']->hooks->process('admin');
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array(
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array
(
'body_data' => $GLOBALS['admin_tpl']->parse('out','list')
));
?>

View File

@ -26,14 +26,14 @@
<!-- BEGIN app_row -->
<tr class="row_off">
<td width="5%" valign="middle"><img src="{app_icon}" alt="[ {app_name} ]"> <a name="{a_name}"></a></td>
<td width="95%" valign="middle"><strong>&nbsp;&nbsp;{app_name}</strong></td>
<td width="5%" valign="middle"><img src="{app_icon}" alt="[ {app_title} ]"> <a name="{app_name}"></a></td>
<td width="95%" valign="middle"><b>&nbsp;&nbsp;{app_title}</b></td>
</tr>
<!-- END app_row -->
<!-- BEGIN app_row_noicon -->
<tr class="row_off">
<td colspan="2" width="95%" valign="middle"><strong>&nbsp;&nbsp;{app_name}</strong> <a name="{a_name}"></a></td>
<td colspan="2" width="95%" valign="middle"><b>&nbsp;&nbsp;{app_title}</b> <a name="{app_name}"></a></td>
</tr>
<!-- END app_row_noicon -->

View File

@ -21,6 +21,6 @@
'Global categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=' . $appname . '&global_cats=True')
);
//Do not modify below this line
display_section($appname,$appname,$file);
display_section($appname,$file);
}
?>

View File

@ -8,17 +8,17 @@
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
{
// Only Modify the $file and $title variables.....
$title = $appname;
$file = Array(
{
$file = Array
(
'Site configuration' => $GLOBALS['phpgw']->link('/index.php',array('menuaction' => 'infolog.uiinfolog.admin' )),
'Global Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=' . $appname . '&global_cats=True'),
'CSV-Import' => $GLOBALS['phpgw']->link('/infolog/csv_import.php')
);
//Do not modify below this line
display_section($appname,$title,$file);
}
display_section($appname,$file);
}
?>

View File

@ -819,7 +819,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
}
}
function find_image($appname,$image)
function find_image($appname,$image,$navbar=False)
{
static $imgpref;
if(! @$imgpref)
@ -838,10 +838,13 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
}
}
if (!@is_array($this->found_files[$appname]))
{
$imagedir = '/'.$appname.'/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images';
if (!$navbar)
{
$imagedir_olddefault = '/'.$appname.'/images';
$imagedir_default = '/'.$appname.'/templates/default/images';
$imagedir = '/'.$appname.'/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images';
if (@is_dir(PHPGW_INCLUDE_ROOT.$imagedir_olddefault))
{
@ -868,6 +871,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
}
$d->close();
}
}
if (@is_dir(PHPGW_INCLUDE_ROOT.$imagedir))
{
@ -922,7 +926,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
return $imgfile;
}
function image($appname,$image='',$ext='',$use_lang=True)
function image($appname,$image='',$ext='',$navbar=False,$use_lang=True)
{
if (!is_array($image))
{
@ -949,16 +953,16 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
}
else
{
$image_found = $this->find_image($appname,$img.$ext);
$image_found = $this->find_image($appname,$img.$ext,$navbar);
}
}
return $image_found;
}
function image_on($appname,$image,$extension='_on')
function image_on($appname,$image,$extension='_on',$navbar=False)
{
$with_extension = $this->image($appname,$image,$extension);
$without_extension = $this->image($appname,$image);
$with_extension = $this->image($appname,$image,$extension,$navbar);
$without_extension = $this->image($appname,$image,'',$navbar);
if($with_extension != '')
{
return $with_extension;
@ -1301,6 +1305,15 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
unset($value);
unset($newarray);
if ($GLOBALS['phpgw_info']['server']['template_set'] == 'idsociety')
{
$navbar = True;
}
else
{
$navbar = False;
}
while (list($app,$data) = each($GLOBALS['phpgw_info']['user']['apps']))
{
if (is_long($app))
@ -1316,13 +1329,13 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
if ($app != $GLOBALS['phpgw_info']['flags']['currentapp'])
{
$GLOBALS['phpgw_info']['navbar'][$app]['icon'] = $this->image($app,Array('navbar','nonav'));
$GLOBALS['phpgw_info']['navbar'][$app]['icon_hover'] = $this->image_on($app,Array('navbar','nonav'),'-over');
$GLOBALS['phpgw_info']['navbar'][$app]['icon'] = $this->image($app,Array('navbar','nonav'),'',$navbar);
$GLOBALS['phpgw_info']['navbar'][$app]['icon_hover'] = $this->image_on($app,Array('navbar','nonav'),'-over',$navbar);
}
else
{
$GLOBALS['phpgw_info']['navbar'][$app]['icon'] = $this->image_on($app,Array('navbar','nonav'),'-over');
$GLOBALS['phpgw_info']['navbar'][$app]['icon_hover'] = $this->image($app,Array('navbar','nonav'));
$GLOBALS['phpgw_info']['navbar'][$app]['icon'] = $this->image_on($app,Array('navbar','nonav'),'-over',$navbar);
$GLOBALS['phpgw_info']['navbar'][$app]['icon_hover'] = $this->image($app,Array('navbar','nonav'),'',$navbar);
}
}
}

View File

@ -60,6 +60,7 @@ a.th,a.th_text
td.left
{
background: url(../images/nav_bar_left_spacer.png);
height: 22;
}
.bottom