Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 231bd79a authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

changes for email template modification on update

parent ce132952
Loading
Loading
Loading
Loading
Loading
+5 −36
Original line number Diff line number Diff line
--- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php	2022-07-07 09:40:41.675627600 +0530
--- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php	2022-07-07 09:56:28.335627600 +0530
+++ ./apps/dav/lib/CalDAV/Schedule/IMipPlugin-new.php	2022-07-07 09:45:48.035627600 +0530
@@ -151,15 +151,6 @@
 	 */
@@ -41,8 +41,7 @@
+				$lastmodified=$dtstampTime;
+				$selectedEvent = $currentevent;
+			}
 		}
-		$meetingWhen = $this->generateWhenString($l10n, $vevent);
+		}
+
+		if ($selectedEvent->SUMMARY) {
+
@@ -53,7 +52,8 @@
+				$template->addBodyListItemModified($selectedEvent->SUMMARY, $l10n->t('Updated Title:'),
+					$this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT);
+			}
+		}
 		}
-		$meetingWhen = $this->generateWhenString($l10n, $vevent);
+		$meetingWhen = $this->generateWhenString($l10n, $selectedEvent);
 		if ($meetingWhen) {
-			$template->addBodyListItem($meetingWhen, $l10n->t('Time:'),
@@ -117,38 +117,7 @@
 		}
 	}

@@ -659,7 +692,7 @@
 										Message $iTipMessage, $lastOccurrence) {
 		$token = $this->createInvitationToken($iTipMessage, $lastOccurrence);

-		$template->addBodyButtonGroupTentative(
+		$template->addBodyButtonGroup(
 			$l10n->t('Accept'),
 			$this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.accept', [
 				'token' => $token,
@@ -667,11 +700,18 @@
 			$l10n->t('Decline'),
 			$this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.decline', [
 				'token' => $token,
-			]),
-			$l10n->t('Maybe'),
-			$this->urlGenerator->getAbsoluteUrl('apps/calendar/invitation/tentative/'.$token)
+			])
 		);

+		$moreOptionsURL = $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.options', [
+			'token' => $token,
+		]);
+		$html = vsprintf('<small><a href="%s">%s</a></small>', [
+			$moreOptionsURL, $l10n->t('More options …')
+		]);
+		$text = $l10n->t('More options at %s', [$moreOptionsURL]);
+
+		$template->addBodyText($html, $text);
 	}

 	/**
@@ -716,4 +756,4 @@
@@ -723,4 +756,4 @@

 		return $token;
 	}