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
6
Merge Requests
6
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
da6880a9
Commit
da6880a9
authored
Jan 13, 2025
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use env variables + do it for dons as well
parent
720161aa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
DonAdmin.php
src/Admin/DonAdmin.php
+3
-1
FluxAdmin.php
src/Admin/FluxAdmin.php
+2
-2
don_obj.html.twig
...kohinos/bundles/SonataAdminBundle/Block/don_obj.html.twig
+1
-1
No files found.
src/Admin/DonAdmin.php
View file @
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'
,
...
...
src/Admin/FluxAdmin.php
View file @
da6880a9
...
...
@@ -105,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.email
'
,
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é'))
...
...
@@ -246,7 +246,7 @@ class FluxAdmin extends AbstractAdmin
'Montant'
=>
'montant'
,
'Expediteur'
=>
'expediteur'
,
'Destinataire'
=>
'destinataire'
,
'Operateur'
=>
'operateur.email
'
,
'Operateur'
=>
$ssaFriendlyTypeNames
?
'operateur.email'
:
'operateur
'
,
'Moyen'
=>
'moyen'
,
'Reference'
=>
'reference'
,
];
...
...
templates/themes/kohinos/bundles/SonataAdminBundle/Block/don_obj.html.twig
View file @
da6880a9
...
...
@@ -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