mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
admin: refine social work admin form
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<th>{{ 'Title'|trans }}</th>
|
||||
<th>{{ 'evaluation.delay'|trans }}</th>
|
||||
<th>{{ 'evaluation.notificationDelay'|trans }}</th>
|
||||
<th> </th>
|
||||
{% endblock %}
|
||||
|
||||
@@ -13,6 +15,32 @@
|
||||
<tr>
|
||||
<td>{{ entity.id }}</td>
|
||||
<td>{{ entity.title|localize_translatable_string }}</td>
|
||||
<td>
|
||||
{% if entity.delay is not null %}
|
||||
{% if entity.delay.d > 0 %}
|
||||
{{ entity.delay.d }} {{'days'|trans}}
|
||||
{% endif %}
|
||||
{% if entity.delay.m > 0 %}
|
||||
{{ entity.delay.m }} {{'months'|trans}}
|
||||
{% endif %}
|
||||
{% if entity.delay.y > 0 %}
|
||||
{{ entity.delay.y }} {{'years'|trans}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if entity.notificationDelay is not null %}
|
||||
{% if entity.notificationDelay.d > 0 %}
|
||||
{{ entity.notificationDelay.d }} {{'days'|trans}}
|
||||
{% endif %}
|
||||
{% if entity.notificationDelay.m > 0 %}
|
||||
{{ entity.notificationDelay.m }} {{'months'|trans}}
|
||||
{% endif %}
|
||||
{% if entity.notificationDelay.y > 0 %}
|
||||
{{ entity.notificationDelay.y }} {{'years'|trans}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
|
@@ -5,6 +5,8 @@
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<th>{{ 'Title'|trans }}</th>
|
||||
<th>{{ 'Social actions'|trans }}</th>
|
||||
<th>{{ 'goal.desactivationDate'|trans }}</th>
|
||||
<th> </th>
|
||||
{% endblock %}
|
||||
|
||||
@@ -13,6 +15,16 @@
|
||||
<tr>
|
||||
<td>{{ entity.id }}</td>
|
||||
<td>{{ entity.title|localize_translatable_string }}</td>
|
||||
<td>
|
||||
{% for sa in entity.socialActions %}
|
||||
{{ sa.title|localize_translatable_string }}{% if not loop.last %},{% else %}.{% endif %}
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
{% if entity.desactivationDate is not null %}
|
||||
{{ entity.desactivationDate|date('Y-m-d') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
|
@@ -0,0 +1,22 @@
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block admin_content %}
|
||||
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
||||
|
||||
{% block crud_content_form_rows %}
|
||||
{% for f in form %}
|
||||
{% if f.vars.name == 'parent' %}
|
||||
{{ form_row(f, { 'attr':{'disabled':'disabled'}}) }}
|
||||
{% else %}
|
||||
{{ form_row(f) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock crud_content_form_rows %}
|
||||
|
||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||
{% endembed %}
|
||||
{% endblock admin_content %}
|
@@ -5,6 +5,9 @@
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<th>{{ 'Title'|trans }}</th>
|
||||
<th>{{ 'Parent'|trans }}</th>
|
||||
<th>{{ 'goal.desactivationDate'|trans }}</th>
|
||||
<th>{{ 'socialAction.defaultNotificationDelay'|trans }}</th>
|
||||
<th> </th>
|
||||
{% endblock %}
|
||||
|
||||
@@ -13,6 +16,29 @@
|
||||
<tr>
|
||||
<td>{{ entity.id }}</td>
|
||||
<td>{{ entity.title|localize_translatable_string }}</td>
|
||||
<td>
|
||||
{% if entity.parent is not null %}
|
||||
{{ entity.parent.title|localize_translatable_string }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if entity.desactivationDate is not null %}
|
||||
{{ entity.desactivationDate|date('Y-m-d') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if entity.defaultNotificationDelay is not null %}
|
||||
{% if entity.defaultNotificationDelay.d > 0 %}
|
||||
{{ entity.defaultNotificationDelay.d }} {{'days'|trans}}
|
||||
{% endif %}
|
||||
{% if entity.defaultNotificationDelay.m > 0 %}
|
||||
{{ entity.defaultNotificationDelay.m }} {{'months'|trans}}
|
||||
{% endif %}
|
||||
{% if entity.defaultNotificationDelay.y > 0 %}
|
||||
{{ entity.defaultNotificationDelay.y }} {{'years'|trans}}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
|
@@ -0,0 +1,22 @@
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block admin_content %}
|
||||
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
||||
|
||||
{% block crud_content_form_rows %}
|
||||
{% for f in form %}
|
||||
{% if f.vars.name == 'parent' %}
|
||||
{{ form_row(f, { 'attr':{'disabled':'disabled'}}) }}
|
||||
{% else %}
|
||||
{{ form_row(f) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock crud_content_form_rows %}
|
||||
|
||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||
{% endembed %}
|
||||
{% endblock admin_content %}
|
@@ -5,6 +5,8 @@
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<th>{{ 'Title'|trans }}</th>
|
||||
<th>{{ 'Parent'|trans }}</th>
|
||||
<th>{{ 'goal.desactivationDate'|trans }}</th>
|
||||
<th> </th>
|
||||
{% endblock %}
|
||||
|
||||
@@ -13,6 +15,16 @@
|
||||
<tr>
|
||||
<td>{{ entity.id }}</td>
|
||||
<td>{{ entity.title|localize_translatable_string }}</td>
|
||||
<td>
|
||||
{% if entity.parent is not null %}
|
||||
{{ entity.parent.title|localize_translatable_string }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if entity.desactivationDate is not null %}
|
||||
{{ entity.desactivationDate|date('Y-m-d') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
|
Reference in New Issue
Block a user