Skip to content

Commit

Permalink
Make icon set for CalDav event presentation, use in iMIP email.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
brad2014 committed Oct 10, 2019
1 parent 3164818 commit 5dfbe56
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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('<a href="%s">%s</a>',
htmlspecialchars($vevent->URL),
htmlspecialchars($vevent->URL)),
$l10n->t('Link:'),
$this->getAbsoluteImagePath('filetypes/link.svg'),
$this->getAbsoluteImagePath('caldav/link.svg'),
$vevent->URL,'',self::IMIP_INDENT);
}

Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -595,7 +595,7 @@ private function addAttendees(IEMailTemplate $template, IL10N $l10n, VEvent $vev
}

$template->addBodyListItem(implode('<br/>',$attendeesHTML), $l10n->t('Attendees:'),
$this->getAbsoluteImagePath('filetypes/text-vcard.svg'),
$this->getAbsoluteImagePath('caldav/attendees.svg'),
implode("\n",$attendeesText),'',self::IMIP_INDENT);
}

Expand Down
1 change: 1 addition & 0 deletions core/img/caldav/attendees.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions core/img/caldav/description.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions core/img/caldav/link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions core/img/caldav/location.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions core/img/caldav/organizer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions core/img/caldav/time.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions core/img/caldav/title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5dfbe56

Please sign in to comment.