diff --git a/plugins/ktstandard/KTEmail.php b/plugins/ktstandard/KTEmail.php
index 8ee7693..9f6146d 100644
--- a/plugins/ktstandard/KTEmail.php
+++ b/plugins/ktstandard/KTEmail.php
@@ -141,17 +141,29 @@ function sendExternalEmails($aEmailAddresses, $iDocumentID, $sDocumentName, $sCo
$oSendingUser = User::get($_SESSION['userID']);
// Create email content
-/*
$sMessage = '';
- $sMessage .= sprintf(_kt("Your colleague, %s, wishes you to view the document entitled '%s'."), $oSendingUser->getName(), $sDocumentName);
- $sMessage .= " \n";
- $sMessage .= _kt('Click on the hyperlink below to view it.') . '
';
- $sMsgEnd = '
' . _kt('Comments') . ':
' . $sComment;
- $sMsgEnd .= '';
+ $sMessage .= sprintf("Vea el documento '%s'
", $sDocumentName);
+ //$sMessage .= sprintf(_kt("Your colleague, %s, wishes you to view the document entitled '%s'."), $oSendingUser->getName(), $sDocumentName);
+ $sMessage .= 'Puede acceder ahora ('.generateControllerLink('viewDocument', "fDocumentID=$iDocumentID", 'Ver documento').') pero tenga en cuenta que sólo podrá descargarlo una vez.';
+ $sMessage .= "
";
+ $sMessage .= 'Si desea volver a consultarlo más tarde, guárdelo antes.';
+ //$sMessage .= _kt('Click on the hyperlink below to view it.') . '
';
+ /*$sMsgEnd = '
' . _kt('Comments') . ':
' . $sComment;
+ $sMsgEnd .= '';*/
- $sTitle = sprintf(_kt("Link (ID %s): %s from %s"), $iDocumentID, $sDocumentName, $oSendingUser->getName());
-*/
- $sTitle = sprintf(_kt("%s wants to share a document using KnowledgeTree"), $oSendingUser->getName());
+ //$sMessage .= _kt('Comments') . ':
' . $sComment;
+ if (strlen($sComment) > 0) {
+ $sMessage .= '
' . _kt('Comments') . ':
' . nl2br($sComment);
+ }
+ $sMessage .= '
';
+
+
+ //$sTitle = sprintf(_kt("Link (ID %s): %s from %s"), $iDocumentID, $sDocumentName, $oSendingUser->getName());
+ //$sTitle = sprintf(_kt("%s quiere compartir con usted un documento (%s)"), $oSendingUser->getName(), $sDocumentName);
+ //$sTitle = sprintf(_kt("Document (ID %s): %s from %s"), $iDocumentID, $sDocumentName, $oSendingUser->getName());
+ $sTitle = sprintf("El documento '%s'", $sDocumentName);
+
+/* $sTitle = sprintf(_kt("%s wants to share a document using KnowledgeTree"), $oSendingUser->getName());
$sMessage = '
'._kt('Hello').',
@@ -169,6 +181,7 @@ function sendExternalEmails($aEmailAddresses, $iDocumentID, $sDocumentName, $sCo
'._kt('KnowledgeTree is easy to use open source document management software
that helps businesses collaborate, securely store all critical documents, address
compliance challenges, and improve business processes.').'
';
+*/
$sEmail = null;
$sEmailFrom = null;
@@ -194,9 +207,10 @@ function sendExternalEmails($aEmailAddresses, $iDocumentID, $sDocumentName, $sCo
$link = $oDownloadManager->allow_download($iDocumentID);
// $link = "{$link}";
- $links = ' '._kt('Learn More').'';
- $links.= " | "._kt('View Document')."";
- $links .= ' | '._kt('Download Free Trial').'
';
+ //$links = ' '._kt('Learn More').'';
+ //$links.= " | "._kt('View Document')."";
+ //$links .= ' | '._kt('Download Free Trial').'
';
+ //$links.= "
"._kt('View Document')."
";
// $sMsg = $sMessage.$link.$sMsgEnd;
$sMsg = $sMessage.$links;
@@ -243,16 +257,17 @@ function sendEmailDocument($aDestEmailAddress, $iDocumentID, $sDocumentName, $sC
$sDestEmails = implode(',', $aDestEmailAddress);
$oSendingUser = User::get($_SESSION['userID']);
- $sMessage .= sprintf(_kt("Your colleague, %s, wishes you to view the attached document entitled '%s'."), $oSendingUser->getName(), $sDocumentName);
- $sMessage .= "\n\n";
- $sMessage .= _kt('Click on the hyperlink below to view it.') . '
';
+ //$sMessage .= sprintf(_kt("Your colleague, %s, wishes you to view the attached document entitled '%s'."), $oSendingUser->getName(), $sDocumentName);
+ $sMessage .= sprintf(_kt("Vea el documento adjunto '%s'."), $sDocumentName);
+
+ //$sMessage .= _kt('Click on the hyperlink below to view it.') . '
';
// add the link to the document to the mail
- $sMessage .= '
' . generateControllerLink('viewDocument', "fDocumentID=$iDocumentID", $sDocumentName, true);
+ //$sMessage .= '
' . generateControllerLink('viewDocument', "fDocumentID=$iDocumentID", $sDocumentName, true);
// add additional comment
if (strlen($sComment) > 0) {
$sMessage .= '
' . _kt('Comments') . ':
' . nl2br($sComment);
}
- $sTitle = sprintf(_kt("Document (ID %s): %s from %s"), $iDocumentID, $sDocumentName, $oSendingUser->getName());
+ $sTitle = sprintf(_kt("El documento '%s'"), $sDocumentName);
$sEmail = null;
$sEmailFrom = null;
@@ -301,6 +316,9 @@ function sendEmailHyperlink($aDestEmailAddress, $iDocumentID, $sDocumentName, $s
// Get the email list as a string for the logs
$sDestEmails = implode(',', $aDestEmailAddress);
$oSendingUser = User::get($_SESSION['userID']);
+
+ $oDocument = Document::get($iDocumentID);
+ $sDocumentFullPath = $oDocument->getFullPath();
$sMessage = '';
/*
@@ -308,17 +326,23 @@ function sendEmailHyperlink($aDestEmailAddress, $iDocumentID, $sDocumentName, $s
$sMessage .= $sDestUserName . ',
';
}
*/
- $sMessage .= sprintf(_kt("Your colleague, %s, wishes you to view the document entitled '%s'."), $oSendingUser->getName(), $sDocumentName);
- $sMessage .= " \n";
- $sMessage .= _kt('Click on the hyperlink below to view it.') . '
';
+
+ //$sMessage .= sprintf(_kt("Your colleague, %s, wishes you to view the document entitled '%s'."), $oSendingUser->getName(), $sDocumentName);
+ $sMessage .= sprintf("Vea el documento '%s'.", $sDocumentFullPath);
+ $sMessage .= "
";
+ //$sMessage .= _kt('Click on the hyperlink below to view it.') . '
';
// add the link to the document to the mail
- $sMessage .= '
' . generateControllerLink('viewDocument', "fDocumentID=$iDocumentID", $sDocumentName, true);
+ //$sMessage .= '
' . generateControllerLink('viewDocument', "fDocumentID=$iDocumentID", $sDocumentName, true);
+ $sMessage .= 'Puede acceder ahora ('.generateControllerLink('viewDocument', "fDocumentID=$iDocumentID", 'Ver documento').') o más tarde a través de FLIPO.';
+
// add optional comment
if (strlen($sComment) > 0) {
$sMessage .= '
' . _kt('Comments') . ':
' . nl2br($sComment);
}
$sMessage .= '';
- $sTitle = sprintf(_kt("Link (ID %s): %s from %s"), $iDocumentID, $sDocumentName, $oSendingUser->getName());
+ //$sTitle = sprintf(_kt("Link (ID %s): %s from %s"), $iDocumentID, $sDocumentName, $oSendingUser->getName());
+ $sTitle = sprintf(_kt("El documento '%s'"), $sDocumentName);
+
//email the hyperlink
//
$sEmail = null;
@@ -599,4 +623,3 @@ class KTEmailPlugin extends KTPlugin {
$oRegistry =& KTPluginRegistry::getSingleton();
$oRegistry->registerPlugin('KTEmailPlugin', 'ktstandard.email.plugin', __FILE__);
-