Commit 0be89805 by Damien Moulard

Merge branch '7279-affiche-username-mail-dans-tous-les-exports' into 'develop'

show email instead of username

See merge request !120
parents 4b21ca29 da6880a9
......@@ -184,8 +184,10 @@ class DonAdmin extends AbstractAdmin
public function getExportFields()
{
$ssaFriendlyTypeNames = $this->getConfigurationPool()->getContainer()->getParameter('tav_env')
&& $this->getConfigurationPool()->getContainer()->getParameter('ssa_friendly_flux_type_names');
return [
'Id' => 'expediteur',
'Id' => $ssaFriendlyTypeNames ? 'expediteur.email' : 'expediteur',
'Groupe' => 'expediteur.groupe.name',
'Type' => 'type',
'Montant' => 'montant',
......
......@@ -64,6 +64,7 @@ class FluxAdmin extends AbstractAdmin
$collection->clearExcept(['list', 'export']);
}
//Where is this method used ?
protected function configureExportFields(): array
{
$ssaFriendlyTypeNames = $this->getConfigurationPool()->getContainer()->getParameter('tav_env')
......@@ -104,7 +105,7 @@ class FluxAdmin extends AbstractAdmin
->add('montant', 'decimal', ['label' => 'Montant', 'attributes' => ['fraction_digits' => 2]])
->add('expediteur', null, ['label' => 'Expediteur'])
->add('destinataire', null, ['label' => 'Destinataire'])
->add('operateur', null, ['label' => 'Operateur'])
->add($ssaFriendlyTypeNames ? 'operateur.email' : 'operateur', null, ['label' => 'Operateur'])
->addIdentifier('reference', null, ['label' => 'Reference'])
// @TODO : ajouter le verify uniquement si l'on souhaite (param url)=> sinon c'est beaucoup trop long...
// ->addIdentifier('verify', null, array('label' => 'Vérifié'))
......@@ -245,7 +246,7 @@ class FluxAdmin extends AbstractAdmin
'Montant' => 'montant',
'Expediteur' => 'expediteur',
'Destinataire' => 'destinataire',
'Operateur' => 'operateur',
'Operateur' => $ssaFriendlyTypeNames ? 'operateur.email' : 'operateur',
'Moyen' => 'moyen',
'Reference' => 'reference',
];
......
......@@ -3,7 +3,7 @@
<div>
{% if object is instanceof("App\\Entity\\DonAdherent") or (object is instanceof("App\\Entity\\Don") and object.type == 'don_adherent' ) %}
<a class="sonata-link-identifier" href="{{ path('adherent_edit', {'id': object.expediteur.id}) }}">
{{ 'Adhérent'|trans }} : {{ object.expediteur.name }}
{{ 'Adhérent'|trans }} : {% if tav_env and ssa_friendly_flux_type_names %}{{ object.expediteur.email }}{% else %}{{ object.expediteur.name }}{% endif %}
</a>
{% elseif object is instanceof("App\\Entity\\DonPrestataire") or (object is instanceof("App\\Entity\\Don") and object.type == 'don_prestataire' ) %}
<a class="sonata-link-identifier" href="{{ path('prestataire_edit', {'id': object.expediteur.id}) }}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment