forked from GNUsocial/gnu-social
[COMPONENT][Attachment] Vinculate note information with attachment controllers
Various minor bug fixes
This commit is contained in:
@@ -101,6 +101,7 @@ class AudioEncoder extends Plugin
|
||||
[
|
||||
'attachment' => $vars['attachment'],
|
||||
'note' => $vars['note'],
|
||||
'title' => $vars['title'],
|
||||
],
|
||||
);
|
||||
return Event::stop;
|
||||
|
@@ -1,13 +1,13 @@
|
||||
{% if attachment.getFilename() is not null %}
|
||||
<div>
|
||||
<figure>
|
||||
<audio class="u-audio" src="{{ attachment.getUrl() }}" controls>
|
||||
<audio class="u-audio" src="{{ attachment.getUrl(note) }}" controls>
|
||||
</audio>
|
||||
<figcaption>
|
||||
{% if attachment.getFilename() is not null %}
|
||||
<a href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getBestTitle(note) }}</a>
|
||||
<a href="{{ attachment.getShowUrl(note) }}">{{ title }}</a>
|
||||
{% else %}
|
||||
{{ attachment.getBestTitle(note) }}
|
||||
{{ title }}
|
||||
{% endif %}
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
Reference in New Issue
Block a user