From d413936936b5192b0dcdf74b2f571c6d1f461d22 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 28 Jan 2011 19:45:33 +0000 Subject: [PATCH] Add Import / Export links to sidebox for all apps, if there are definitions allowed. --- .../idots/class.idots_framework.inc.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/phpgwapi/templates/idots/class.idots_framework.inc.php b/phpgwapi/templates/idots/class.idots_framework.inc.php index 0d7b8dc083..3aa14fac41 100644 --- a/phpgwapi/templates/idots/class.idots_framework.inc.php +++ b/phpgwapi/templates/idots/class.idots_framework.inc.php @@ -190,6 +190,37 @@ class idots_framework extends egw_framework if($this->sidebox_content) { + // Add in import / export, if available + if($GLOBALS['egw_info']['user']['apps']['importexport']) { + $appname = $GLOBALS['egw_info']['flags']['currentapp']; + $file = array(); + if(importexport_helper_functions::has_definitions($appname, 'import')) + { + $file['Import'] = array('link' => "javascript:egw_openWindowCentered2('". + egw::link('/index.php',array( + 'menuaction' => 'importexport.importexport_import_ui.import_dialog', + 'appname'=>$appname + ),false)."','_blank',500,220,'yes')", + 'icon' => 'import', + 'app' => 'importexport', + 'text' => 'import' + ); + } + if(importexport_helper_functions::has_definitions($appname, 'export')) + { + $file['Export'] = array('link' => "javascript:egw_openWindowCentered2('". + egw::link('/index.php',array( + 'menuaction' => 'importexport.importexport_export_ui.export_dialog', + 'appname'=>$appname + ),false)."','_blank',850,440,'yes')", + 'icon' => 'export', + 'app' => 'importexport', + 'text' => 'export' + ); + } + if($file) display_sidebox($appname,lang('importexport'),$file); + } + if($GLOBALS['egw_info']['user']['preferences']['common']['auto_hide_sidebox']) { $this->tpl->set_var('lang_show_menu',lang('show menu'));