gnu-social/templates/collections/collections.html.twig

44 lines
1.8 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">
{% if add_collection %}
<div class="h-entry hentry note collection-add">
{{ form(add_collection) }}
</div>
{% endif %}
<div class="h-entry hentry note collections-list">
<h3>{{ 'Your collections' | trans }}</h3>
{% for col in collections %}
<div class="collection-item">
<a class="name" href="{{ fn.getUrl(col.id) }}">{{ col.name }}</a>
<details title="Expand if you want to edit the collection's name">
<summary>
<div class="collection-action">{{ icon('edit') | raw }}</div>
</summary>
{{ form(fn.editForm(col)) }}
</details>
<details title="Expand if you want to delete the collection">
<summary>
<div class="collection-action">{{ icon('delete') | raw }}</div>
</summary>
{{ form(fn.rmForm(col)) }}
</details>
</div>
{% endfor %}
</div>
</div>
</main>
{% endblock body %}