2022-02-07 20:25:37 +00:00
|
|
|
{% macro posting(form) %}
|
|
|
|
<section class="section-form">
|
|
|
|
{{ form_start(form) }}
|
|
|
|
{{ form_errors(form) }}
|
|
|
|
{% if form.in is defined %}
|
|
|
|
{{ form_row(form.in) }}
|
|
|
|
{% endif %}
|
|
|
|
{{ form_row(form.visibility) }}
|
|
|
|
{{ form_row(form.content_type) }}
|
|
|
|
{{ form_row(form.content) }}
|
|
|
|
{{ form_row(form.attachments) }}
|
2021-12-01 20:13:24 +00:00
|
|
|
|
2022-02-16 21:17:13 +00:00
|
|
|
<details class="section-details-subtitle frame-section">
|
2022-02-07 20:25:37 +00:00
|
|
|
<summary class="details-summary-subtitle">
|
|
|
|
<strong>
|
2022-03-01 11:27:19 +00:00
|
|
|
{% trans %}Additional options{% endtrans %}
|
2022-02-07 20:25:37 +00:00
|
|
|
</strong>
|
|
|
|
</summary>
|
|
|
|
<section class="section-form">
|
|
|
|
{{ form_row(form.language) }}
|
|
|
|
{{ form_row(form.tag_use_canonical) }}
|
|
|
|
</section>
|
|
|
|
</details>
|
|
|
|
{{ form_rest(form) }}
|
|
|
|
{{ form_end(form) }}
|
|
|
|
</section>
|
|
|
|
{% endmacro %}
|
2021-12-01 20:13:24 +00:00
|
|
|
|
2022-02-07 20:25:37 +00:00
|
|
|
{% macro posting_section_vanilla(widget) %}
|
2022-03-01 11:27:19 +00:00
|
|
|
<section class="frame-section" title="{% trans %}Create a new note{% endtrans %}">
|
2022-02-07 20:25:37 +00:00
|
|
|
<details class="section-details-title" open="open"
|
2022-03-01 11:27:19 +00:00
|
|
|
title="{% trans %}Expand if you want to access more options{% endtrans %}">
|
2022-02-07 20:25:37 +00:00
|
|
|
<summary class="details-summary-title">
|
|
|
|
<span>
|
2022-03-01 11:27:19 +00:00
|
|
|
{% trans %}Create a note{% endtrans %}
|
2022-02-07 20:25:37 +00:00
|
|
|
</span>
|
|
|
|
</summary>
|
2021-12-01 20:13:24 +00:00
|
|
|
|
2022-02-07 20:25:37 +00:00
|
|
|
{% import _self as forms %}
|
|
|
|
{{ forms.posting(widget) }}
|
|
|
|
</details>
|
|
|
|
</section>
|
|
|
|
{% endmacro %}
|
2022-01-25 19:17:40 +00:00
|
|
|
|
2022-02-07 20:25:37 +00:00
|
|
|
{% macro posting_section_reply(widget, extra) %}
|
2022-03-01 11:27:19 +00:00
|
|
|
<section class="frame-section" title="{% trans %}Create a new note{% endtrans %}">
|
2022-02-07 20:25:37 +00:00
|
|
|
<details class="section-details-title" open="open"
|
2022-03-01 11:27:19 +00:00
|
|
|
title="{% trans %}Expand if you want to access more options{% endtrans %}">
|
2022-02-07 20:25:37 +00:00
|
|
|
<summary class="details-summary-title">
|
|
|
|
<span>
|
2022-03-01 11:27:19 +00:00
|
|
|
{% trans %}Reply to note{% endtrans %}
|
2022-02-07 20:25:37 +00:00
|
|
|
</span>
|
|
|
|
</summary>
|
2021-12-07 15:33:02 +00:00
|
|
|
|
2022-02-07 20:25:37 +00:00
|
|
|
{% for block in extra %}
|
2022-02-16 21:17:13 +00:00
|
|
|
<section class="posting-extra">
|
2022-02-07 20:25:37 +00:00
|
|
|
{{ block | raw }}
|
|
|
|
</section>
|
|
|
|
{% endfor %}
|
2021-12-01 20:13:24 +00:00
|
|
|
|
2022-02-07 20:25:37 +00:00
|
|
|
{% import _self as forms %}
|
|
|
|
{{ forms.posting(widget) }}
|
|
|
|
</details>
|
2022-01-19 23:54:45 +00:00
|
|
|
</section>
|
2022-02-07 20:25:37 +00:00
|
|
|
{% endmacro %}
|
|
|
|
|
|
|
|
{% block rightpanel %}
|
|
|
|
{% import _self as this %}
|
|
|
|
<label class="panel-right-icon" for="toggle-panel-right"
|
|
|
|
tabindex="-1">{{ icon('chevron-left', 'icon icon-right') | raw }}</label>
|
|
|
|
<a id="anchor-right-panel" class="anchor-hidden" tabindex="0"
|
2022-03-01 11:27:19 +00:00
|
|
|
title="{% trans %}Press tab followed by a space to access right panel{% endtrans %}"></a>
|
|
|
|
<input type="checkbox" id="toggle-panel-right" tabindex="0" title="{% trans %}Open right panel{% endtrans %}"
|
2022-02-07 20:25:37 +00:00
|
|
|
{% if app.request.get('_route') == 'conversation_reply_to' %}checked{% endif %}>
|
|
|
|
|
|
|
|
<aside class="section-panel section-panel-right">
|
|
|
|
{% set var_list = {'path': app.request.get('_route'), 'request': app.request, 'vars': right_panel_vars | default } %}
|
|
|
|
{% set blocks = add_right_panel_block('prepend', var_list) %}
|
|
|
|
{% set blocks = blocks|merge(add_right_panel_block('main', var_list)) %}
|
|
|
|
{% set blocks = blocks|merge(add_right_panel_block('append', var_list)) %}
|
|
|
|
|
|
|
|
<section class="panel-content accessibility-target">
|
|
|
|
{% for widget in blocks %}
|
|
|
|
{% if widget is iterable and widget.vars.id == 'post_note' %}
|
|
|
|
{% if app.request.get('_route') == 'conversation_reply_to' %}
|
|
|
|
{% set extra = handle_event('PrependPostingForm', request) %}
|
|
|
|
{{ this.posting_section_reply(widget, extra) }}
|
|
|
|
{% else %}
|
|
|
|
{{ this.posting_section_vanilla(widget) }}
|
|
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
|
|
{{ widget | raw }}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
|
|
|
</aside>
|
2021-12-01 20:13:24 +00:00
|
|
|
{% endblock rightpanel %}
|