diff --git a/admin/inc/hook_admin.inc.php b/admin/inc/hook_admin.inc.php index 60698e4cf6..244f6ef5a1 100644 --- a/admin/inc/hook_admin.inc.php +++ b/admin/inc/hook_admin.inc.php @@ -1,68 +1,27 @@ \n"; - $imgfile = $phpgw->common->get_image_dir("admin")."/" . $appname .".gif"; - if (file_exists($imgfile)) { - $imgpath = $phpgw->common->get_image_path("admin")."/" . $appname .".gif"; - } else { - $imgfile = $phpgw->common->get_image_dir("admin")."/navbar.gif"; - if (file_exists($imgfile)) { - $imgpath = $phpgw->common->get_image_path("admin")."/navbar.gif"; - } else { - $imgpath = ""; - } - } - - // Show the header for the section - section_start("Administration",$imgpath); -*/ - - echo "
\n";
- $imgfile = $phpgw->common->get_image_dir($appname) . '/' . $appname . '.gif';
- if (file_exists($imgfile))
- {
- $imgpath = $phpgw->common->get_image_path($appname) . '/' . $appname . '.gif';
- }
- else
- {
- $imgfile = $phpgw->common->get_image_dir($appname) . '/navbar.gif';
- if (file_exists($imgfile))
- {
- $imgpath = $phpgw->common->get_image_path($appname) . '/navbar.gif';
- }
- else
- {
- $imgpath = '';
- }
- }
-
+ $imgpath = $phpgw->common->image($appname,'navbar.gif');
section_start(ucfirst($appname),$imgpath);
- // actual items in this section
- echo '' . lang('User accounts')."
\n";
- echo '' . lang('User groups')."
\n";
- echo "
\n";
-
- echo '' . lang('Applications')."
\n";
- echo "
\n";
-
- echo '' . lang('Global Categories')."
\n";
- echo "
\n";
-
- echo '' . lang('Change main screen message') . "
\n";
- echo "
\n";
-
- echo '' . lang('View sessions') . "
\n";
- echo '' . lang('View Access Log') . "
\n";
+ section_item($phpgw->link('/admin/accounts.php'),lang('User accounts'));
+ section_item($phpgw->link('/admin/groups.php'),lang('User groups'));
+ section_item($phpgw->link('/admin/applications.php'),lang('Applications'));
+ section_item($phpgw->link('/admin/categories.php'),lang('Global Categories'));
+ section_item($phpgw->link('/admin/mainscreen_message.php'),lang('Change main screen message'));
+ section_item($phpgw->link('/admin/currentusers.php'),lang('View sessions'));
+ section_item($phpgw->link('/admin/accesslog.php'),lang('View Access Log'));
section_end();
}
diff --git a/admin/index.php b/admin/index.php
index d6893b717f..b9590f28a9 100755
--- a/admin/index.php
+++ b/admin/index.php
@@ -17,64 +17,56 @@
$phpgw_info['flags']['currentapp'] = 'admin';
include('../header.inc.php');
- check_code($cd);
+ $admin_tpl = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
+ $admin_tpl->set_file(array(
+ 'admin' => 'index.tpl',
+ ));
+
+ $admin_tpl->set_block('admin','list');
+ $admin_tpl->set_block('admin','app_row');
+ $admin_tpl->set_block('admin','app_row_noicon');
+ $admin_tpl->set_block('admin','link_row');
+ $admin_tpl->set_block('admin','spacer_row');
+
+ $admin_tpl->set_var('title',lang('Administration'));
// This func called by the includes to dump a row header
function section_start($name='',$icon='')
{
- global $phpgw,$phpgw_info;
- echo '
'; - echo ' | ' . $name . ' | '; - } - echo '||
'; + $admin_tpl->parse('rows','app_row_noicon',True); + } } + function section_item($pref_link='',$pref_text='') + { + global $phpgw, $phpgw_info, $admin_tpl; + + $admin_tpl->set_var('pref_link',$pref_link); + $admin_tpl->set_var('pref_text',$pref_text); + $admin_tpl->parse('rows','link_row',True); + } + function section_end() { - echo ' |
\n"; - } - } - - if ($SHOW_INFO > 0) - { - echo '
' . lang('Hide PHP Information') . ''; - echo "
' . lang('PHP Information') . ''; - } $phpgw->common->phpgw_footer(); -?> +?> \ No newline at end of file diff --git a/admin/templates/default/index.tpl b/admin/templates/default/index.tpl new file mode 100755 index 0000000000..1a53ca6d0b --- /dev/null +++ b/admin/templates/default/index.tpl @@ -0,0 +1,33 @@ + +{title} +
+ +
";
- $imgpath = $phpgw->common->image($appname,'navbar.gif');
- section_start(ucfirst($appname),$imgpath);
+ /**************************************************************************\
+ * phpGroupWare *
+ * http://www.phpgroupware.org *
+ * Written by Joseph Engo