1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00
This commit is contained in:
Hillel Coren 2016-09-27 20:34:43 +03:00
parent ed1edc64bc
commit 2b2cfbc2e5
2 changed files with 17 additions and 1 deletions

View File

@ -735,6 +735,22 @@ class Account extends Eloquent
return Document::getDirectFileUrl($this->logo, $this->getLogoDisk());
}
public function getLogoPath()
{
if ( ! $this->hasLogo()){
return null;
}
$disk = $this->getLogoDisk();
$adapter = $disk->getAdapter();
if ($adapter instanceof \League\Flysystem\Adapter\Local) {
return $adapter->applyPathPrefix($this->logo);
} else {
return Document::getDirectFileUrl($this->logo, $this->getLogoDisk());
}
}
/**
* @return mixed
*/

View File

@ -3,7 +3,7 @@
<a href="{{ $account->website }}" style="color: #19BB40; text-decoration: underline;">
@endif
<img src="{{ isset($message) ? $message->embed($account->getLogoURL()) : $account->getLogoURL() }}" style="max-height:50px; max-width:140px; margin-left: 33px;" />
<img src="{{ isset($message) ? $message->embed($account->getLogoPath()) : $account->getLogoURL() }}" style="max-height:50px; max-width:140px; margin-left: 33px;" />
@if ($account->website)
</a>