diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index b1f67677b1..905aea953d 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -28,6 +28,18 @@ class addressbook_hooks if ($location == 'sidebox_menu') { + if ($_GET['menuaction'] == 'addressbook.addressbook_ui.view') + { + display_sidebox($appname, lang('Contact data'), array( + array( + 'text' => '
', + 'no_lang' => true, + 'link' => false, + 'icon' => false, + ), + 'menuOpened' => true, // display it open by default + )); + } // Magic etemplate2 favorites menu (from nextmatch widget) display_sidebox($appname, lang('Favorites'), egw_framework::favorite_list('addressbook')); diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 6fc59755af..aa14930eb5 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -59,6 +59,13 @@ class addressbook_ui extends addressbook_bo 'cat_id' ); + /** + * Instance of eTemplate class + * + * @var etemplate_new + */ + protected $tmpl; + /** * Constructor * @@ -2199,12 +2206,13 @@ window.egw_LAB.wait(function() { { $content['no_tid'] = true; } - if (!$this->tmpl->read($this->content_types[$content['tid']]['options']['template'] ? $this->content_types[$content['tid']]['options']['template'] : 'addressbook.edit')) + $this->tmpl->read('addressbook.view'); + /*if (!$this->tmpl->read($this->content_types[$content['tid']]['options']['template'] ? $this->content_types[$content['tid']]['options']['template'] : 'addressbook.edit')) { $content['msg'] = lang('WARNING: Template "%1" not found, using default template instead.', $this->content_types[$content['tid']]['options']['template'])."\n"; $content['msg'] .= lang('Please update the templatename in your customfields section!'); $this->tmpl->read('addressbook.edit'); - } + }*/ if ($this->private_addressbook && $content['private'] && $content['owner'] == $this->user) { $content['owner'] .= 'p'; @@ -2241,6 +2249,30 @@ window.egw_LAB.wait(function() { // load app.css for addressbook explicit, as addressbook_view hooks changes currentapp! egw_framework::includeCSS('addressbook', 'app'); + $this->tmpl->setElementAttribute('toolbar', 'actions', array( + 'edit' => array( + 'caption' => 'Edit', + 'toolbarDefault' => true, + ), + 'copy' => 'Copy', + 'delete' => array( + 'caption' => 'Delete', + 'confirm' => 'Delete this entry', + ), + 'cancel' => array( + 'caption' => 'Cancel', + 'toolbarDefault' => true, + ), + 'back' => array( + 'caption' => 'Back', + 'toolbarDefault' => true, + ), + 'next' => array( + 'caption' => 'Next', + 'toolbarDefault' => true, + ), + )); + $this->tmpl->exec('addressbook.addressbook_ui.view',$content,$sel_options,$readonlys,array('id' => $content['id'])); $GLOBALS['egw']->hooks->process(array( diff --git a/addressbook/lang/egw_de.lang b/addressbook/lang/egw_de.lang index 4b95aa2c0a..df4ff2cb6e 100644 --- a/addressbook/lang/egw_de.lang +++ b/addressbook/lang/egw_de.lang @@ -117,6 +117,7 @@ configuration common de Konfiguration contact common de Kontakt contact application admin de Kontakt Anwendung contact copied addressbook de Kontakt kopiert +contact data addressbook de Kontaktdaten contact deleted addressbook de Kontakt gelöscht contact fields to show addressbook de Kontaktfelder die angezeigt werden sollen contact fields: addressbook de Kontaktfelder: diff --git a/addressbook/lang/egw_en.lang b/addressbook/lang/egw_en.lang index 1ebb624b58..8003de5075 100644 --- a/addressbook/lang/egw_en.lang +++ b/addressbook/lang/egw_en.lang @@ -117,6 +117,7 @@ configuration common en Configuration contact common en Contact contact application admin en Contact application contact copied addressbook en Contact copied. +contact data addressbook en Contact data contact deleted addressbook en Contact deleted. contact fields to show addressbook en Contact fields to show contact fields: addressbook en Contact fields: diff --git a/addressbook/templates/default/app.css b/addressbook/templates/default/app.css index a8cd2d5687..f0defd6fec 100644 --- a/addressbook/templates/default/app.css +++ b/addressbook/templates/default/app.css @@ -1,8 +1,28 @@ /** - * Give space to both contact view & infolog list + * CRM view with contact data in sidebox */ -#addressbook-index {height: 100%} -.et2_container[id^="infolog-index-addressbook"] {min-height: 250px} +.addressbook_sidebox_name { + font-weight: bold; +} +.addressbook_sidebox_name, .addressbook_sidebox_org { + font-size: 130%; + padding: 2px 0 2px 0; +} +td.addressbook_sidebox_header { + font-weight: bold; + height: 20px; + vertical-align: bottom; +} +div#addressbook-view.et2_container { + height: 0; +} +td.addressbook_sidebox_toolbar { + vertical-align: bottom; + height: 32px; +} +div#divGenTime_addressbook { + display: none; +} /** * new addressbook.edit diff --git a/addressbook/templates/default/view.xet b/addressbook/templates/default/view.xet new file mode 100644 index 0000000000..6ba8e14c3e --- /dev/null +++ b/addressbook/templates/default/view.xet @@ -0,0 +1,56 @@ + + + + +