mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
adapt Thirdparty form and templates
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
<th class="chill-pink">{{ 'Address'|trans }}
|
||||
<i class="fa fa-fw fa-sort"></i>
|
||||
</th>
|
||||
<th class="chill-pink">{{ 'thirdparty.UpdatedAt.short'|trans }}
|
||||
<i class="fa fa-fw fa-sort"></i>
|
||||
</th>
|
||||
<th class="chill-pink"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -56,6 +59,13 @@
|
||||
<td>
|
||||
{{ tp.address|chill_entity_render_box({'multiline': false, 'with_valid_from': false}) }}
|
||||
</td>
|
||||
<td>
|
||||
{% if tp.updatedAt != null %}
|
||||
{{ tp.updatedAt|format_date('short') }}
|
||||
{% else %}
|
||||
{{ tp.createdAt|format_date('short') }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}
|
||||
|
@@ -10,22 +10,42 @@
|
||||
<h1>{{ 'Create third party'|trans }}</h1>
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
{% if thirdParty.isLeaf == true %}
|
||||
{{ form_row(form.civility) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.name) }}
|
||||
|
||||
{% if thirdParty.isLeaf == false %}
|
||||
{{ form_row(form.nameCompany) }}
|
||||
{{ form_row(form.acronym) }}
|
||||
{% endif %}
|
||||
|
||||
{% if thirdParty.isLeaf == true %}
|
||||
{{ form_row(form.profession) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.categories) }}
|
||||
{{ form_row(form.type) }}
|
||||
|
||||
{{ form_row(form.telephone) }}
|
||||
{{ form_row(form.email) }}
|
||||
{{ form_row(form.address) }}
|
||||
|
||||
{{ form_row(form.active) }}
|
||||
{{ form_row(form.centers) }}
|
||||
{{ form_row(form.comment) }}
|
||||
{{ form_row(form.centers) }}
|
||||
|
||||
{{ form_row(form.active) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ chill_return_path_or('chill_3party_3party_index') }}" class="btn btn-cancel">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, {'label': 'Create', 'attr': {'class': 'btn btn-new' }}) }}
|
||||
|
@@ -20,24 +20,63 @@
|
||||
</h1>
|
||||
|
||||
<dl class="chill_view_data">
|
||||
|
||||
<dt>{{ 'Name'|trans }}</dt>
|
||||
<dd>{{ thirdParty.name }}</dd>
|
||||
<dd>
|
||||
{% if thirdParty.isLeaf == true %}{{ thirdParty.civility }}{% endif %}
|
||||
{{ thirdParty.name }}
|
||||
</dd>
|
||||
|
||||
{% if thirdParty.isLeaf == false %}
|
||||
<dt>{{ 'thirdparty.NameCompany'|trans }}</dt>
|
||||
<dd>
|
||||
{% if thirdParty.nameCompany == null %}
|
||||
<span class="chill-no-data-statement">{{ 'No nameCompany given'|trans }}</span>
|
||||
{% else %}
|
||||
{{ thirdParty.nameCompany }}
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>{{ 'thirdparty.Acronym'|trans }}</dt>
|
||||
<dd>
|
||||
{% if thirdParty.acronym == null %}
|
||||
<span class="chill-no-data-statement">{{ 'No acronym given'|trans }}</span>
|
||||
{% else %}
|
||||
{{ thirdParty.acronym }}
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>{{ 'Type'|trans }}</dt>
|
||||
{% set types = [] %}
|
||||
{% for t in thirdParty.type %}
|
||||
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
||||
{% endfor %}
|
||||
<dd>{{ types|join(', ') }}</dd>
|
||||
|
||||
<dt>{{ 'Centers'|trans }}</dt>
|
||||
<dd>{{ 'The party is visible in those centers'|trans }} : {{ thirdParty.centers|join(', ') }}</dd>
|
||||
<dd>
|
||||
{{ types|join(', ') }}
|
||||
</dd>
|
||||
|
||||
<dt>{{ 'Phonenumber'|trans }}</dt>
|
||||
<dd>{{ thirdParty.telephone|chill_print_or_message("thirdparty.No_phonenumber") }}</dd>
|
||||
<dd>
|
||||
{% if thirdParty.telephone == null %}
|
||||
<span class="chill-no-data-statement">{{ 'No phone given'|trans }}</span>
|
||||
{% else %}
|
||||
<a href="{{ 'tel:' ~ thirdParty.telephone }}">
|
||||
{{ thirdParty.telephone|chill_print_or_message("thirdparty.No_phonenumber") }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>{{ 'email'|trans }}<dt>
|
||||
<dd>{{ thirdParty.email|chill_print_or_message("thirdparty.No_email") }}</dd>
|
||||
<dd>
|
||||
{% if thirdParty.email == null %}
|
||||
<span class="chill-no-data-statement">{{ 'No email given'|trans }}</span>
|
||||
{% else %}
|
||||
<a href="{{ 'mailto:' ~ thirdParty.email }}">
|
||||
{{ thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>{{ 'Address'|trans }}</dt>
|
||||
<dd>
|
||||
@@ -57,6 +96,9 @@
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>{{ 'Centers'|trans }}</dt>
|
||||
<dd>{{ 'The party is visible in those centers'|trans }} : {{ thirdParty.centers|join(', ') }}</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
|
@@ -15,24 +15,55 @@
|
||||
</span>
|
||||
</h1>
|
||||
|
||||
<div class="date-by">
|
||||
{% if thirdParty.updatedAt != null %}
|
||||
{{ 'thirdparty.UpdatedAt.short'|trans ~ thirdParty.updatedAt|format_date('short') }}
|
||||
{% else %}
|
||||
{{ 'thirdparty.CreatedAt.short'|trans ~ thirdParty.createdAt|format_date('short') }}
|
||||
{% endif %}
|
||||
{% if thirdParty.updatedBy != null %}
|
||||
{{ 'thirdparty.UpdateBy.short'|trans ~ thirdParty.updatedBy.usernameCanonical }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
{% if thirdParty.isLeaf == true %}
|
||||
{{ form_row(form.civility) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.name) }}
|
||||
|
||||
{% if thirdParty.isLeaf == false %}
|
||||
{{ form_row(form.nameCompany) }}
|
||||
{{ form_row(form.acronym) }}
|
||||
{% endif %}
|
||||
|
||||
{% if thirdParty.isLeaf == true %}
|
||||
{{ form_row(form.profession) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.categories) }}
|
||||
{{ form_row(form.type) }}
|
||||
|
||||
{{ form_row(form.telephone) }}
|
||||
{{ form_row(form.email) }}
|
||||
{{ form_row(form.address) }}
|
||||
|
||||
{{ form_row(form.active) }}
|
||||
{{ form_row(form.centers) }}
|
||||
{{ form_row(form.comment) }}
|
||||
{{ form_row(form.centers) }}
|
||||
|
||||
{{ form_row(form.active) }}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a class="btn btn-cancel" href="{{ chill_path_forward_return_path('chill_3party_3party_index') }}">
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, {'label': 'Update', 'attr': {'class': 'btn btn-update' }}) }}
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user