case 'DeleteContact': $view = new Turba_View_DeleteContact($contact); break; } // Get tabs. $url = $contact->url(); $tabs = new Horde_Core_Ui_Tabs('view', $vars); $tabs->addTab(_("_View"), $url, array('tabname' => 'Contact', 'id' => 'tabContact', 'class' => 'horde-icon', 'onclick' => 'return TurbaTabs.showTab(\'Contact\');')); if ($contact->hasPermission(Horde_Perms::EDIT)) { $tabs->addTab(_("_Edit"), $url, array('tabname' => 'EditContact', 'id' => 'tabEditContact', 'class' => 'horde-icon', 'onclick' => 'return TurbaTabs.showTab(\'EditContact\');')); } if ($contact->hasPermission(Horde_Perms::DELETE)) { $tabs->addTab(_("De_lete"), $url, array('tabname' => 'DeleteContact', 'id' => 'tabDeleteContact', 'class' => 'horde-icon', 'onclick' => 'return TurbaTabs.showTab(\'DeleteContact\');')); } $owner = explode(';', $prefs->getValue('own_contact')); if (count($owner) == 2 && $owner[0] == $source && $owner[1] == $contact->getValue('__key')) { $own_icon = ' ' . Horde_Themes_Image::tag('user.png', array('alt' => _("Your own contact"), 'attr' => array('title' => _("Your own contact")))); $own_link = ''; } else { $own_icon = ''; $own_link = '<span class="smallheader rightFloat">' . $url->copy()->add('action', 'mark_own')->link() . _("Mark this as your own contact") . '</a></span>'; } $page_output->addScriptFile('contact_tabs.js'); $page_output->header(array('title' => $view->getTitle())); $notification->notify(array('listeners' => 'status')); echo '<div id="page">'; echo $tabs->render($viewName, 'horde-buttonbar'); echo '<h1 class="header">' . $own_link . ($contact->getValue('name') ? htmlspecialchars($contact->getValue('name')) : '<em>' . _("Blank name") . '</em>') . $own_icon . '</h1>'; $view->html(); echo '</div>'; $page_output->footer();