replace comment by commentEmbeddable

This commit is contained in:
2021-06-15 10:17:53 +02:00
parent f827e50431
commit efdfd10e49
6 changed files with 132 additions and 30 deletions

View File

@@ -5,18 +5,58 @@
{% block content %}
<h1>{{ block('title') }}</h1>
{% if household.commentMembers is not empty %}
<blockquote class="chill-user-quote">
{{ household.commentMembers|chill_markdown_to_html }}
</blockquote>
{% endif %}
{% if form is not null %}
{{ form_start(form) }}
{% if household.waitingForBirth %}
{% if household.waitingForBirthDate is not null %}
{{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }}
{% else %}
{{ 'household.Expecting for birth'|trans }}
{{ form_row(form.commentMembers) }}
<div id="waitingForBirthContainer">
{{ form_row(form.waitingForBirth) }}
</div>
<div id="waitingForBirthDateContainer">
{{ form_row(form.waitingForBirthDate) }}
</div>
<ul class="record_actions">
<li>
<button type="submit" class="sc-button bt-save">
{{ 'Save'|trans }}
</button>
</li>
</ul>
{{ form_end(form) }}
{% else %}
{% if not household.commentMembers.isEmpty() %}
{{ household.commentMembers|chill_entity_render_box }}
{% endif %}
{% if household.waitingForBirth %}
{% if household.waitingForBirthDate is not null %}
{{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }}
{% else %}
{{ 'household.Expecting for birth'|trans }}
{% endif %}
{% else %}
<p class="chill-no-data-statement">
{{ 'household.Any expecting birth'|trans }}
</p>
{% endif %}
<ul class="record_actions">
<li>
<a
href="{{ chill_path_add_return_path('chill_person_household_members', { 'household_id': household.id, 'edit': 1 }) }}"
class="sc-button bt-edit"
>
{{ 'household.Comment and expecting birth'|trans }}
</a>
</li>
</ul>
{% endif %}
{% for p in positions %}
@@ -153,14 +193,6 @@
{% endfor %}
<ul class="record_actions sticky-form-buttons">
<li>
<a
href="{{ chill_path_add_return_path('chill_person_household_members_metadata_edit', { 'household_id': household.id }) }}"
class="sc-button bt-edit"
>
{{ 'household.Edit member metadata'|trans }}
</a>
</li>
<li>
<a
href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}"
@@ -171,3 +203,7 @@
</ul>
{% endblock %}
{% block js %}
{{ encore_entry_script_tags('household_edit_metadata') }}
{% endblock %}