$notification->push(_("This contact has been marked as your own."), 'horde.success');
}
-// Are we printing?
-$print_view = (bool)Horde_Util::getFormData('print');
-
// Get view.
$viewName = Horde_Util::getFormData('view', 'Contact');
switch ($viewName) {
case 'Contact':
- $view = new Turba_View_Contact($contact, $print_view);
+ $view = new Turba_View_Contact($contact);
if (!$vars->get('url')) {
$vars->set('url', $contact->url(null, true));
}
$title = $view->getTitle();
Horde::addScriptFile('contact_tabs.js', 'turba', true);
require TURBA_TEMPLATES . '/common-header.inc';
-if ($print_view) {
- require_once $registry->get('templates', 'horde') . '/javascript/print.js';
-} else {
- require TURBA_TEMPLATES . '/menu.inc';
-}
+require TURBA_TEMPLATES . '/menu.inc';
echo '<div id="page">';
-if (!$print_view) {
- echo $tabs->render($viewName);
-}
+echo $tabs->render($viewName);
echo '<h1 class="header">' . $own_link
. ($contact->getValue('name')
? htmlspecialchars($contact->getValue('name'))
$menu->add(Horde::applicationUrl('data.php'), _("_Import/Export"), 'data.png', $GLOBALS['registry']->getImageDir('horde'));
}
- /* Print. */
- if (isset($GLOBALS['print_link'])) {
- $menu->add($GLOBALS['print_link'], _("_Print"), 'print.png', $GLOBALS['registry']->getImageDir('horde'), '_blank', Horde::popupJs($GLOBALS['print_link'], array('urlencode' => true)) . 'return false);', '__noselection');
- }
-
return $menu;
}
var $contact;
/**
- * @var boolean
- */
- var $print = false;
-
- /**
* @param Turba_Object &$contact
*/
- public function __construct(&$contact, $print = null)
+ public function __construct(&$contact)
{
$this->contact = &$contact;
- if (!is_null($print)) {
- $this->print = $print;
- }
-
- /* Set print link. */
- if (!$this->print) {
- $GLOBALS['print_link'] = Horde_Util::addParameter($this->contact->url(), 'print', 1);
- }
}
function getTitle()
if (!empty($comments['threads'])) {
echo '<br />' . $comments['threads'];
}
- if (!empty($comments['comments']) && !$this->print) {
+ if (!empty($comments['comments'])) {
echo '<br />' . $comments['comments'];
}