From: brad2014 Date: Thu, 10 Oct 2019 21:35:28 +0000 (-0700) Subject: Make icon set for CalDav event presentation, use in iMIP email. X-Git-Tag: v20.0.0beta4~60^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b0687b1182e0c2da8873b2224d299f4c933f29db;p=nextcloud-server.git Make icon set for CalDav event presentation, use in iMIP email. iMIP e-mails were, as a hack, using filetypes icons for caldav elements (titles, locations). This commit creates a folder of caldav element icons. To start, they are used in iMIP emails, but eventually should be used by any app that wants to have icon labels for caldav elements. Signed-off-by: brad2014 --- diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index 011314b41d6..6a9b64ff971 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -529,23 +529,23 @@ class IMipPlugin extends SabreIMipPlugin { if ($vevent->SUMMARY) { $template->addBodyListItem($vevent->SUMMARY, $l10n->t('Title:'), - $this->getAbsoluteImagePath('filetypes/text.svg'),'','',self::IMIP_INDENT); + $this->getAbsoluteImagePath('caldav/title.svg'),'','',self::IMIP_INDENT); } $meetingWhen = $this->generateWhenString($l10n, $vevent); if ($meetingWhen) { $template->addBodyListItem($meetingWhen, $l10n->t('Time:'), - $this->getAbsoluteImagePath('filetypes/text-calendar.svg'),'','',self::IMIP_INDENT); + $this->getAbsoluteImagePath('caldav/time.svg'),'','',self::IMIP_INDENT); } if ($vevent->LOCATION) { $template->addBodyListItem($vevent->LOCATION, $l10n->t('Location:'), - $this->getAbsoluteImagePath('filetypes/location.svg'),'','',self::IMIP_INDENT); + $this->getAbsoluteImagePath('caldav/location.svg'),'','',self::IMIP_INDENT); } if ($vevent->URL) { $template->addBodyListItem(sprintf('%s', htmlspecialchars($vevent->URL), htmlspecialchars($vevent->URL)), $l10n->t('Link:'), - $this->getAbsoluteImagePath('filetypes/link.svg'), + $this->getAbsoluteImagePath('caldav/link.svg'), $vevent->URL,'',self::IMIP_INDENT); } @@ -554,7 +554,7 @@ class IMipPlugin extends SabreIMipPlugin { /* Put description last, like an email body, since it can be arbitrarily long */ if ($vevent->DESCRIPTION) { $template->addBodyListItem($vevent->DESCRIPTION, $l10n->t('Description:'), - $this->getAbsoluteImagePath('filetypes/text.svg'),'','',self::IMIP_INDENT); + $this->getAbsoluteImagePath('caldav/description.svg'),'','',self::IMIP_INDENT); } } @@ -595,7 +595,7 @@ class IMipPlugin extends SabreIMipPlugin { $organizerText .= ' ✔︎'; } $template->addBodyListItem($organizerHTML, $l10n->t('Organizer:'), - $this->getAbsoluteImagePath('filetypes/text-vcard.svg'), + $this->getAbsoluteImagePath('caldav/organizer.svg'), $organizerText,'',self::IMIP_INDENT); } @@ -624,7 +624,7 @@ class IMipPlugin extends SabreIMipPlugin { } $template->addBodyListItem(implode('
',$attendeesHTML), $l10n->t('Attendees:'), - $this->getAbsoluteImagePath('filetypes/text-vcard.svg'), + $this->getAbsoluteImagePath('caldav/attendees.svg'), implode("\n",$attendeesText),'',self::IMIP_INDENT); } diff --git a/core/img/caldav/attendees.svg b/core/img/caldav/attendees.svg new file mode 100644 index 00000000000..86c3d4a4132 --- /dev/null +++ b/core/img/caldav/attendees.svg @@ -0,0 +1 @@ + diff --git a/core/img/caldav/description.svg b/core/img/caldav/description.svg new file mode 100644 index 00000000000..57c2b1f5725 --- /dev/null +++ b/core/img/caldav/description.svg @@ -0,0 +1 @@ + diff --git a/core/img/caldav/link.svg b/core/img/caldav/link.svg new file mode 100644 index 00000000000..7bfbe1eb2de --- /dev/null +++ b/core/img/caldav/link.svg @@ -0,0 +1 @@ + diff --git a/core/img/caldav/location.svg b/core/img/caldav/location.svg new file mode 100644 index 00000000000..5e63f7563cd --- /dev/null +++ b/core/img/caldav/location.svg @@ -0,0 +1 @@ + diff --git a/core/img/caldav/organizer.svg b/core/img/caldav/organizer.svg new file mode 100644 index 00000000000..7b75d9e29a6 --- /dev/null +++ b/core/img/caldav/organizer.svg @@ -0,0 +1 @@ + diff --git a/core/img/caldav/time.svg b/core/img/caldav/time.svg new file mode 100644 index 00000000000..2fdfde67960 --- /dev/null +++ b/core/img/caldav/time.svg @@ -0,0 +1 @@ + diff --git a/core/img/caldav/title.svg b/core/img/caldav/title.svg new file mode 100644 index 00000000000..57d674b9f2c --- /dev/null +++ b/core/img/caldav/title.svg @@ -0,0 +1 @@ +