mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Merge branch 'address_refactoring' into add-location-period
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<div id="address"></div>{# <== vue_address component #}
|
||||
|
||||
<script type="text/javascript">
|
||||
window.vueRootComponent = 'app';
|
||||
window.mode = '{{ mode|e('js') }}';
|
||||
window.personId = {{ person.id|e('js') }};
|
||||
window.addressId = {{ address_id|e('js') }};
|
||||
{% if backUrl is defined %}
|
||||
window.backUrl = '{{ backUrl|e('js') }}';
|
||||
{% else %}
|
||||
window.backUrl = '{{ path('chill_person_address_list', { 'person_id': person.id })|e('js') }}';
|
||||
{% endif %}
|
||||
|
||||
{% if modalTitle is defined %}
|
||||
window.modalTitle = '{{ modalTitle|trans|e('js') }}';
|
||||
{% endif %}
|
||||
window.button = {};
|
||||
{% if buttonText is defined %}
|
||||
window.buttonText = '{{ buttonText|trans|e('js') }}';
|
||||
{% endif %}
|
||||
{% if buttonType is defined %}
|
||||
window.button.type = '{{ buttonType|e('js') }}';
|
||||
{% endif %}
|
||||
{% if buttonSize is defined %}
|
||||
window.button.size = '{{ buttonSize|e('js') }}';
|
||||
{% endif %}
|
||||
{% if buttonDisplay is defined and buttonDisplay == false %}
|
||||
window.button.display = false;
|
||||
{% endif %}
|
||||
{% if binModalStep1 is defined and binModalStep1 == false %}
|
||||
window.binModalStep1 = false;
|
||||
{% endif %}
|
||||
{% if binModalStep2 is defined and binModalStep2 == false %}
|
||||
window.binModalStep2 = false;
|
||||
{% endif %}
|
||||
</script>
|
||||
|
||||
{{ encore_entry_script_tags('vue_address') }}
|
||||
{{ encore_entry_link_tags('vue_address') }}
|
@@ -25,22 +25,15 @@
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div id="address"></div>
|
||||
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
address_id: person.lastAddress.id,
|
||||
mode: 'edit',
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
} %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('vue_address') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.personId = {{ person.id|e('js') }};
|
||||
window.addressId = {{ address.id|e('js') }};
|
||||
window.mode = 'edit';
|
||||
window.vueRootComponent = 'app';
|
||||
</script>
|
||||
{{ encore_entry_script_tags('vue_address') }}
|
||||
{% endblock %}
|
||||
|
@@ -27,10 +27,16 @@
|
||||
|
||||
<ul class="record_actions my-3">
|
||||
<li style="margin: auto;">
|
||||
<a class="btn btn-lg btn-create"
|
||||
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
|
||||
{{ 'Add an address'|trans }}
|
||||
</a>
|
||||
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
address_id: person.lastAddress.id,
|
||||
mode: 'new',
|
||||
buttonSize: 'btn-lg',
|
||||
buttonText: 'Add an address',
|
||||
modalTitle: 'Add an address',
|
||||
} %}
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -58,10 +64,16 @@
|
||||
{% set row = row + 1 %}
|
||||
{% if address.validTo is not empty and address.validTo < previousRowFrom %}
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-a action">
|
||||
|
||||
{# include vue_address component #}
|
||||
<a href="" class="btn btn-sm btn-create">{{ 'Insert an address'|trans }}</a></div>
|
||||
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-b"></div>
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-c action">
|
||||
|
||||
{# include vue_address component #}
|
||||
<a href="" class="btn btn-sm btn-create">{{ 'Insert an address'|trans }}</a></div>
|
||||
|
||||
<div class="date">
|
||||
{% if address.validTo is not empty %}
|
||||
{{ address.validTo|format_date('short') }}
|
||||
@@ -81,7 +93,10 @@
|
||||
'has_no_address': true
|
||||
}) }}
|
||||
<ul class="record_actions">
|
||||
|
||||
{# include vue_address component #}
|
||||
<li><a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : address.id } ) }}" class="btn btn-edit"></a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
{# endif #}
|
||||
@@ -130,6 +145,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{# include vue_address component #}
|
||||
<a class="btn btn-create"
|
||||
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
|
||||
{{ 'Add an address'|trans }}
|
||||
|
@@ -25,21 +25,16 @@
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div id="address"></div>
|
||||
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
address_id: person.lastAddress.id,
|
||||
mode: 'new',
|
||||
binModalStep1: false,
|
||||
binModalStep2: false,
|
||||
} %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
{{ encore_entry_link_tags('vue_address') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
<script type="text/javascript">
|
||||
window.personId = {{ person.id|e('js') }};
|
||||
window.mode = 'new';
|
||||
window.vueRootComponent = 'app';
|
||||
</script>
|
||||
{{ encore_entry_script_tags('vue_address') }}
|
||||
{% endblock %}
|
||||
|
@@ -200,10 +200,17 @@ This view should receive those arguments:
|
||||
|
||||
<ul class="list-inline text-right mt-2">
|
||||
<li class="list-inline-item">
|
||||
<a class="btn btn-warning btn-sm" title="{{ 'Edit'|trans }}"
|
||||
href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : person.lastAddress.id } ) }}">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
</a>
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillPerson/Address/_insert_vue_address.html.twig' with {
|
||||
address_id: person.lastAddress.id,
|
||||
backUrl: path('chill_person_view', { 'person_id': person.id }),
|
||||
mode: 'edit',
|
||||
modalTitle: 'Edit address',
|
||||
buttonText: 'Edit address',
|
||||
buttonType: 'btn-update',
|
||||
buttonSize: 'btn-sm',
|
||||
buttonDisplay: false
|
||||
} %}
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a class="btn btn-secondary btn-sm" title="{{ "Addresses history"|trans }}"
|
||||
|
@@ -208,6 +208,7 @@ The address has been successfully updated: L'adresse a été mise à jour avec s
|
||||
Update address for %name%: Mettre à jour une adresse pour %name%
|
||||
Modify address for %name%: Modifier une adresse pour %name%
|
||||
Edit an address: Modifier une adresse
|
||||
Edit address: Modifier l'adresse
|
||||
Addresses history for %name%: Historique des adresses de %name%
|
||||
Addresses history: Historique des adresses
|
||||
New address : Nouvelle adresse
|
||||
|
Reference in New Issue
Block a user