gnu-social/plugins/AttachmentCollections/templates/AttachmentCollections/collection.html.twig

28 lines
1.2 KiB
Twig

{% extends 'stdgrid.html.twig' %}
{% import '/cards/note/view.html.twig' as noteView %}
{% block title %}{{ page_title | trans }}{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('assets/default_theme/css/pages/feeds.css') }}" type="text/css">
{% endblock stylesheets %}
{% block body %}
<h1>{{ page_title | trans }}</h1>
{# Backwards compatibility with hAtom 0.1 #}
<main class="feed" tabindex="0" role="feed">
<div class="h-feed hfeed notes">
{% for key, attachment in attachments %}
<section class="section-widget section-padding">
{% include '/cards/attachments/view.html.twig' with {'attachment': attachment, 'note': bare_notes[key], 'title': attachment.getBestTitle(bare_notes[key])} only %}
<a class="section-widget-button-like"
href="{{ attachment.getDownloadUrl(bare_notes[key]) }}"> {{ 'Download link' | trans }}</a>
</section>
{% else %}
<div id="empty-notes"><h1>{% trans %}No attachments here.{% endtrans %}</h1></div>
{% endfor %}
</div>
</main>
{% endblock body %}