[TWIG] Form layout is all new, since extending form_div_layout.html.twig was quite limiting
[COMPONENTS][Posting] It is now visible on Actor profiles [COMPONENTS][Search] Overall rework of search results template, there's also additional help text added [CSS] Header no longer translucent, font sizes yet more consistent, replies marker less pronounced, and font hierarchy is now applied in both weight and size
This commit is contained in:
@@ -75,7 +75,7 @@ class Posting extends Component
|
||||
*/
|
||||
public function onAddMainRightPanelBlock(Request $request, array &$res): bool
|
||||
{
|
||||
if (\is_null($user = Common::user()) || preg_match('(feed|conversation|group)', $request->get('_route')) === 0) {
|
||||
if (\is_null($user = Common::user()) || preg_match('(feed|conversation|group|view)', $request->get('_route')) === 0) {
|
||||
return Event::next;
|
||||
}
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
{{ form_row(form.content) }}
|
||||
{{ form_row(form.attachments) }}
|
||||
|
||||
<details class="section-details-subtitle">
|
||||
<details class="section-details-subtitle frame-section">
|
||||
<summary class="details-summary-subtitle">
|
||||
<strong>
|
||||
{{ "Additional options" | trans }}
|
||||
@@ -53,7 +53,7 @@
|
||||
</summary>
|
||||
|
||||
{% for block in extra %}
|
||||
<section class="posting-extra frame-section-padding">
|
||||
<section class="posting-extra">
|
||||
{{ block | raw }}
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
@@ -63,13 +63,22 @@ class Search extends Component
|
||||
|
||||
if ($add_subscribe) {
|
||||
$form_definition[] = [
|
||||
'title', TextType::class, ['label' => _m('Title'), 'required' => false, 'attr' => ['title' => _m('Title for this new feed in your left panel')]],
|
||||
'title', TextType::class,
|
||||
[
|
||||
'label' => _m('Subscribe to search query'),
|
||||
'help' => _m('By subscribing to a search query, a new feed link will be added to left panel\'s feed navigation menu'),
|
||||
'required' => false,
|
||||
'attr' => [
|
||||
'title' => _m('Title for this new feed in your left panel'),
|
||||
'placeholder' => _m('Input desired title...'),
|
||||
],
|
||||
],
|
||||
];
|
||||
$form_definition[] = [
|
||||
'subscribe_to_search',
|
||||
SubmitType::class,
|
||||
[
|
||||
'label' => _m('Subscribe to this search'),
|
||||
'label' => _m('Subscribe'),
|
||||
'attr' => [
|
||||
'title' => _m('Add this search as a feed in your feeds section of the left panel'),
|
||||
],
|
||||
|
@@ -1,63 +1,45 @@
|
||||
{% extends 'collection/notes.html.twig' %}
|
||||
|
||||
{% block search_query_simple %}
|
||||
<section>
|
||||
<h1 class="section-title">{% trans %}Search{% endtrans %}</h1>
|
||||
|
||||
{% block body %}
|
||||
{% if error is defined %}
|
||||
<label class="alert alert-danger">
|
||||
{{ error.getMessage() }}
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
<h1>{% trans %}Search{% endtrans %}</h1>
|
||||
|
||||
<section class="frame-section frame-section-padding">
|
||||
{{ form_start(search_form) }}
|
||||
{{ form_errors(search_form) }}
|
||||
<div class="section-title">
|
||||
{{ form_row(search_form.search_query) }}
|
||||
</div>
|
||||
{{ form_row(search_form.search_query) }}
|
||||
{% if actor is not null %}
|
||||
<details class="frame-section section-details-subtitle">
|
||||
<details class="section-details-subtitle frame-section">
|
||||
<summary class="details-summary-subtitle">
|
||||
<strong>{% trans %}Other options{% endtrans %}</strong>
|
||||
<strong>
|
||||
{% trans %}Extra options{% endtrans %}
|
||||
</strong>
|
||||
</summary>
|
||||
|
||||
<div class="section-form">
|
||||
<details class="section-details-subtitle">
|
||||
<summary class="details-summary-subtitle">
|
||||
<strong>
|
||||
{% trans %}Save query as a feed{% endtrans %}
|
||||
</strong>
|
||||
</summary>
|
||||
<div class="section-form">
|
||||
{{ form_row(search_form.title) }}
|
||||
{{ form_row(search_form.subscribe_to_search) }}
|
||||
</div>
|
||||
<hr>
|
||||
</details>
|
||||
{{ form_row(search_form.title) }}
|
||||
{{ form_row(search_form.subscribe_to_search) }}
|
||||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
{{ form_row(search_form.submit_search) }}
|
||||
{{ form_rest(search_form) }}
|
||||
{{ form_end(search_form)}}
|
||||
</section>
|
||||
{% endblock search_query_simple %}
|
||||
|
||||
<hr>
|
||||
{% block search_query_advanced %}
|
||||
{{ form_start(search_builder_form) }}
|
||||
<details class="section-details section-details-title frame-section">
|
||||
<summary class="details-summary-title">
|
||||
<span>{% trans %}Advanced search{% endtrans %}</span>
|
||||
</summary>
|
||||
|
||||
<section class="frame-section">
|
||||
<details class="section-details-subtitle">
|
||||
<summary class="details-summary-subtitle">
|
||||
<strong>{% trans %}Build a search query{% endtrans %}</strong>
|
||||
</summary>
|
||||
|
||||
<div class="section-form">
|
||||
{{ form_start(search_builder_form) }}
|
||||
{# actor options, display if first checked, with checkbox trick #}
|
||||
<details class="section-details-subtitle">
|
||||
<summary class="details-summary-subtitle">
|
||||
<strong>{% trans %}People search options{% endtrans %}</strong>
|
||||
</summary>
|
||||
<div class="section-form">
|
||||
<section class="frame-section-padding">
|
||||
<details class="section-details-subtitle frame-section">
|
||||
<summary class="details-summary-subtitle">
|
||||
<strong>{% trans %}People search options{% endtrans %}</strong>
|
||||
</summary>
|
||||
<div class="section-form">
|
||||
<div class="section-checkbox-flex">
|
||||
{{ form_row(search_builder_form.include_actors) }}
|
||||
{{ form_row(search_builder_form.include_actors_people) }}
|
||||
{{ form_row(search_builder_form.include_actors_groups) }}
|
||||
@@ -65,61 +47,84 @@
|
||||
{{ form_row(search_builder_form.include_actors_businesses) }}
|
||||
{{ form_row(search_builder_form.include_actors_organizations) }}
|
||||
{{ form_row(search_builder_form.include_actors_bots) }}
|
||||
{{ form_row(search_builder_form.actor_langs) }}
|
||||
{{ form_row(search_builder_form.actor_tags) }}
|
||||
</div>
|
||||
<hr>
|
||||
</details>
|
||||
{{ form_row(search_builder_form.actor_tags) }}
|
||||
<hr>
|
||||
{{ form_row(search_builder_form.actor_langs) }}
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details class="section-details-subtitle">
|
||||
<summary class="details-summary-subtitle">
|
||||
<strong>{% trans %}Note search options{% endtrans %}</strong>
|
||||
</summary>
|
||||
<div class="section-form">
|
||||
<details class="section-details-subtitle frame-section">
|
||||
<summary class="details-summary-subtitle">
|
||||
<strong>{% trans %}Note search options{% endtrans %}</strong>
|
||||
</summary>
|
||||
<div class="section-form">
|
||||
<div class="section-checkbox-flex">
|
||||
{{ form_row(search_builder_form.include_notes) }}
|
||||
{{ form_row(search_builder_form.include_notes_text) }}
|
||||
{{ form_row(search_builder_form.include_notes_media) }}
|
||||
{{ form_row(search_builder_form.include_notes_polls) }}
|
||||
{{ form_row(search_builder_form.include_notes_bookmarks) }}
|
||||
{{ form_row(search_builder_form.note_langs) }}
|
||||
{{ form_row(search_builder_form.note_tags) }}
|
||||
{{ form_row(search_builder_form.note_actor_langs) }}
|
||||
{{ form_row(search_builder_form.note_actor_tags) }}
|
||||
</div>
|
||||
<hr>
|
||||
</details>
|
||||
{{ form_rest(search_builder_form) }}
|
||||
{{ form_end(search_builder_form) }}
|
||||
</div>
|
||||
</details>
|
||||
{{ form_row(search_builder_form.note_tags) }}
|
||||
<hr>
|
||||
{{ form_row(search_builder_form.note_langs) }}
|
||||
<hr>
|
||||
{{ form_row(search_builder_form.note_actor_tags) }}
|
||||
<hr>
|
||||
{{ form_row(search_builder_form.note_actor_langs) }}
|
||||
</div>
|
||||
</details>
|
||||
|
||||
{{ form_rest(search_builder_form) }}
|
||||
</section>
|
||||
</details>
|
||||
{{ form_end(search_builder_form) }}
|
||||
{% endblock search_query_advanced %}
|
||||
|
||||
{% block search %}
|
||||
<section class="frame-section frame-section-padding">
|
||||
{% if error is defined %}
|
||||
<label class="alert alert-danger">
|
||||
{{ error.getMessage() }}
|
||||
</label>
|
||||
{% endif %}
|
||||
{{ block('search_query_simple') }}
|
||||
<hr>
|
||||
{{ block('search_query_advanced') }}
|
||||
</section>
|
||||
</section>
|
||||
{% endblock search %}
|
||||
|
||||
<section class="frame-section frame-section-padding">
|
||||
<h2>{% trans %}Results{% endtrans %}</h2>
|
||||
<div class="frame-section frame-section-padding feed-empty">
|
||||
{% if notes is defined and notes is not empty %}
|
||||
{{ parent() }}
|
||||
{% else %}
|
||||
<h3>{% trans %}No notes found{% endtrans %}</h3>
|
||||
<em>{% trans %}No notes were found for the specified query...{% endtrans %}</em>
|
||||
{% endif %}
|
||||
{% block body %}
|
||||
{{ block('search') }}
|
||||
<div class="frame-section frame-section-padding">
|
||||
<h1 class="section-title">{% trans %}Results{% endtrans %}</h1>
|
||||
|
||||
<section>
|
||||
{% if notes is defined and notes is not empty %}
|
||||
{{ parent() }}
|
||||
{% else %}
|
||||
<h3>{% trans %}No notes found{% endtrans %}</h3>
|
||||
<em>{% trans %}No notes were found for the specified query...{% endtrans %}</em>
|
||||
{% endif %}
|
||||
</section>
|
||||
<hr>
|
||||
<section>
|
||||
<h3>{% trans %}Actors found{% endtrans %}</h3>
|
||||
{% if actors is defined and actors is not empty %}
|
||||
{% for actor in actors %}
|
||||
{% include 'cards/blocks/profile.html.twig' with {'actor': actor} %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<em>{% trans %}No Actors were found for the specified query...{% endtrans %}</em>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
<div class="frame-section-button-like">
|
||||
{{ "Page: " ~ page }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="frame-section frame-section-padding feed-empty">
|
||||
<h3>{% trans %}Actors found{% endtrans %}</h3>
|
||||
{% if actors is defined and actors is not empty %}
|
||||
{% for actor in actors %}
|
||||
{% include 'cards/blocks/profile.html.twig' with {'actor': actor} %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<em>{% trans %}No Actors were found for the specified query...{% endtrans %}</em>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="frame-section-button-like">
|
||||
{{ "Page: " ~ page }}
|
||||
</div>
|
||||
{% endblock body %}
|
||||
|
||||
|
Reference in New Issue
Block a user