function displayNotificationEmail()
 {
     $html = '';
     $html .= '<h3>' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_email_title') . '</h3>';
     $atsm = new Docman_ApprovalTableNotificationCycle();
     $atsm->setItem($this->item);
     $atf =& Docman_ApprovalTableFactoriesFactory::getFromItem($this->item);
     $table = $atf->getTable(false);
     $atsm->setTable($table);
     $um =& UserManager::instance();
     $owner =& $um->getUserById($table->getOwner());
     $atsm->setOwner($owner);
     $atsm->sendNotifReviewer($owner);
     $html .= $GLOBALS['Language']->getText('plugin_docman', 'details_approval_email_subject') . ' ' . $atsm->getNotificationSubject() . "\n";
     $html .= '<p class="docman_approval_email">';
     if (ProjectManager::instance()->getProject($this->item->getGroupId())->getTruncatedEmailsUsage()) {
         $html .= $GLOBALS['Language']->getText('plugin_docman', 'truncated_email');
     } else {
         $html .= htmlentities(quoted_printable_decode($atsm->getNotificationBodyText()), ENT_COMPAT, 'UTF-8');
     }
     $html .= '</p>';
     $backurl = $this->url . '&action=approval_create&id=' . $this->item->getId();
     $html .= '<a href="' . $backurl . '">' . $GLOBALS['Language']->getText('plugin_docman', 'details_approval_email_back') . '</a>';
     return $html;
 }
 function &_getApprovalTableNotificationCycle()
 {
     $atsm = new Docman_ApprovalTableNotificationCycle();
     $atsm->setTable($this->table);
     $atsm->setItem($this->item);
     $um =& $this->_getUserManager();
     $owner =& $um->getUserById($this->table->getOwner());
     $atsm->setOwner($owner);
     if ($this->notificationManager !== null) {
         $atsm->setNotificationManager($this->notificationManager);
     }
     return $atsm;
 }