mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 11:18:51 +02:00
Fixed an exception on part tables, when an attachment is external.
This commit is contained in:
parent
2f1ff14a54
commit
09995330af
2 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* bootstrap-tagsinput v0.8.0
|
* bootstrap-tagsinput v0.8.0
|
||||||
*
|
* Modified by Jan Böhmer 2019
|
||||||
|
* (Added some margin between the tags.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.bootstrap-tagsinput {
|
.bootstrap-tagsinput {
|
||||||
|
|
|
@ -38,7 +38,7 @@ class PartAttachmentsColumn extends AbstractColumn
|
||||||
protected $FAIconGenerator;
|
protected $FAIconGenerator;
|
||||||
protected $urlGenerator;
|
protected $urlGenerator;
|
||||||
|
|
||||||
public function __construct(FAIconGenerator $FAIconGenerator, AttachmentURLGenerator $urlGenerator)
|
public function __construct(FAIconGenerator $FAIconGenerator, EntityURLGenerator $urlGenerator)
|
||||||
{
|
{
|
||||||
$this->FAIconGenerator = $FAIconGenerator;
|
$this->FAIconGenerator = $FAIconGenerator;
|
||||||
$this->urlGenerator = $urlGenerator;
|
$this->urlGenerator = $urlGenerator;
|
||||||
|
@ -74,7 +74,7 @@ class PartAttachmentsColumn extends AbstractColumn
|
||||||
/** @var Attachment $attachment */
|
/** @var Attachment $attachment */
|
||||||
$tmp .= sprintf(
|
$tmp .= sprintf(
|
||||||
'<a href="%s" title="%s" class="attach-table-icon" target="_blank" rel="noopener" data-no-ajax>%s</a>',
|
'<a href="%s" title="%s" class="attach-table-icon" target="_blank" rel="noopener" data-no-ajax>%s</a>',
|
||||||
$this->urlGenerator->getViewURL($attachment),
|
$this->urlGenerator->viewURL($attachment),
|
||||||
htmlspecialchars($attachment->getName()) . ': ' . htmlspecialchars($attachment->getFilename()),
|
htmlspecialchars($attachment->getName()) . ': ' . htmlspecialchars($attachment->getFilename()),
|
||||||
$this->FAIconGenerator->generateIconHTML(
|
$this->FAIconGenerator->generateIconHTML(
|
||||||
$this->FAIconGenerator->fileExtensionToFAType($attachment->getExtension()),
|
$this->FAIconGenerator->fileExtensionToFAType($attachment->getExtension()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue