diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-04-11 09:09:45 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-04-25 20:47:17 +0200 |
commit | 2c2e1f7988df795d8f85a3003f84fa646c701380 (patch) | |
tree | 79c6ccf13e2efd5228f5d1971f171c9de42ef23d /lib/private/Contacts | |
parent | b8c2a8ae36235780675103286a04f8b6af50b4aa (diff) | |
download | nextcloud-server-2c2e1f7988df795d8f85a3003f84fa646c701380.tar.gz nextcloud-server-2c2e1f7988df795d8f85a3003f84fa646c701380.zip |
Use absolute URI for action icons
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Contacts')
-rw-r--r-- | lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php index 18e7ad8cddb..d5630e6420d 100644 --- a/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php +++ b/lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php @@ -27,26 +27,32 @@ namespace OC\Contacts\ContactsMenu\Providers; use OCP\Contacts\ContactsMenu\IActionFactory; use OCP\Contacts\ContactsMenu\IEntry; use OCP\Contacts\ContactsMenu\IProvider; +use OCP\IURLGenerator; class EMailProvider implements IProvider { /** @var IActionFactory */ private $actionFactory; + /** @var IURLGenerator */ + private $urlGenerator; + /** * @param IActionFactory $actionFactory + * @param IURLGenerator $urlGenerator */ - public function __construct(IActionFactory $actionFactory) { + public function __construct(IActionFactory $actionFactory, IURLGenerator $urlGenerator) { $this->actionFactory = $actionFactory; + $this->urlGenerator = $urlGenerator; } /** * @param IEntry $entry */ public function process(IEntry $entry) { + $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg')); foreach ($entry->getEMailAddresses() as $address) { - // TODO: absolute path - $action = $this->actionFactory->newEMailAction('icon-mail', $address, $address); + $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address); $entry->addAction($action); } } |