[COMPONENT][Attachment] Vinculate note information with attachment controllers
Various minor bug fixes
This commit is contained in:
@@ -167,7 +167,7 @@ class Embed extends Plugin
|
||||
|
||||
$res[] = Formatting::twigRenderFile(
|
||||
'embed/embedView.html.twig',
|
||||
['embed' => $embed, 'attributes' => $attributes, 'link' => $link],
|
||||
['embed' => $embed, 'attributes' => $attributes, 'link' => $link, 'note' => $vars['note']],
|
||||
);
|
||||
|
||||
return Event::stop;
|
||||
|
@@ -7,12 +7,13 @@
|
||||
|
||||
{% if attributes['has_attachment'] != false %}
|
||||
{% set thumbnail_parameters = {
|
||||
'id': embed.getAttachmentId(),
|
||||
'note_id': note.getId(),
|
||||
'attachment_id': embed.getAttachmentId(),
|
||||
'size': 'medium'
|
||||
} %}
|
||||
<img alt="{{embed.getTitle() | escape}}" class="{{attributes['class']}}"
|
||||
width="{{attributes['width']}}" height="{{attributes['height']}}"
|
||||
src="{{ path('attachment_thumbnail', thumbnail_parameters) }}" />
|
||||
src="{{ path('note_attachment_thumbnail', thumbnail_parameters) }}" />
|
||||
{% endif %}
|
||||
|
||||
<div class="p-summary">
|
||||
|
Reference in New Issue
Block a user