forked from GNUsocial/gnu-social
Eliseu Amaro
e70acd5c3b
This little abstraction layer made it a bit easier to add a different title to a Note or Actor Feed Collection template, from whichever controller that uses it. Please, bear in mind, that abstract templates such as those found in Components\Collection, may act in a very 'declarative' way upon using them. This makes it difficult to dynamically choose what type of header is used without undergoing a mining operation in the likes of a pyramid of doom. Hence, this _little_ change.
71 lines
3.1 KiB
Twig
71 lines
3.1 KiB
Twig
{% extends 'stdgrid.html.twig' %}
|
|
|
|
{% block title %}{{ title }}{% endblock %}
|
|
|
|
{% block body %}
|
|
<section class="frame-section frame-section-padding">
|
|
<header class="feed-header">
|
|
{% if actors_feed_title is defined %}
|
|
{{ actors_feed_title.getHtml() }}
|
|
{% endif %}
|
|
</header>
|
|
|
|
{% set prepend_actors_collection = handle_event('PrependActorsCollection', request) %}
|
|
{% for widget in prepend_actors_collection %}
|
|
{{ widget | raw }}
|
|
{% endfor %}
|
|
|
|
<details class="frame-section section-details-title">
|
|
<summary class="details-summary-title">
|
|
<strong>
|
|
{% trans %}Ordering rules{% endtrans %}
|
|
</strong>
|
|
</summary>
|
|
<form method="GET" class="section-form">
|
|
<div class="container-grid">
|
|
<section class="frame-section frame-section-padding">
|
|
<strong>{% trans %}Sort by{% endtrans %}</strong>
|
|
<hr>
|
|
<div class="container-block">
|
|
{% for field in sort_form_fields %}
|
|
<span class="container-block">
|
|
<label for="order_by_{{ field.value }}">{{ field.label }}</label>
|
|
<input id="order_by_{{ field.value }}" type="radio" name="order_by" value="{{ field.value }}" {% if field.checked %}checked="checked"{% endif %}>
|
|
</span>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
<section class="frame-section frame-section-padding">
|
|
<strong class="section-title">{% trans %}Order{% endtrans %}</strong>
|
|
<hr>
|
|
<section class="container-block">
|
|
<span class="container-block">
|
|
<label for="order_op_asc">{% trans %}Ascending{% endtrans %}</label>
|
|
<input id="order_op_asc" type="radio" name="order_op" value="ASC">
|
|
</span>
|
|
<span class="container-block">
|
|
<label for="order_op_desc">{% trans %}Descending{% endtrans %}</label>
|
|
<input id="order_op_desc" type="radio" name="order_op" value="DESC" checked="checked">
|
|
</span>
|
|
</section>
|
|
</section>
|
|
</div>
|
|
<button type="submit">{% trans %}Order{% endtrans %}</button>
|
|
</form>
|
|
</details>
|
|
|
|
<section class="frame-section frame-section-padding">
|
|
<h2>{% trans %}Results{% endtrans %}</h2>
|
|
{% if actors is defined and actors is not empty %}
|
|
{% for actor in actors %}
|
|
{% block profile_view %}{% include 'cards/blocks/profile.html.twig' %}{% endblock profile_view %}
|
|
<hr>
|
|
{% endfor %}
|
|
<span class="frame-section-button-like">{% trans %}Page: %page%{% endtrans %}</span>
|
|
{% else %}
|
|
<span>{{ empty_message }}</span>
|
|
{% endif %}
|
|
</section>
|
|
</section>
|
|
{% endblock body %}
|