Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
0be89805
Commit
0be89805
authored
Jan 30, 2025
by
Damien Moulard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '7279-affiche-username-mail-dans-tous-les-exports' into 'develop'
show email instead of username See merge request
!120
parents
4b21ca29
da6880a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
DonAdmin.php
src/Admin/DonAdmin.php
+3
-1
FluxAdmin.php
src/Admin/FluxAdmin.php
+3
-2
don_obj.html.twig
...kohinos/bundles/SonataAdminBundle/Block/don_obj.html.twig
+1
-1
No files found.
src/Admin/DonAdmin.php
View file @
0be89805
...
...
@@ -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'
,
...
...
src/Admin/FluxAdmin.php
View file @
0be89805
...
...
@@ -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'
,
];
...
...
templates/themes/kohinos/bundles/SonataAdminBundle/Block/don_obj.html.twig
View file @
0be89805
...
...
@@ -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
}
)
}}
"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment