2022-02-08 05:25:37 +09: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-02 05:13:24 +09:00
|
|
|
|
2022-02-17 06:17:13 +09:00
|
|
|
<details class="section-details-subtitle frame-section">
|
2022-02-08 05:25:37 +09:00
|
|
|
<summary class="details-summary-subtitle">
|
|
|
|
<strong>
|
|
|
|
{{ "Additional options" | trans }}
|
|
|
|
</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-02 05:13:24 +09:00
|
|
|
|
2022-02-08 05:25:37 +09:00
|
|
|
{% macro posting_section_vanilla(widget) %}
|
|
|
|
<section class="frame-section" title="{{ 'Create a new note.' | trans }}">
|
|
|
|
<details class="section-details-title" open="open"
|
|
|
|
title="{{ 'Expand if you want to access more options.' | trans }}">
|
|
|
|
<summary class="details-summary-title">
|
|
|
|
<span>
|
|
|
|
{{ "Create a note" | trans }}
|
|
|
|
</span>
|
|
|
|
</summary>
|
2021-12-02 05:13:24 +09:00
|
|
|
|
2022-02-08 05:25:37 +09:00
|
|
|
{% import _self as forms %}
|
|
|
|
{{ forms.posting(widget) }}
|
|
|
|
</details>
|
|
|
|
</section>
|
|
|
|
{% endmacro %}
|
2022-01-26 04:17:40 +09:00
|
|
|
|
2022-02-08 05:25:37 +09:00
|
|
|
{% macro posting_section_reply(widget, extra) %}
|
|
|
|
<section class="frame-section" title="{{ 'Create a new note.' | trans }}">
|
|
|
|
<details class="section-details-title" open="open"
|
|
|
|
title="{{ 'Expand if you want to access more options.' | trans }}">
|
|
|
|
<summary class="details-summary-title">
|
|
|
|
<span>
|
|
|
|
{{ "Reply to note" | trans }}
|
|
|
|
</span>
|
|
|
|
</summary>
|
2021-12-08 00:33:02 +09:00
|
|
|
|
2022-02-08 05:25:37 +09:00
|
|
|
{% for block in extra %}
|
2022-02-17 06:17:13 +09:00
|
|
|
<section class="posting-extra">
|
2022-02-08 05:25:37 +09:00
|
|
|
{{ block | raw }}
|
|
|
|
</section>
|
|
|
|
{% endfor %}
|
2021-12-02 05:13:24 +09:00
|
|
|
|
2022-02-08 05:25:37 +09:00
|
|
|
{% import _self as forms %}
|
|
|
|
{{ forms.posting(widget) }}
|
|
|
|
</details>
|
2022-01-20 08:54:45 +09:00
|
|
|
</section>
|
2022-02-08 05:25:37 +09: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"
|
|
|
|
title="{{ 'Press tab followed by a space to access right panel' | trans }}"></a>
|
|
|
|
<input type="checkbox" id="toggle-panel-right" tabindex="0" title="{{ 'Open right panel' | trans }}"
|
|
|
|
{% 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-02 05:13:24 +09:00
|
|
|
{% endblock rightpanel %}
|