예제 #1
0
 /**
  * Retrieve approval table descritpion formatted as a message within the reminder
  *
  * @param Docman_ApprovalTable $table  The approval table that its reminder notification will be sent
  * @param String               $format Message format
  *
  * @return PFUser
  */
 private function getTableDescriptionAsMessage(Docman_ApprovalTable $table, $format)
 {
     $comment = '';
     $userComment = $table->getDescription();
     if ($userComment != '') {
         switch ($format) {
             case Codendi_Mail_Interface::FORMAT_HTML:
                 $comment = '<b>' . $GLOBALS['Language']->getText('plugin_docman', 'approval_reminder_mail_notif_owner_comment') . '</b><br>';
                 $comment .= '<hr align="center" width="50%" color="midnightblue" size="3"><br>' . $userComment . '<br><hr align="center" width="50%" color="midnightblue" size="3"><br><br>';
                 $comment .= '<br>';
                 break;
             case Codendi_Mail_Interface::FORMAT_TEXT:
                 $comment = $GLOBALS['Language']->getText('plugin_docman', 'approval_notif_mail_notif_owner_comment', array($userComment));
                 $comment .= "\n\n";
                 break;
             default:
                 $comment = $GLOBALS['Language']->getText('plugin_docman', 'approval_reminder_mail_notif_owner_comment', array($userComment));
                 break;
         }
     }
     return $comment;
 }