From 5dfbe56f91e26c5c8b5bc5cd3a849be8103fee5d Mon Sep 17 00:00:00 2001 From: brad2014 Date: Thu, 10 Oct 2019 14:35:28 -0700 Subject: [PATCH] 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: brad@wbr.tech --- apps/dav/lib/CalDAV/Schedule/IMipPlugin.php | 14 +++++++------- core/img/caldav/attendees.svg | 1 + core/img/caldav/description.svg | 1 + core/img/caldav/link.svg | 1 + core/img/caldav/location.svg | 1 + core/img/caldav/organizer.svg | 1 + core/img/caldav/time.svg | 1 + core/img/caldav/title.svg | 1 + 8 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 core/img/caldav/attendees.svg create mode 100644 core/img/caldav/description.svg create mode 100644 core/img/caldav/link.svg create mode 100644 core/img/caldav/location.svg create mode 100644 core/img/caldav/organizer.svg create mode 100644 core/img/caldav/time.svg create mode 100644 core/img/caldav/title.svg diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index f753e6fb1cda5..c4962e723f459 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -500,23 +500,23 @@ private function addBulletList(IEMailTemplate $template, IL10N $l10n, $vevent) { 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); } @@ -525,7 +525,7 @@ private function addBulletList(IEMailTemplate $template, IL10N $l10n, $vevent) { /* 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); } } @@ -566,7 +566,7 @@ private function addAttendees(IEMailTemplate $template, IL10N $l10n, VEvent $vev $organizerText .= ' ✔︎'; } $template->addBodyListItem($organizerHTML, $l10n->t('Organizer:'), - $this->getAbsoluteImagePath('filetypes/text-vcard.svg'), + $this->getAbsoluteImagePath('caldav/organizer.svg'), $organizerText,'',self::IMIP_INDENT); } @@ -595,7 +595,7 @@ private function addAttendees(IEMailTemplate $template, IL10N $l10n, VEvent $vev } $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 0000000000000..86c3d4a413201 --- /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 0000000000000..57c2b1f57251d --- /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 0000000000000..7bfbe1eb2de7e --- /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 0000000000000..5e63f7563cd4a --- /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 0000000000000..7b75d9e29a6d9 --- /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 0000000000000..2fdfde6796071 --- /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 0000000000000..57d674b9f2c4e --- /dev/null +++ b/core/img/caldav/title.svg @@ -0,0 +1 @@ +