Add event/task description to invitation body (Bifrost#T51237)

This commit is contained in:
Aleksander Machniak 2017-10-17 11:14:09 +02:00
parent d331f73d01
commit 2859dc7869
3 changed files with 14 additions and 9 deletions

View file

@ -179,7 +179,7 @@ $labels['nextslot'] = 'Next Slot';
$labels['suggestedslot'] = 'Suggested Slot'; $labels['suggestedslot'] = 'Suggested Slot';
$labels['noslotfound'] = 'Unable to find a free time slot'; $labels['noslotfound'] = 'Unable to find a free time slot';
$labels['invitationsubject'] = 'You\'ve been invited to "$title"'; $labels['invitationsubject'] = 'You\'ve been invited to "$title"';
$labels['invitationmailbody'] = "*\$title*\n\nWhen: \$date\n\nInvitees: \$attendees\n\nPlease find attached an iCalendar file with all the event details which you can import to your calendar application."; $labels['invitationmailbody'] = "*\$title*\n\nWhen: \$date\n\nInvitees: \$attendees\n\n\$description\n\nPlease find attached an iCalendar file with all the event details which you can import to your calendar application.";
$labels['invitationattendlinks'] = "In case your email client doesn't support iTip requests you can use the following link to either accept or decline this invitation:\n\$url"; $labels['invitationattendlinks'] = "In case your email client doesn't support iTip requests you can use the following link to either accept or decline this invitation:\n\$url";
$labels['eventupdatesubject'] = '"$title" has been updated'; $labels['eventupdatesubject'] = '"$title" has been updated';
$labels['eventupdatesubjectempty'] = 'An event that concerns you has been updated'; $labels['eventupdatesubjectempty'] = 'An event that concerns you has been updated';

View file

@ -95,8 +95,9 @@ class libcalendaring_itip
*/ */
public function send_itip_message($event, $method, $recipient, $subject, $bodytext, $message = null, $rsvp = true) public function send_itip_message($event, $method, $recipient, $subject, $bodytext, $message = null, $rsvp = true)
{ {
if (!$this->sender['name']) if (!$this->sender['name']) {
$this->sender['name'] = $this->sender['email']; $this->sender['name'] = $this->sender['email'];
}
if (!$message) { if (!$message) {
libcalendaring::identify_recurrence_instance($event); libcalendaring::identify_recurrence_instance($event);
@ -111,7 +112,7 @@ class libcalendaring_itip
'name' => $subject, 'name' => $subject,
'vars' => array( 'vars' => array(
'title' => $event['title'], 'title' => $event['title'],
'name' => $this->sender['name'] 'name' => $this->sender['name'],
) )
)); ));
@ -139,9 +140,13 @@ class libcalendaring_itip
'attendees' => join(",\n ", $attendees_list), 'attendees' => join(",\n ", $attendees_list),
'sender' => $this->sender['name'], 'sender' => $this->sender['name'],
'organizer' => $this->sender['name'], 'organizer' => $this->sender['name'],
'description' => $event['description'],
) )
)); ));
// remove redundant empty lines (e.g. when an event description is empty)
$mailbody = preg_replace('/\n{3,}/', "\n\n", $mailbody);
// if (!empty($event['comment'])) { // if (!empty($event['comment'])) {
// $mailbody .= "\n\n" . $this->gettext('itipsendercomment') . $event['comment']; // $mailbody .= "\n\n" . $this->gettext('itipsendercomment') . $event['comment'];
// } // }

View file

@ -148,7 +148,7 @@ $labels['sendinvitations'] = 'Send invitations';
$labels['sendnotifications'] = 'Notify assignees about modifications'; $labels['sendnotifications'] = 'Notify assignees about modifications';
$labels['sendcancellation'] = 'Notify assignees about task cancellation'; $labels['sendcancellation'] = 'Notify assignees about task cancellation';
$labels['invitationsubject'] = 'You\'ve been assigned to "$title"'; $labels['invitationsubject'] = 'You\'ve been assigned to "$title"';
$labels['invitationmailbody'] = "*\$title*\n\nDue: \$date\n\nAssignees: \$attendees\n\nPlease find attached an iCalendar file with all the task details which you can import to your tasks application."; $labels['invitationmailbody'] = "*\$title*\n\nDue: \$date\n\nAssignees: \$attendees\n\n\$description\n\nPlease find attached an iCalendar file with all the task details which you can import to your tasks application.";
$labels['itipupdatesubject'] = '"$title" has been updated'; $labels['itipupdatesubject'] = '"$title" has been updated';
$labels['itipupdatesubjectempty'] = 'A task that concerns you has been updated'; $labels['itipupdatesubjectempty'] = 'A task that concerns you has been updated';
$labels['itipupdatemailbody'] = "*\$title*\n\nDue: \$date\n\nAssignees: \$attendees\n\nPlease find attached an iCalendar file with the updated task details which you can import to your tasks application."; $labels['itipupdatemailbody'] = "*\$title*\n\nDue: \$date\n\nAssignees: \$attendees\n\nPlease find attached an iCalendar file with the updated task details which you can import to your tasks application.";