mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 19:03:14 +01:00
removed var from hook_admin
This commit is contained in:
parent
d537066c83
commit
6f6e06b39f
@ -20,6 +20,6 @@
|
|||||||
'Global Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=' . $appname . '&global_cats=True')
|
'Global Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=' . $appname . '&global_cats=True')
|
||||||
);
|
);
|
||||||
//Do not modify below this line
|
//Do not modify below this line
|
||||||
display_section($appname,$appname,$file);
|
display_section($appname,$file);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -72,5 +72,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Do not modify below this line */
|
/* Do not modify below this line */
|
||||||
display_section('admin','admin',$file);
|
display_section('admin',$file);
|
||||||
?>
|
?>
|
||||||
|
@ -34,10 +34,10 @@
|
|||||||
$GLOBALS['admin_tpl']->set_var('title',lang('Administration'));
|
$GLOBALS['admin_tpl']->set_var('title',lang('Administration'));
|
||||||
|
|
||||||
// This func called by the includes to dump a row header
|
// 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('app_title',lang($appname));
|
||||||
$GLOBALS['admin_tpl']->set_var('a_name',$appname);
|
$GLOBALS['admin_tpl']->set_var('app_name',$appname);
|
||||||
$GLOBALS['admin_tpl']->set_var('app_icon',$icon);
|
$GLOBALS['admin_tpl']->set_var('app_icon',$icon);
|
||||||
if ($icon)
|
if ($icon)
|
||||||
{
|
{
|
||||||
@ -61,20 +61,12 @@
|
|||||||
$GLOBALS['admin_tpl']->parse('rows','spacer_row',True);
|
$GLOBALS['admin_tpl']->parse('rows','spacer_row',True);
|
||||||
}
|
}
|
||||||
|
|
||||||
function display_section($appname,$title,$file)
|
function display_section($appname,$file)
|
||||||
{
|
{
|
||||||
if(is_array($file))
|
if(is_array($file))
|
||||||
{
|
{
|
||||||
section_start($title,
|
section_start($appname,
|
||||||
$GLOBALS['phpgw']->common->image(
|
$GLOBALS['phpgw']->common->image($appname,Array('navbar',$appname,'nonav'),'',True)
|
||||||
$appname,
|
|
||||||
Array(
|
|
||||||
'navbar',
|
|
||||||
$appname,
|
|
||||||
'nonav'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
$appname
|
|
||||||
);
|
);
|
||||||
|
|
||||||
while(list($text,$url) = each($file))
|
while(list($text,$url) = each($file))
|
||||||
@ -86,7 +78,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw']->hooks->process('admin');
|
$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')
|
'body_data' => $GLOBALS['admin_tpl']->parse('out','list')
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
|
@ -26,14 +26,14 @@
|
|||||||
|
|
||||||
<!-- BEGIN app_row -->
|
<!-- BEGIN app_row -->
|
||||||
<tr class="row_off">
|
<tr class="row_off">
|
||||||
<td width="5%" valign="middle"><img src="{app_icon}" alt="[ {app_name} ]"> <a name="{a_name}"></a></td>
|
<td width="5%" valign="middle"><img src="{app_icon}" alt="[ {app_title} ]"> <a name="{app_name}"></a></td>
|
||||||
<td width="95%" valign="middle"><strong> {app_name}</strong></td>
|
<td width="95%" valign="middle"><b> {app_title}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END app_row -->
|
<!-- END app_row -->
|
||||||
|
|
||||||
<!-- BEGIN app_row_noicon -->
|
<!-- BEGIN app_row_noicon -->
|
||||||
<tr class="row_off">
|
<tr class="row_off">
|
||||||
<td colspan="2" width="95%" valign="middle"><strong> {app_name}</strong> <a name="{a_name}"></a></td>
|
<td colspan="2" width="95%" valign="middle"><b> {app_title}</b> <a name="{app_name}"></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- END app_row_noicon -->
|
<!-- END app_row_noicon -->
|
||||||
|
|
||||||
|
@ -21,6 +21,6 @@
|
|||||||
'Global categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=' . $appname . '&global_cats=True')
|
'Global categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=' . $appname . '&global_cats=True')
|
||||||
);
|
);
|
||||||
//Do not modify below this line
|
//Do not modify below this line
|
||||||
display_section($appname,$appname,$file);
|
display_section($appname,$file);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -8,17 +8,17 @@
|
|||||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $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' )),
|
'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'),
|
'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')
|
'CSV-Import' => $GLOBALS['phpgw']->link('/infolog/csv_import.php')
|
||||||
);
|
);
|
||||||
|
|
||||||
//Do not modify below this line
|
//Do not modify below this line
|
||||||
display_section($appname,$title,$file);
|
display_section($appname,$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;
|
static $imgpref;
|
||||||
if(! @$imgpref)
|
if(! @$imgpref)
|
||||||
@ -839,34 +839,38 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
|||||||
}
|
}
|
||||||
if (!@is_array($this->found_files[$appname]))
|
if (!@is_array($this->found_files[$appname]))
|
||||||
{
|
{
|
||||||
$imagedir_olddefault = '/'.$appname.'/images';
|
|
||||||
$imagedir_default = '/'.$appname.'/templates/default/images';
|
|
||||||
$imagedir = '/'.$appname.'/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images';
|
$imagedir = '/'.$appname.'/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/images';
|
||||||
|
|
||||||
if (@is_dir(PHPGW_INCLUDE_ROOT.$imagedir_olddefault))
|
if (!$navbar)
|
||||||
{
|
{
|
||||||
$d = dir(PHPGW_INCLUDE_ROOT.$imagedir_olddefault);
|
$imagedir_olddefault = '/'.$appname.'/images';
|
||||||
while (false != ($entry = $d->read()))
|
$imagedir_default = '/'.$appname.'/templates/default/images';
|
||||||
{
|
|
||||||
if ($entry != '.' && $entry != '..')
|
|
||||||
{
|
|
||||||
$this->found_files[$appname][$entry] = $imagedir_olddefault;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$d->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (@is_dir(PHPGW_INCLUDE_ROOT.$imagedir_default))
|
if (@is_dir(PHPGW_INCLUDE_ROOT.$imagedir_olddefault))
|
||||||
{
|
|
||||||
$d = dir(PHPGW_INCLUDE_ROOT.$imagedir_default);
|
|
||||||
while (false != ($entry = $d->read()))
|
|
||||||
{
|
{
|
||||||
if ($entry != '.' && $entry != '..')
|
$d = dir(PHPGW_INCLUDE_ROOT.$imagedir_olddefault);
|
||||||
|
while (false != ($entry = $d->read()))
|
||||||
{
|
{
|
||||||
$this->found_files[$appname][$entry] = $imagedir_default;
|
if ($entry != '.' && $entry != '..')
|
||||||
|
{
|
||||||
|
$this->found_files[$appname][$entry] = $imagedir_olddefault;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$d->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (@is_dir(PHPGW_INCLUDE_ROOT.$imagedir_default))
|
||||||
|
{
|
||||||
|
$d = dir(PHPGW_INCLUDE_ROOT.$imagedir_default);
|
||||||
|
while (false != ($entry = $d->read()))
|
||||||
|
{
|
||||||
|
if ($entry != '.' && $entry != '..')
|
||||||
|
{
|
||||||
|
$this->found_files[$appname][$entry] = $imagedir_default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$d->close();
|
||||||
}
|
}
|
||||||
$d->close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (@is_dir(PHPGW_INCLUDE_ROOT.$imagedir))
|
if (@is_dir(PHPGW_INCLUDE_ROOT.$imagedir))
|
||||||
@ -922,7 +926,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
|||||||
return $imgfile;
|
return $imgfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
function image($appname,$image='',$ext='',$use_lang=True)
|
function image($appname,$image='',$ext='',$navbar=False,$use_lang=True)
|
||||||
{
|
{
|
||||||
if (!is_array($image))
|
if (!is_array($image))
|
||||||
{
|
{
|
||||||
@ -949,16 +953,16 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$image_found = $this->find_image($appname,$img.$ext);
|
$image_found = $this->find_image($appname,$img.$ext,$navbar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $image_found;
|
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);
|
$with_extension = $this->image($appname,$image,$extension,$navbar);
|
||||||
$without_extension = $this->image($appname,$image);
|
$without_extension = $this->image($appname,$image,'',$navbar);
|
||||||
if($with_extension != '')
|
if($with_extension != '')
|
||||||
{
|
{
|
||||||
return $with_extension;
|
return $with_extension;
|
||||||
@ -1301,6 +1305,15 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
|||||||
unset($value);
|
unset($value);
|
||||||
unset($newarray);
|
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']))
|
while (list($app,$data) = each($GLOBALS['phpgw_info']['user']['apps']))
|
||||||
{
|
{
|
||||||
if (is_long($app))
|
if (is_long($app))
|
||||||
@ -1311,18 +1324,18 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
|||||||
if ($GLOBALS['phpgw_info']['apps'][$app]['status'] != 2 && $GLOBALS['phpgw_info']['apps'][$app]['status'] != 3)
|
if ($GLOBALS['phpgw_info']['apps'][$app]['status'] != 2 && $GLOBALS['phpgw_info']['apps'][$app]['status'] != 3)
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['navbar'][$app]['title'] = lang($data['title']);
|
$GLOBALS['phpgw_info']['navbar'][$app]['title'] = lang($data['title']);
|
||||||
$GLOBALS['phpgw_info']['navbar'][$app]['url'] = $GLOBALS['phpgw']->link('/' . $app . '/index.php');
|
$GLOBALS['phpgw_info']['navbar'][$app]['url'] = $GLOBALS['phpgw']->link('/' . $app . '/index.php');
|
||||||
$GLOBALS['phpgw_info']['navbar'][$app]['name'] = $app;
|
$GLOBALS['phpgw_info']['navbar'][$app]['name'] = $app;
|
||||||
|
|
||||||
if ($app != $GLOBALS['phpgw_info']['flags']['currentapp'])
|
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'] = $this->image($app,Array('navbar','nonav'),'',$navbar);
|
||||||
$GLOBALS['phpgw_info']['navbar'][$app]['icon_hover'] = $this->image_on($app,Array('navbar','nonav'),'-over');
|
$GLOBALS['phpgw_info']['navbar'][$app]['icon_hover'] = $this->image_on($app,Array('navbar','nonav'),'-over',$navbar);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['navbar'][$app]['icon'] = $this->image_on($app,Array('navbar','nonav'),'-over');
|
$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'));
|
$GLOBALS['phpgw_info']['navbar'][$app]['icon_hover'] = $this->image($app,Array('navbar','nonav'),'',$navbar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ a.th,a.th_text
|
|||||||
td.left
|
td.left
|
||||||
{
|
{
|
||||||
background: url(../images/nav_bar_left_spacer.png);
|
background: url(../images/nav_bar_left_spacer.png);
|
||||||
|
height: 22;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom
|
.bottom
|
||||||
|
Loading…
Reference in New Issue
Block a user