Add CommentEmbeddable to Activity : remoke remark field (Ref #21)

This commit is contained in:
Jean-Francois Monfort
2021-03-11 14:27:46 +01:00
parent cde3c900df
commit f35cb679b7
14 changed files with 240 additions and 210 deletions

View File

@@ -32,10 +32,9 @@
{{ form_row(edit_form.date) }}
{{ form_row(edit_form.durationTime) }}
{{ form_row(edit_form.type) }}
{{ form_row(edit_form.remark) }}
{{ form_row(edit_form.attendee) }}
{{ form_row(edit_form.reasons) }}
{{ form_row(form.comment) }}
{{ form_row(edit_form.comment) }}
{{ form_widget(edit_form) }}
<ul class="record_actions sticky-form-buttons">

View File

@@ -1,16 +1,16 @@
{#
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
@@ -22,10 +22,10 @@
{% block personcontent %}
<h2>{{ 'Activity list' |trans }}</h2>
{% if activities|length == 0 %}
<p class="chill-no-data-statement">
{{ "There isn't any activities."|trans }}
{{ "There isn't any activities."|trans }}
<a href="{{ path('chill_activity_activity_new', {'person_id': person.id}) }}" class="sc-button bt-create button-small"></a>
</p>
{% else %}
@@ -45,9 +45,9 @@
<td>{% if activity.date %}{{ activity.date|format_date('long') }}{% endif %}</td>
<td>{{ activity.durationTime|date('H:i') }}</td>
<td>
{% if activity.remark is not empty %}
{% if activity.comment.comment is not empty %}
<blockquote class="chill-user-quote">
{{ activity.remark|slice(0, 250) }} {#
{{ activity.comment.comment|slice(0, 250) }} {#
sf4 check: if 'slice' could replace 'truncate' filter ?
truncate come with twig-extensions, in conflict with twig 3
#}
@@ -81,7 +81,7 @@
</tbody>
</table>
{% endif %}
<ul class="record_actions">
<li>
<a href="{{ path('chill_activity_activity_new', {'person_id': person.id}) }}" class="sc-button bt-create">

View File

@@ -33,7 +33,6 @@
{{ form_row(form.date) }}
{{ form_row(form.durationTime) }}
{{ form_row(form.type) }}
{{ form_row(form.remark) }}
{{ form_row(form.attendee) }}
{{ form_row(form.reasons) }}
{{ form_row(form.comment) }}

View File

@@ -25,8 +25,6 @@
<dd>{{ entity.durationTime|date('H:i') }}</dd>
<dt class="inline">{{ 'Type'|trans }}</dt>
<dd>{{ entity.type.name | localize_translatable_string }}</dd>
<dt class="inline">{{ 'Remark'|trans }}</dt>
<dd>{% if entity.remark is empty %}<span class="chill-no-data-statement">{{ 'No remarks'|trans }}</span>{% else %}<blockquote class="chill-user-quote">{{ entity.remark|nl2br }}</blockquote>{% endif %}</dd>
<dt class="inline">{{ 'Attendee'|trans }}</dt>
<dd>{% if entity.attendee is not null %}{% if entity.attendee %}{{ 'present'|trans|capitalize }} {% else %} {{ 'not present'|trans|capitalize }}{% endif %}{% else %}{{ 'None'|trans|capitalize }}{% endif %}</dd>