Commit bc174dd5 by Julien Jorry

Add transfert manquant + translation + debugs

parent 87c82434
...@@ -45,8 +45,8 @@ sonata_admin: ...@@ -45,8 +45,8 @@ sonata_admin:
assets: assets:
stylesheets: stylesheets:
# The default stylesheet list: # The default stylesheet list:
# - build/app.css
- bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css - bundles/sonatacore/vendor/bootstrap/dist/css/bootstrap.min.css
# - bundles/sonatacore/vendor/components-font-awesome/css/font-awesome.min.css
- fontawesome/css/fontawesome.min.css - fontawesome/css/fontawesome.min.css
- fontawesome/css/solid.css - fontawesome/css/solid.css
- fontawesome/css/brands.css - fontawesome/css/brands.css
......
...@@ -98,7 +98,7 @@ class FluxAdmin extends AbstractAdmin ...@@ -98,7 +98,7 @@ class FluxAdmin extends AbstractAdmin
public function getTotalLabel() public function getTotalLabel()
{ {
return $this->translator->trans('Total :'); return $this->translator->trans('Total des flux :');
} }
public function getTotal() public function getTotal()
...@@ -106,27 +106,15 @@ class FluxAdmin extends AbstractAdmin ...@@ -106,27 +106,15 @@ class FluxAdmin extends AbstractAdmin
$datagrid = $this->getDatagrid(); $datagrid = $this->getDatagrid();
$datagrid->buildPager(); $datagrid->buildPager();
$query2 = clone $datagrid->getQuery();
$query2
->select('SUM( ' . $query2->getRootAlias() . '.montant) as total')
->setFirstResult(null)
->setMaxResults(null);
$result2 = $query2->execute(array(), \Doctrine\ORM\Query::HYDRATE_SINGLE_SCALAR);
$query = clone $datagrid->getQuery(); $query = clone $datagrid->getQuery();
$query $query
->select('SUM( ' . $query->getRootAlias() . '.montant) as total') ->select('SUM( ' . $query->getRootAlias() . '.montant) as total')
->andWhere($query->getRootAlias().".parenttype = :type")
->setParameter('type', 'transaction')
->setFirstResult(null) ->setFirstResult(null)
->setMaxResults(null); ->setMaxResults(null);
$result = $query->execute(array(), \Doctrine\ORM\Query::HYDRATE_SINGLE_SCALAR); $result = $query->execute(array(), \Doctrine\ORM\Query::HYDRATE_SINGLE_SCALAR);
return $result2.' (Transactions: '.$result.')'; return $result;
} }
/** /**
......
...@@ -74,7 +74,7 @@ class GroupeprestataireAdmin extends AbstractAdmin ...@@ -74,7 +74,7 @@ class GroupeprestataireAdmin extends AbstractAdmin
protected function configureFormFields(FormMapper $formMapper) protected function configureFormFields(FormMapper $formMapper)
{ {
$user = $this->security->getUser(); $user = $this->security->getUser();
$prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true)); $prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true), array('raison'=> 'ASC'));
$groupepresta = $this->getSubject(); $groupepresta = $this->getSubject();
if ($this->isCurrentRoute('create') && $user->getGroupesgere() != null) { if ($this->isCurrentRoute('create') && $user->getGroupesgere() != null) {
$groupepresta->setGroupe($user->getGroupesgere()); $groupepresta->setGroupe($user->getGroupesgere());
...@@ -94,7 +94,7 @@ class GroupeprestataireAdmin extends AbstractAdmin ...@@ -94,7 +94,7 @@ class GroupeprestataireAdmin extends AbstractAdmin
)) ))
; ;
if (($user->isGranted('ROLE_GESTION_GROUPE') || $user->isGranted('ROLE_CONTACT')) && $this->security->getUser()->getGroupesgere() != null) { if (($user->isGranted('ROLE_GESTION_GROUPE') || $user->isGranted('ROLE_CONTACT')) && $this->security->getUser()->getGroupesgere() != null) {
$prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true, 'groupe' => $this->security->getUser()->getGroupesgere())); $prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true, 'groupe' => $this->security->getUser()->getGroupesgere()), array('raison'=> 'ASC'));
} }
if ($user->isGranted('ROLE_SUPER_ADMIN') || $user->isGranted('ROLE_ADMIN_SIEGE')) { if ($user->isGranted('ROLE_SUPER_ADMIN') || $user->isGranted('ROLE_ADMIN_SIEGE')) {
$formMapper $formMapper
......
...@@ -48,9 +48,9 @@ class RubriqueAdmin extends AbstractAdmin ...@@ -48,9 +48,9 @@ class RubriqueAdmin extends AbstractAdmin
protected function configureFormFields(FormMapper $formMapper) protected function configureFormFields(FormMapper $formMapper)
{ {
$user = $this->security->getUser(); $user = $this->security->getUser();
$prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true)); $prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true), array('raison'=> 'ASC'));
// if (($user->isGranted('ROLE_GESTION_GROUPE') || $user->isGranted('ROLE_CONTACT')) && $this->security->getUser()->getGroupesgere() != null) { // if (($user->isGranted('ROLE_GESTION_GROUPE') || $user->isGranted('ROLE_CONTACT')) && $this->security->getUser()->getGroupesgere() != null) {
// $prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true, 'groupe' => $this->security->getUser()->getGroupesgere())); // $prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true, 'groupe' => $this->security->getUser()->getGroupesgere()), array('raison'=> 'ASC'));
// } // }
$groupe = $this->getSubject(); $groupe = $this->getSubject();
$formMapper $formMapper
......
...@@ -31,6 +31,29 @@ class TransactionAdmin extends FluxAdmin ...@@ -31,6 +31,29 @@ class TransactionAdmin extends FluxAdmin
return $query; return $query;
} }
public function getTotalLabel()
{
return $this->translator->trans('Total des transactions :');
}
public function getTotal()
{
$datagrid = $this->getDatagrid();
$datagrid->buildPager();
$query = clone $datagrid->getQuery();
$query
->select('SUM( ' . $query->getRootAlias() . '.montant) as total')
->andWhere($query->getRootAlias().".parenttype = :type")
->setParameter('type', 'transaction')
->setFirstResult(null)
->setMaxResults(null);
$result = $query->execute(array(), \Doctrine\ORM\Query::HYDRATE_SINGLE_SCALAR);
return $result;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -78,6 +78,29 @@ class TransfertAdmin extends FluxAdmin ...@@ -78,6 +78,29 @@ class TransfertAdmin extends FluxAdmin
return $query; return $query;
} }
public function getTotalLabel()
{
return $this->translator->trans('Total des transferts :');
}
public function getTotal()
{
$datagrid = $this->getDatagrid();
$datagrid->buildPager();
$query = clone $datagrid->getQuery();
$query
->select('SUM( ' . $query->getRootAlias() . '.montant) as total')
->andWhere($query->getRootAlias().".parenttype = :type")
->setParameter('type', 'transfert')
->setFirstResult(null)
->setMaxResults(null);
$result = $query->execute(array(), \Doctrine\ORM\Query::HYDRATE_SINGLE_SCALAR);
return $result;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
...@@ -38,7 +38,7 @@ class GroupePrestaController extends AbstractController ...@@ -38,7 +38,7 @@ class GroupePrestaController extends AbstractController
*/ */
public function listeGroupePrestaAction($type, Request $request) public function listeGroupePrestaAction($type, Request $request)
{ {
$groupe = $this->em->getRepository(Groupeprestataire::class)->findBy(array('type' => $type, 'enabled' => true)); $groupe = $this->em->getRepository(Groupeprestataire::class)->findBy(array('type' => $type, 'enabled' => true), array('name'=> 'ASC'));
return $this->render('groupepresta/liste.html.twig', array( return $this->render('groupepresta/liste.html.twig', array(
'groupes' => $groupes, 'groupes' => $groupes,
......
...@@ -7,12 +7,14 @@ use App\Entity\Cotisation; ...@@ -7,12 +7,14 @@ use App\Entity\Cotisation;
use App\Entity\Geoloc; use App\Entity\Geoloc;
use App\Entity\Groupe; use App\Entity\Groupe;
use App\Entity\TransactionAdherentPrestataire; use App\Entity\TransactionAdherentPrestataire;
use App\Entity\TransfertComptoirGroupe;
use App\Entity\TransfertGroupeComptoir; use App\Entity\TransfertGroupeComptoir;
use App\Entity\Usergroup; use App\Entity\Usergroup;
use App\Form\Type\AdherentInfosFormType; use App\Form\Type\AdherentInfosFormType;
use App\Form\Type\AdhererFormType; use App\Form\Type\AdhererFormType;
use App\Form\Type\GroupeInfosFormType; use App\Form\Type\GroupeInfosFormType;
use App\Form\Type\TransactionAdherentPrestataireFormType; use App\Form\Type\TransactionAdherentPrestataireFormType;
use App\Form\Type\TransfertComptoirGroupeFormType;
use App\Form\Type\TransfertGroupeComptoirFormType; use App\Form\Type\TransfertGroupeComptoirFormType;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use FOS\UserBundle\Model\UserManagerInterface; use FOS\UserBundle\Model\UserManagerInterface;
...@@ -55,7 +57,7 @@ class UserGestionnaireGroupeController extends FluxController ...@@ -55,7 +57,7 @@ class UserGestionnaireGroupeController extends FluxController
} }
/** /**
* @Route("/groupe/transfert/comptoir/", name="transfertGroupeComptoir") * @Route("/user/groupe/transfert/comptoir/", name="transfertGroupeComptoir")
* @IsGranted("ROLE_GESTION_GROUPE") * @IsGranted("ROLE_GESTION_GROUPE")
*/ */
public function transfertGroupeComptoirAction(Request $request) public function transfertGroupeComptoirAction(Request $request)
...@@ -71,4 +73,23 @@ class UserGestionnaireGroupeController extends FluxController ...@@ -71,4 +73,23 @@ class UserGestionnaireGroupeController extends FluxController
$this->translator->trans('Transfert à un comptoir') $this->translator->trans('Transfert à un comptoir')
); );
} }
/**
* @Route("/user/groupe/retour/comptoir/", name="transfertComptoirGroupe")
* @IsGranted("ROLE_GESTION_GROUPE")
*/
public function transfertComptoirGroupeAction(Request $request)
{
$entity = new TransfertComptoirGroupe();
$entity->setOperateur($this->getUser());
$form = $this->createForm(TransfertComptoirGroupeFormType::class, $entity);
return $this->manageFluxForm(
$request,
$form,
$this->getUser()->getGroupesgere()->getCompte(),
$this->translator->trans('Retour bien effectuée !'),
$this->translator->trans('Retour au groupe')
);
}
} }
...@@ -306,6 +306,6 @@ class Groupe ...@@ -306,6 +306,6 @@ class Groupe
public function __toString(): string public function __toString(): string
{ {
return (!empty($this->getName())?$this->getName():'Groupe'); return !empty($this->getName())?$this->getName():'Groupe';
} }
} }
<?php
namespace FOS\UserBundle;
/**
* Tous les évènements
*
* LOCO : Outil de gestion de Monnaie Locale Complémentaire
* @author Julien Jorry <julien.jorry@gmail.com>
*/
final class FOSUserEvents
{
/* FLUX */
const TRANSACTION_ADHERENT_ADHERENT = 'mlc.flux.transaction.adherent.adherent';
const TRANSACTION_ADHERENT_PRESTATAIRE = 'mlc.flux.transaction.adherent.prestataire';
const TRANSACTION_PRESTATAIRE_ADHERENT = 'mlc.flux.transaction.prestataire.adherent';
const TRANSACTION_PRESTATAIRE_PRESTATAIRE = 'mlc.flux.transaction.prestataire.prestataire';
const TRANSFERT_COMPTOIR_ADHERENT = 'mlc.flux.transfert.comptoir.adherent';
const TRANSFERT_COMPTOIR_PRESTATAIRE = 'mlc.flux.transfert.comptoir.prestataire';
const TRANSFERT_GROUPE_COMPTOIR = 'mlc.flux.transfert.groupe.comptoir';
const TRANSFERT_GROUPE_SIEGE = 'mlc.flux.transfert.groupe.siege';
const TRANSFERT_PRESTATAIRE_COMPTOIR = 'mlc.flux.transfert.prestataire.comptoir';
const TRANSFERT_PRESTATAIRE_SIEGE = 'mlc.flux.transfert.prestataire.siege';
const TRANSFERT_SIEGE_GROUPE = 'mlc.flux.transfert.siege.groupe';
const TRANSFERT_SIEGE_GROUPE = 'mlc.flux.transfert.siege.groupe';
}
\ No newline at end of file
...@@ -9,6 +9,7 @@ use App\Entity\TransactionComptoirGroupe; ...@@ -9,6 +9,7 @@ use App\Entity\TransactionComptoirGroupe;
use App\Entity\TransactionComptoirPrestataire; use App\Entity\TransactionComptoirPrestataire;
use App\Entity\TransactionPrestataireAdherent; use App\Entity\TransactionPrestataireAdherent;
use App\Entity\TransactionPrestatairePrestataire; use App\Entity\TransactionPrestatairePrestataire;
use App\Entity\TransfertComptoirGroupe;
use App\Entity\TransfertGroupeComptoir; use App\Entity\TransfertGroupeComptoir;
use App\Entity\TransfertGroupeSiege; use App\Entity\TransfertGroupeSiege;
use App\Entity\TransfertPrestataireComptoir; use App\Entity\TransfertPrestataireComptoir;
...@@ -26,6 +27,7 @@ use App\Form\Type\TransactionAdherentAdherentFormType; ...@@ -26,6 +27,7 @@ use App\Form\Type\TransactionAdherentAdherentFormType;
use App\Form\Type\TransactionAdherentPrestataireFormType; use App\Form\Type\TransactionAdherentPrestataireFormType;
use App\Form\Type\TransactionPrestataireAdherentFormType; use App\Form\Type\TransactionPrestataireAdherentFormType;
use App\Form\Type\TransactionPrestatairePrestataireFormType; use App\Form\Type\TransactionPrestatairePrestataireFormType;
use App\Form\Type\TransfertComptoirGroupeFormType;
use App\Form\Type\TransfertGroupeComptoirFormType; use App\Form\Type\TransfertGroupeComptoirFormType;
use App\Form\Type\TransfertGroupeSiegeFormType; use App\Form\Type\TransfertGroupeSiegeFormType;
use App\Form\Type\TransfertPrestataireComptoirFormType; use App\Form\Type\TransfertPrestataireComptoirFormType;
...@@ -208,6 +210,19 @@ class FormFactory ...@@ -208,6 +210,19 @@ class FormFactory
return $form->createView(); return $form->createView();
} }
public function getTransfertComptoirGroupeForm(User $user)
{
if (empty($user) || empty($user->getGroupesgere())) {
throw new \Exception("[FORM 12] Opération impossible !");
}
$entity = new TransfertComptoirGroupe();
$entity->setOperateur($user);
$entity->setDestinataire($user->getGroupesgere());
$form = $this->ff->create(TransfertComptoirGroupeFormType::class, $entity, array('action' => $this->router->generate('transfertComptoirGroupe')));
return $form->createView();
}
public function getTransfertGroupeComptoirForm(User $user) public function getTransfertGroupeComptoirForm(User $user)
{ {
if (empty($user) || empty($user->getGroupesgere())) { if (empty($user) || empty($user->getGroupesgere())) {
......
...@@ -27,48 +27,20 @@ class GroupePrestataireInscriptionFormType extends AbstractType ...@@ -27,48 +27,20 @@ class GroupePrestataireInscriptionFormType extends AbstractType
{ {
$presta = $options['data']; $presta = $options['data'];
$builder $builder
// ->add('groupeprestataires', CollectionType::class, array(
// 'label' => 'AMAP / Marchés',
// 'entry_type' => EntityType::class,
// 'entry_options' => array(
// 'class' => Groupeprestataire::class,
// 'choices' => $this->em->getRepository(Groupeprestataire::class)->findBy(array('enabled' => true)),
// 'choice_label' => 'name',
// 'placeholder' => 'Faites votre choix',
// 'required' => false,
// 'label' => false),
// 'by_reference' => false,
// 'allow_add' => true,
// 'allow_delete' => true
// ))
->add('groupeprestataires', CollectionType::class, array( ->add('groupeprestataires', CollectionType::class, array(
'label' => 'AMAP / Marchés', 'label' => 'AMAP / Marchés',
'entry_type' => EntityType::class, 'entry_type' => EntityType::class,
'entry_options' => array( 'entry_options' => array(
'class' => Groupeprestataire::class, 'class' => Groupeprestataire::class,
'choices' => $this->em->getRepository(Groupeprestataire::class)->findBy(array('enabled' => true)), 'choices' => $this->em->getRepository(Groupeprestataire::class)->findBy(array('enabled' => true), array('name'=> 'ASC')),
'choice_label' => 'name', 'choice_label' => 'name',
'placeholder' => 'groupe', 'placeholder' => 'groupe',
'required' => false, 'required' => false,
'label' => false), 'label' => false),
'by_reference' => false, 'by_reference' => false,
'allow_add' => true, 'allow_add' => true,
'allow_delete' => true, 'allow_delete' => true
// 'data' => $presta->getGroupeprestataires()
)) ))
// ->add('groupeprestataires', EntityType::class, array(
// 'label' => 'AMAP / Marchés',
// // 'entry_type' => EntityType::class,
// 'class' => Groupeprestataire::class,
// 'choices' => $this->em->getRepository(Groupeprestataire::class)->findBy(array('enabled' => true)),
// 'choice_label' => 'name',
// 'placeholder' => 'Faites votre choix',
// 'required' => false,
// 'expanded' => true,
// 'multiple' => true,
// // 'mapped' => false,
// // 'data' => $presta->getGroupeprestataires()
// ))
->add('save', SubmitType::class, ['label' => "Valider"]) ->add('save', SubmitType::class, ['label' => "Valider"])
; ;
} }
......
...@@ -83,7 +83,7 @@ class PrestataireInfosFormType extends AbstractType ...@@ -83,7 +83,7 @@ class PrestataireInfosFormType extends AbstractType
'entry_type' => EntityType::class, 'entry_type' => EntityType::class,
'entry_options' => array( 'entry_options' => array(
'class' => Rubrique::class, 'class' => Rubrique::class,
'choices' => $this->container->get('doctrine')->getRepository(Rubrique::class)->findByEnabled(true), 'choices' => $this->container->get('doctrine')->getRepository(Rubrique::class)->findBy(array('enabled' => true), array('name'=> 'ASC')),
'choice_label' => 'name', 'choice_label' => 'name',
'placeholder' => 'Rubrique', 'placeholder' => 'Rubrique',
'required' => false, 'required' => false,
......
...@@ -15,19 +15,19 @@ class TransfertComptoirGroupeFormType extends TransfertFormType ...@@ -15,19 +15,19 @@ class TransfertComptoirGroupeFormType extends TransfertFormType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('expediteur', HiddenType::class, array( ->add('expediteur', EntityType::class, array(
'data' => $this->security->getUser()->getComptoirsgere()->getId(), 'choices' => $this->em->getRepository(Comptoir::class)->findBy(array('enabled' => true, 'groupe' => $this->security->getUser()->getGroupesgere()), array('name'=> 'ASC')),
'class' => Comptoir::class,
'placeholder' => 'Comptoir',
'required' => true,
'label' => 'Comptoir :',
))
->add('destinataire', HiddenType::class, array(
'entity_class' => Groupe::class,
'data' => $this->security->getUser()->getGroupesgere()->getId(),
'data_class' => null, 'data_class' => null,
'entity_class' => Comptoir::class,
'em' => $this->em 'em' => $this->em
)) ))
->add('destinataire', EntityType::class, array(
'class' => Groupe::class,
'choices' => $this->em->getRepository(Groupe::class)->findBy(array('enabled' => true)),
'placeholder' => 'Groupe',
'required' => true,
'label' => 'Groupe :',
))
; ;
} }
......
...@@ -23,7 +23,7 @@ class TransfertComptoirPrestataireFormType extends TransfertFormType ...@@ -23,7 +23,7 @@ class TransfertComptoirPrestataireFormType extends TransfertFormType
)) ))
->add('destinataire', EntityType::class, array( ->add('destinataire', EntityType::class, array(
'class' => Prestataire::class, 'class' => Prestataire::class,
'choices' => $this->em->getRepository(Prestataire::class)->findBy(array('enabled' => true)), 'choices' => $this->em->getRepository(Prestataire::class)->findBy(array('enabled' => true), array('raison'=> 'ASC')),
'placeholder' => 'Prestataire', 'placeholder' => 'Prestataire',
'required' => true, 'required' => true,
'label' => 'Prestataire :', 'label' => 'Prestataire :',
......
...@@ -18,7 +18,7 @@ class TransfertGroupeSiegeFormType extends TransfertFormType ...@@ -18,7 +18,7 @@ class TransfertGroupeSiegeFormType extends TransfertFormType
$builder $builder
->add('expediteur', EntityType::class, array( ->add('expediteur', EntityType::class, array(
'class' => Groupe::class, 'class' => Groupe::class,
'choices' => $this->em->getRepository(Groupe::class)->findBy(array('enabled' => true)), 'choices' => $this->em->getRepository(Groupe::class)->findBy(array('enabled' => true), array('name'=> 'ASC')),
'choice_label' => function ($choice) { 'choice_label' => function ($choice) {
return ((!empty($choice->getName())?$choice->getName():'Groupe').' ('.$choice->getCompte().')'); return ((!empty($choice->getName())?$choice->getName():'Groupe').' ('.$choice->getCompte().')');
}, },
......
...@@ -24,7 +24,7 @@ class TransfertSiegeGroupeFormType extends TransfertFormType ...@@ -24,7 +24,7 @@ class TransfertSiegeGroupeFormType extends TransfertFormType
)) ))
->add('destinataire', EntityType::class, array( ->add('destinataire', EntityType::class, array(
'class' => Groupe::class, 'class' => Groupe::class,
'choices' => $this->em->getRepository(Groupe::class)->findBy(array('enabled' => true)), 'choices' => $this->em->getRepository(Groupe::class)->findBy(array('enabled' => true), array('name'=> 'ASC')),
'choice_label' => function ($choice) { 'choice_label' => function ($choice) {
return ((!empty($choice->getName())?$choice->getName():'Groupe').' ('.$choice->getCompte().')'); return ((!empty($choice->getName())?$choice->getName():'Groupe').' ('.$choice->getCompte().')');
}, },
......
...@@ -59,7 +59,7 @@ class AppExtension extends AbstractExtension ...@@ -59,7 +59,7 @@ class AppExtension extends AbstractExtension
public function getAllPrestataires() public function getAllPrestataires()
{ {
return $this->container->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true)); return $this->container->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true), array('raison'=> 'ASC'));
} }
public function getAllGroupePrestataires($type = '') public function getAllGroupePrestataires($type = '')
...@@ -69,13 +69,14 @@ class AppExtension extends AbstractExtension ...@@ -69,13 +69,14 @@ class AppExtension extends AbstractExtension
public function getAllComptoirs() public function getAllComptoirs()
{ {
return $this->container->get('doctrine')->getRepository(Comptoir::class)->findBy(array('enabled' => true)); return $this->container->get('doctrine')->getRepository(Comptoir::class)->findBy(array('enabled' => true), array('name'=> 'ASC'));
} }
public function getAllRubriques() public function getAllRubriques()
{ {
return $this->container->get('doctrine')->getRepository(Rubrique::class)->findBy(array('enabled' => true)); return $this->container->get('doctrine')->getRepository(Rubrique::class)->findBy(array('enabled' => true), array('name'=> 'ASC'));
} }
/** /**
* Return a list of all filters. * Return a list of all filters.
* *
...@@ -114,7 +115,7 @@ class AppExtension extends AbstractExtension ...@@ -114,7 +115,7 @@ class AppExtension extends AbstractExtension
public function getAllGroupes() public function getAllGroupes()
{ {
return $this->container->get('doctrine')->getRepository(Groupe::class)->findBy(array('enabled' => true)); return $this->container->get('doctrine')->getRepository(Groupe::class)->findBy(array('enabled' => true), array('name'=> 'ASC'));
} }
public function mediaurl($media, $format) public function mediaurl($media, $format)
......
...@@ -37,6 +37,7 @@ class FormExtension extends AbstractExtension ...@@ -37,6 +37,7 @@ class FormExtension extends AbstractExtension
new \Twig_SimpleFunction('getTransfertPrestataireSiegeForm', array($this, 'getTransfertPrestataireSiegeForm')), new \Twig_SimpleFunction('getTransfertPrestataireSiegeForm', array($this, 'getTransfertPrestataireSiegeForm')),
new \Twig_SimpleFunction('getTransfertPrestataireComptoirForm', array($this, 'getTransfertPrestataireComptoirForm')), new \Twig_SimpleFunction('getTransfertPrestataireComptoirForm', array($this, 'getTransfertPrestataireComptoirForm')),
new \Twig_SimpleFunction('getTransfertComptoirToXForm', array($this, 'getTransfertComptoirToXForm')), new \Twig_SimpleFunction('getTransfertComptoirToXForm', array($this, 'getTransfertComptoirToXForm')),
new \Twig_SimpleFunction('getTransfertComptoirGroupeForm', array($this, 'getTransfertComptoirGroupeForm')),
new \Twig_SimpleFunction('getTransfertGroupeComptoirForm', array($this, 'getTransfertGroupeComptoirForm')), new \Twig_SimpleFunction('getTransfertGroupeComptoirForm', array($this, 'getTransfertGroupeComptoirForm')),
new \Twig_SimpleFunction('getTransfertSiegeGroupeForm', array($this, 'getTransfertSiegeGroupeForm')), new \Twig_SimpleFunction('getTransfertSiegeGroupeForm', array($this, 'getTransfertSiegeGroupeForm')),
new \Twig_SimpleFunction('getTransfertGroupeSiegeForm', array($this, 'getTransfertGroupeSiegeForm')), new \Twig_SimpleFunction('getTransfertGroupeSiegeForm', array($this, 'getTransfertGroupeSiegeForm')),
...@@ -99,6 +100,10 @@ class FormExtension extends AbstractExtension ...@@ -99,6 +100,10 @@ class FormExtension extends AbstractExtension
{ {
return $this->container->get('app.formfactory')->getTransfertComptoirToXForm($user, $destinataire); return $this->container->get('app.formfactory')->getTransfertComptoirToXForm($user, $destinataire);
} }
public function getTransfertComptoirGroupeForm(User $user)
{
return $this->container->get('app.formfactory')->getTransfertComptoirGroupeForm($user);
}
public function getTransfertGroupeComptoirForm(User $user) public function getTransfertGroupeComptoirForm(User $user)
{ {
return $this->container->get('app.formfactory')->getTransfertGroupeComptoirForm($user); return $this->container->get('app.formfactory')->getTransfertGroupeComptoirForm($user);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block content %} {% block content %}
<div class='container'> <div class='container'>
<h4 class='mt-3'>Adhérer :</h4> <h4 class='mt-3'>{{'Adhérer'|trans }} :</h4>
<p> <p>
{{form_start(form)}} {{form_start(form)}}
{{ form_row(form.user) }} {{ form_row(form.user) }}
......
<div class="card mb-3 {% if app.user.adherent.ecompte > 0 %}border-success{% else %}border-error{% endif %}"> <div class="card mb-3 {% if app.user.adherent.ecompte > 0 %}border-success{% else %}border-error{% endif %}">
<div class="card-header"><i class="fa fa-coins mr-4"></i> Solde de mon compte : <b>{{app.user.adherent.ecompte}}</b></div> <div class="card-header"><i class="fa fa-coins mr-4"></i> {{ 'Solde de mon compte'|trans }} : <b>{{app.user.adherent.ecompte}}</b></div>
</div> </div>
\ No newline at end of file
{% extends 'block/onetransaction.html.twig' %} {% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-exchange-alt mr-4"></i> Virement vers un adhérent <i class="fa fa-exchange-alt mr-4"></i> {{'Virement vers un adhérent'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blockcontent %} {% block blockcontent %}
{% set form = getTransactionAdherentAdherentForm(app.user) %} {% set form = getTransactionAdherentAdherentForm(app.user) %}
......
{% extends 'block/onetransaction.html.twig' %} {% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-exchange-alt mr-4"></i> Virement vers un prestataire <i class="fa fa-exchange-alt mr-4"></i> {{'Virement vers un prestataire'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blockcontent %} {% block blockcontent %}
{% set form = getTransactionAdherentPrestataireForm(app.user) %} {% set form = getTransactionAdherentPrestataireForm(app.user) %}
......
{% extends 'common/layout.html.twig' %}
{% block content %}
adherent index
{% endblock %}
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<h4>{{ "Mes cotisations"|trans }} :</h4> <h4>{{ "Mes cotisations"|trans }} :</h4>
<ul class='list-group'> <ul class='list-group'>
{% for cotisation in app.user.cotisations %} {% for cotisation in app.user.cotisations %}
<li class="list-group-item">{{cotisation.annee|upper}} : {{cotisation.montant}}&euro; (payée le {{cotisation.createdAt|date('d-m-Y')}})</li> <li class="list-group-item">{{cotisation.annee|upper}} : {{cotisation.montant}}&euro; ({{ 'payée le'|trans }} {{cotisation.createdAt|date('d-m-Y')}})</li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<h4>{{ "Mes transactions"|trans }} :</h4> <h4>{{ "Mes transactions"|trans }} :</h4>
<ul class='list-group'> <ul class='list-group'>
{% for flux in app.user.flux %} {% for flux in app.user.flux %}
<li class="list-group-item">{{flux.parenttype|capitalize}} à {{flux.destinataire}} {{flux.montant}}&euro; (payée le {{flux.createdAt|date('d-m-Y')}})</li> <li class="list-group-item">{{flux.parenttype|capitalize}} à {{flux.destinataire}} {{flux.montant}}&euro; ({{ 'payée le'|trans }} {{flux.createdAt|date('d-m-Y')}})</li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block list_header %} {% block list_header %}
{% if admin.total is defined %} {% if admin.total is defined %}
<div class="pull-left" style="margin: 10px 5px;"> <div class="pull-left" style="margin: 10px 5px;">
<label for="{{ admin.uniqid }}_sum_of_orders" class="control-label">{{ admin.totalLabel is defined ? admin.totalLabel : 'Total : '}}</label> <label for="{{ admin.uniqid }}_sum_of_orders" class="control-label">{{ admin.totalLabel is defined ? admin.totalLabel : (('Total'|trans)~' : ')}}</label>
<label class="control-label">{{ admin.total }}</label> <label class="control-label">{{ admin.total }}</label>
</div> </div>
{% endif %} {% endif %}
......
{% set idcard = idcard|default(random(500)) %} {% set idcard = idcard|default(random(500)) %}
{% set collapse = collapse is defined ? collapse : 'collapse' %} {% set collapse = collapse is defined ? collapse : 'collapse' %}
<div class="card mb-3"> <div class="card mb-3">
<div class="card-header" style='cursor:pointer;' onmouseover="$(this).addClass('border-primary');" onmouseout="$(this).removeClass('border-primary');" data-toggle="collapse" data-target="#collapse{{idcard}}" aria-expanded="false" aria-controls="collapse{{idcard}}">{% block blocktitle %}TITLE with blocktitle{% endblock blocktitle %}</div> <div class="card-header" style='cursor:pointer;' onmouseover="$(this).addClass('border-primary');" onmouseout="$(this).removeClass('border-primary');" data-toggle="collapse" data-target="#collapse{{idcard}}" aria-expanded="false" aria-controls="collapse{{idcard}}">{% block blocktitle %}{% endblock blocktitle %}</div>
<div class="card-body {{collapse}}" id="collapse{{idcard}}" data-parent="#accordion"> <div class="card-body {{collapse}}" id="collapse{{idcard}}" data-parent="#accordion">
<h4 class="card-title">{% block blocksubtitle %}SUBTITLE with blocksubtitle{% endblock blocksubtitle %}</h4> <h4 class="card-title">{% block blocksubtitle %}{% endblock blocksubtitle %}</h4>
<div class="card-text"> <div class="card-text">
{% block blockcontent %}CONTENT with blockcontent{% endblock blockcontent %} {% block blockcontent %}
{% endblock blockcontent %}
</div> </div>
</div> </div>
</div> </div>
...@@ -3,14 +3,14 @@ ...@@ -3,14 +3,14 @@
{% extends 'block/block_collapse.html.twig' %} {% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-clipboard-list mr-4"></i> Mes cotisations <i class="fa fa-clipboard-list mr-4"></i> {{ 'Mes cotisations'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blocksubtitle %} {% block blocksubtitle %}
{% endblock blocksubtitle %} {% endblock blocksubtitle %}
{% block blockcontent %} {% block blockcontent %}
<ul class='list-group'> <ul class='list-group'>
{% for cotisation in app.user.cotisations %} {% for cotisation in app.user.cotisations %}
<li class="list-group-item">{{cotisation.annee|upper}} : {{cotisation.montant}}&euro; (payée le {{cotisation.createdAt|date('d-m-Y')}})</li> <li class="list-group-item">{{cotisation.annee|upper}} : {{cotisation.montant}}&euro; ({{ 'payée le'|trans }} {{cotisation.createdAt|date('d-m-Y')}})</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endblock blockcontent %} {% endblock blockcontent %}
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
{% set routea = '' %} {% set routea = '' %}
{% endif %} {% endif %}
{% if routea != '' {% if routea != '' %}
%}
<a class="sonata-link-identifier" href="{{ path(routea, {'id': object.expediteur.id}) }}"> <a class="sonata-link-identifier" href="{{ path(routea, {'id': object.expediteur.id}) }}">
{%- block field %} {%- block field %}
{% spaceless %} {% spaceless %}
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{% extends 'block/block_collapse.html.twig' %} {% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-list-alt mr-4"></i> Opérations <i class="fa fa-list-alt mr-4"></i> {{ 'Opérations'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blocksubtitle %} {% block blocksubtitle %}
{% endblock blocksubtitle %} {% endblock blocksubtitle %}
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</a> </a>
</div> </div>
{% else %} {% else %}
<div class='mb-2'> <div class='mb-2 group'>
<a class='btn btn-xs m-1 btn-primary' href='{{path('index', [], true)}}?_switch_user=user_prestataire'> <a class='btn btn-xs m-1 btn-primary' href='{{path('index', [], true)}}?_switch_user=user_prestataire'>
{{ 'PRESTATAIRE'|trans }} {{ 'PRESTATAIRE'|trans }}
</a> </a>
...@@ -24,6 +24,18 @@ ...@@ -24,6 +24,18 @@
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_gestiongroupe'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_gestiongroupe'>
{{ 'GESTION GROUPE'|trans }} {{ 'GESTION GROUPE'|trans }}
</a> </a>
{# <span class="dropdown">
<a href="#" class='btn btn-xs m-1 btn-primary dropdown-toggle' id="dropdownMenuButton" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{{ 'GESTION GROUPE'|trans }}
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{% for groupe in getAllGroupes() %}
{% for user in groupe.gestionnaires %}
<a class="dropdown-item" href="{{path(routeName, [], true)}}?_switch_user='{{user.username}}">{{groupe}} ({{user}})</a>
{% endfor %}
{% endfor %}
</div>
</span> #}
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_contact'> <a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_contact'>
{{ 'CONTACT'|trans }} {{ 'CONTACT'|trans }}
</a> </a>
...@@ -84,6 +96,7 @@ ...@@ -84,6 +96,7 @@
{% include 'block/userpassword.html.twig' %} {% include 'block/userpassword.html.twig' %}
{% include 'block/transactions.html.twig' %} {% include 'block/transactions.html.twig' %}
{% include 'groupe/block/transaction_comptoir.html.twig' %} {% include 'groupe/block/transaction_comptoir.html.twig' %}
{% include 'groupe/block/retourgroupe.html.twig' %}
{% elseif is_granted('ROLE_COMPTOIR') %} {% elseif is_granted('ROLE_COMPTOIR') %}
......
{% extends 'block/block_collapse.html.twig' %} {% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-user-cog mr-4"></i> {{'Compte utilisateur'|trans}} <i class="fa fa-user-cog mr-4"></i> {{ 'Compte utilisateur'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blocksubtitle %} {% block blocksubtitle %}
{% endblock blocksubtitle %} {% endblock blocksubtitle %}
......
{% extends 'block/block_collapse.html.twig' %} {% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-user-cog mr-4"></i> {{'Changer votre mot de passe'|trans}} <i class="fa fa-user-cog mr-4"></i> {{ 'Changer votre mot de passe'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blocksubtitle %} {% block blocksubtitle %}
{% endblock blocksubtitle %} {% endblock blocksubtitle %}
......
...@@ -18,7 +18,7 @@ file that was distributed with this source code. ...@@ -18,7 +18,7 @@ file that was distributed with this source code.
{# AJOUT POUR LA MLC #} {# AJOUT POUR LA MLC #}
<div class="box"> <div class="box">
<div class="box-header text-center"> <div class="box-header text-center">
<h3 class="box-title">{{'ADMINISTRATION'|trans }}</h3> <h3 class="box-title">{{ 'ADMINISTRATION'|trans }}</h3>
</div> </div>
<div class="box-body"> <div class="box-body">
{% include 'block/useradmin.html.twig' with {'routeName': 'sonata_admin_dashboard'}%} {% include 'block/useradmin.html.twig' with {'routeName': 'sonata_admin_dashboard'}%}
......
{% if getAllFlux(app.user, app.request).getTotalItemCount > 0 %} {% if getAllFlux(app.user, app.request).getTotalItemCount > 0 %}
<div class='flux mt-4'> <div class='flux mt-4'>
<h4>Mes transactions :</h4> <h4>{{ 'Mes transactions :'|trans }}</h4>
<h5>({{getAllFlux(app.user, app.request).getTotalItemCount}})</h5> <h5>({{getAllFlux(app.user, app.request).getTotalItemCount}})</h5>
<ul class='list-group'> <ul class='list-group'>
{% for flux in getAllFlux(app.user, app.request) %} {% for flux in getAllFlux(app.user, app.request) %}
<li class="list-group-item">{{flux.parenttype|capitalize}} à {{flux.destinataire}} {{flux.montant}}&euro; (payée le {{flux.createdAt|date('d-m-Y')}})</li> <li class="list-group-item">{{flux.parenttype|capitalize}} à {{flux.destinataire}} {{flux.montant}}&euro; ({{ 'payée le'|trans }} {{flux.createdAt|date('d-m-Y')}})</li>
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
......
<div class="rubriques"> <div class="rubriques">
<h4> <i class="fa fa-paperclip"></i> Groupes Locaux</h4> <h4> <i class="fa fa-paperclip"></i> {{ 'Groupes Locaux'|trans }}</h4>
<p> <p>
{% for groupe in getAllGroupes() %} {% for groupe in getAllGroupes() %}
<a class='groupe' href='{{ path('show_groupe', {'slug': groupe.slug}) }}'>{{groupe.name}}</a>{% if not loop.last %}{% endif %} <a class='groupe' href='{{ path('show_groupe', {'slug': groupe.slug}) }}'>{{groupe.name}}</a>{% if not loop.last %}{% endif %}
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</div> </div>
<div class='row'> <div class='row'>
<div class='col-12 text-center'> <div class='col-12 text-center'>
<a href="{{ path("fos_user_resetting_request") }}" class='mr-2'>Mot de passe oublié ?</a> <a href="{{ path("fos_user_resetting_request") }}" class='mr-2'>{{ 'Mot de passe oublié ?'|trans }}</a>
<input type="checkbox" id="remember_me" name="_remember_me" value="on" /> <input type="checkbox" id="remember_me" name="_remember_me" value="on" />
<label class='ml-2' for="remember_me">{{ 'security.login.remember_me'|trans }}</label> <label class='ml-2' for="remember_me">{{ 'security.login.remember_me'|trans }}</label>
</div> </div>
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
{% if app.user is null %} {% if app.user is null %}
<li class="nav-item dropdownmenu-item has-child dropdown" role="menu-item"> <li class="nav-item dropdownmenu-item has-child dropdown" role="menu-item">
<a href="#" id="navbarDropdown1" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link parent dropdown-toggle ">Adhérer</a> <a href="#" id="navbarDropdown1" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link parent dropdown-toggle ">{{ 'Adhérer'|trans }}</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown1"> <div class="dropdown-menu" aria-labelledby="navbarDropdown1">
<a href="/adherer" class="dropdown-item ">Adhérer à la MLC</a> <a href="/adherer" class="dropdown-item ">{{ 'Adhérer à la MLC'|trans }}</a>
</div> </div>
</li> </li>
{% endif %} {% endif %}
......
<div class="lastnewslist"> <div class="lastnewslist">
<h4> <i class="fa fa-newspaper"></i> Actualités</h4> <h4> <i class="fa fa-newspaper"></i> {{ 'Actualités'|trans }}</h4>
<p> <p>
{% for news in getLastNews(3) %} {% for news in getLastNews(3) %}
<div class="card mb-2"> <div class="card mb-2">
......
<div class="rubriques"> <div class="rubriques">
<h4> <i class="fa fa-flag"></i> {{'Rubriques'|trans}}</h4> <h4> <i class="fa fa-flag"></i> {{ 'Rubriques'|trans }}</h4>
<p> <p>
{% for rubrique in getAllRubriques() %} {% for rubrique in getAllRubriques() %}
<a class='rubrique' href='{{ path('show_rubrique', {'slug': rubrique.slug}) }}'>{{rubrique.name}}</a>{% if not loop.last %}{% endif %} <a class='rubrique' href='{{ path('show_rubrique', {'slug': rubrique.slug}) }}'>{{rubrique.name}}</a>{% if not loop.last %}{% endif %}
......
<div class="stats"> <div class="stats">
<h4 class='mb-3'> <i class="fa fa-bars"></i> {{'À ce jour'|trans}}</h4> <h4 class='mb-3'> <i class="fa fa-bars"></i> {{ 'À ce jour'|trans }}</h4>
<p> <p>
<i class="fas fa-check"> </i> {{ showMlcStats('user') }} {{'utilisateurs'|trans}}<br> <i class="fas fa-check"> </i> {{ showMlcStats('user') }} {{ 'utilisateurs'|trans }}<br>
</p> </p>
<p> <p>
<i class="fa fa-check"> </i> {{ showMlcStats('prestataire') }} <a href="{{ path('liste_prestataire') }}" title="{{'Les prestataires de la doume'|trans}}">{{'prestataires'|trans}}</a> {{'et'|trans}} {{ showMlcStats('partenaire') }} <a href="{{ path('liste_partenaire') }}" title="{{'Les partenaires de la doume'|trans}}">{{'partenaires'|trans}}</a> <i class="fa fa-check"> </i> {{ showMlcStats('prestataire') }} <a href="{{ path('liste_prestataire') }}" title="{{ 'Les prestataires de la doume'|trans }}">{{'prestataires'|trans}}</a> {{'et'|trans}} {{ showMlcStats('partenaire') }} <a href="{{ path('liste_partenaire') }}" title="{{'Les partenaires de la doume'|trans}}">{{ 'partenaires'|trans }}</a>
</p> </p>
<p> <p>
<i class="fa fa-check"> </i> {{ showMlcStats('groupe') }} <a href="{#{ path('groupe_liste') }#}" title="{{'Les groupes locaux de la doume'|trans}}">{{'groupes locaux'|trans}}</a> <i class="fa fa-check"> </i> {{ showMlcStats('groupe') }} <a href="{#{ path('groupe_liste') }#}" title="{{ 'Les groupes locaux de la doume'|trans }}">{{ 'groupes locaux'|trans }}</a>
</p> </p>
<p> <p>
<i class="fa fa-check"> </i> {{ showMlcStats('comptoir') }} <a href="{{ path('comptoirs_liste') }}" title="{{'Les comptoirs de la doume'|trans}}">{{'comptoirs'|trans}}</a> <i class="fa fa-check"> </i> {{ showMlcStats('comptoir') }} <a href="{{ path('comptoirs_liste') }}" title="{{ 'Les comptoirs de la doume'|trans }}">{{ 'comptoirs'|trans }}</a>
</p> </p>
{# <p> {# <p>
<i class="fa fa-check"> </i> 527029 Doumes émises <i class="fa fa-check"> </i> 527029 Doumes émises
......
{% extends 'block/block_collapse.html.twig' %} {% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-cogs mr-4"></i> {{'Configuration du Comptoir'|trans}} <i class="fa fa-cogs mr-4"></i> {{ 'Configuration du Comptoir'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blocksubtitle %} {% block blocksubtitle %}
{% endblock blocksubtitle %} {% endblock blocksubtitle %}
......
{% extends 'block/onetransaction.html.twig' %} {% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-external-link-alt mr-4"></i> Reconversion <i class="fa fa-external-link-alt mr-4"></i> {{ 'Décharger prestataire'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blockcontent %} {% block blockcontent %}
{% set form = getTransfertPrestataireComptoirForm(app.user) %} {% set form = getTransfertPrestataireComptoirForm(app.user) %}
......
{% extends 'block/onetransaction.html.twig' %} {% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-exchange-alt mr-4"></i> Virement vers un adhérent <i class="fa fa-exchange-alt mr-4"></i> {{ 'Vente à un adhérent'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blockcontent %} {% block blockcontent %}
{% set form = getTransfertComptoirToXForm(app.user, 'adherent') %} {% set form = getTransfertComptoirToXForm(app.user, 'adherent') %}
......
{% extends 'block/onetransaction.html.twig' %} {% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-exchange-alt mr-4"></i> {{'Virement vers un prestataire'|trans}} <i class="fa fa-exchange-alt mr-4"></i> {{ 'Vente à un prestataire'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blockcontent %} {% block blockcontent %}
{% set form = getTransfertComptoirToXForm(app.user, 'prestataire') %} {% set form = getTransfertComptoirToXForm(app.user, 'prestataire') %}
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
{% block content %} {% block content %}
<div class='container prestalist mt-2'> <div class='container prestalist mt-2'>
<div class='card'> <div class='card'>
<div class="card-header"><h3>{{'Carte des comptoirs :'|trans}}</h3></div> <div class="card-header"><h3>{{ 'Carte des comptoirs :'|trans }}</h3></div>
<div class="card-body"> <div class="card-body">
<div class="card-text"> <div class="card-text">
{% include 'presta/block/carte.html.twig' with {title: 'Situer les comptoirs', id: 'comptoirid', style:"height: 400px;"} %} {% include 'presta/block/carte.html.twig' with {title: 'Situer les comptoirs'|trans, id: 'comptoirid', style:"height: 400px;"} %}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block content %} {% block content %}
<div class='container comptoirslist mt-5'> <div class='container comptoirslist mt-5'>
<h1 class='pagetitle'>{{'Liste des comptoirs'|trans}}</h1> <h1 class='pagetitle'>{{ 'Liste des comptoirs'|trans }}</h1>
<div class="row"> <div class="row">
{% for comptoir in comptoirs %} {% for comptoir in comptoirs %}
<div class='col-6'> <div class='col-6'>
......
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
<h4 class="card-subtitle mb-3">{{'Groupe local'|trans}} : <a href='{{ path('show_groupe', {'slug': comptoir.groupe.slug}) }}'>{{comptoir.groupe.__toString()}}</a></h4> <h4 class="card-subtitle mb-3">{{'Groupe local'|trans}} : <a href='{{ path('show_groupe', {'slug': comptoir.groupe.slug}) }}'>{{comptoir.groupe.__toString()}}</a></h4>
{% endif %} {% endif %}
{% if comptoir.tel != null %} {% if comptoir.tel != null %}
<h5 class="card-subtitle mb-3">{{'Téléphone'|trans}} : {{comptoir.tel}}</h5> <h5 class="card-subtitle mb-3">{{ 'Téléphone'|trans }} : {{comptoir.tel}}</h5>
{% endif %} {% endif %}
{% if comptoir.email != null %} {% if comptoir.email != null %}
<h6 class="card-subtitle mb-3">{{'Email'|trans}} : {{ comptoir.email|safe_email|raw }}</h6> <h6 class="card-subtitle mb-3">{{ 'Email'|trans }} : {{ comptoir.email|safe_email|raw }}</h6>
{% endif %} {% endif %}
{% if comptoir.getFullAddresse() != null %} {% if comptoir.getFullAddresse() != null %}
<h6 class="card-title text-muted mb-3">{{comptoir.getFullAddresse()}}</h6> <h6 class="card-title text-muted mb-3">{{comptoir.getFullAddresse()}}</h6>
......
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
<div class="card-header"><h1>{{comptoir.name}}</h1></div> <div class="card-header"><h1>{{comptoir.name}}</h1></div>
<div class="card-body"> <div class="card-body">
{% if comptoir.groupe != null %} {% if comptoir.groupe != null %}
<h4 class="card-subtitle mb-3">{{'Groupe local'|trans}} : <a href='{{ path('show_groupe', {'slug': comptoir.groupe.slug}) }}'>{{comptoir.groupe.__toString()}}</a></h4> <h4 class="card-subtitle mb-3">{{ 'Groupe local'|trans }} : <a href='{{ path('show_groupe', {'slug': comptoir.groupe.slug}) }}'>{{comptoir.groupe.__toString()}}</a></h4>
{% endif %} {% endif %}
{% if comptoir.tel != null %} {% if comptoir.tel != null %}
<h5 class="card-subtitle mb-3">{{'Téléphone'|trans}} : {{comptoir.tel}}</h5> <h5 class="card-subtitle mb-3">{{ 'Téléphone'|trans }} : {{comptoir.tel}}</h5>
{% endif %} {% endif %}
{% if comptoir.email != null %} {% if comptoir.email != null %}
<h6 class="card-subtitle mb-3">{{'Email'|trans}} : {{ comptoir.email|safe_email|raw }}</h6> <h6 class="card-subtitle mb-3">{{ 'Email'|trans }} : {{ comptoir.email|safe_email|raw }}</h6>
{% endif %} {% endif %}
{% if comptoir.getFullAddresse() != null %} {% if comptoir.getFullAddresse() != null %}
<h6 class="card-title text-muted mb-3">{{comptoir.getFullAddresse()}}</h6> <h6 class="card-title text-muted mb-3">{{comptoir.getFullAddresse()}}</h6>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
{{comptoir.content|raw}} {{comptoir.content|raw}}
</div> </div>
</div> </div>
<div class="card-header"><h2>{{ comptoir.groupe.prestataires|length }} {{'prestataires'|trans}} :</h2></div> <div class="card-header"><h2>{{ comptoir.groupe.prestataires|length }} {{ 'prestataires'|trans }} :</h2></div>
<ul class="list-group list-group-flush"> <ul class="list-group list-group-flush">
{% for presta in comptoir.groupe.prestataires %} {% for presta in comptoir.groupe.prestataires %}
<li class="list-group-item"> <li class="list-group-item">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block content %} {% block content %}
<div class='container homepage'> <div class='container homepage'>
<div class="card mx-auto mt-5" style="max-width:600px;"> <div class="card mx-auto mt-5" style="max-width:600px;">
<div class="card-header">Nous contacter</div> <div class="card-header">{{ 'Nous contacter'|trans }}</div>
<div class="card-body"> <div class="card-body">
<div class="card-text"> <div class="card-text">
{{form_start(form)}} {{form_start(form)}}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block content %} {% block content %}
<div class='container faqlist mt-5'> <div class='container faqlist mt-5'>
<h1 class='pagetitle'>{{'Foire Aux Questions'|trans}}</h1> <h1 class='pagetitle'>{{ 'Foire Aux Questions'|trans }}</h1>
<div class="row"> <div class="row">
{% for faq in faqs %} {% for faq in faqs %}
<div class='col-12 col-md-6'> <div class='col-12 col-md-6'>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{{faq.content|raw}} {{faq.content|raw}}
</p> </p>
{% if faq.fichier is not null %} {% if faq.fichier is not null %}
<a href="{% path faq.fichier, 'reference' %}">Voir le fichier</a> <a href="{% path faq.fichier, 'reference' %}">{{ 'Voir le fichier'|trans }}</a>
{% endif %} {% endif %}
{% if faq.image is not null %} {% if faq.image is not null %}
{% thumbnail faq.image, 'small' with {'class': 'myclass'} %} {% thumbnail faq.image, 'small' with {'class': 'myclass'} %}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block content %} {% block content %}
<div class='container groupeshow mt-5'> <div class='container groupeshow mt-5'>
<h4>{{ title }} :</h4> <h4>{{ title }} :</h4>
<h5>Mon compte : {{compte}}</h5> <h5>{{ 'Mon compte'|trans }} : {{compte}}</h5>
{{form_start(form)}} {{form_start(form)}}
{{ form_row(form.expediteur) }} {{ form_row(form.expediteur) }}
{{ form_row(form.destinataire) }} {{ form_row(form.destinataire) }}
......
{% extends 'block/block_collapse.html.twig' %} {% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-cogs mr-4"></i> {{'Configuration du Groupe local'|trans}} <i class="fa fa-cogs mr-4"></i> {{ 'Configuration du Groupe local'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blocksubtitle %} {% block blocksubtitle %}
{% endblock blocksubtitle %} {% endblock blocksubtitle %}
......
{% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %}
<i class="fa fa-external-link-alt mr-4"></i> {{ 'Retour au groupe'|trans }}
{% endblock blocktitle %}
{% block blockcontent %}
{% set form = getTransfertComptoirGroupeForm(app.user) %}
{{ parent() }}
{% endblock blockcontent %}
\ No newline at end of file
{% extends 'block/onetransaction.html.twig' %} {% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-exchange-alt mr-4"></i> Transfert vers un comptoir <i class="fa fa-exchange-alt mr-4"></i> {{ 'Transfert au comptoir'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blockcontent %} {% block blockcontent %}
{% set form = getTransfertGroupeComptoirForm(app.user) %} {% set form = getTransfertGroupeComptoirForm(app.user) %}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block content %} {% block content %}
<div class='container groupeslist mt-5'> <div class='container groupeslist mt-5'>
<h1>Groupes locaux</h1> <h1>{{ 'Groupes locaux'|trans }}</h1>
{% for groupe in groupes %} {% for groupe in groupes %}
<div class="my-3 p-3 bg-white rounded box-shadow"> <div class="my-3 p-3 bg-white rounded box-shadow">
<h2><a href="{{ path('groupe_show', {'slug': groupe.slug}) }}">{{groupe.name}}</a></h2> <h2><a href="{{ path('groupe_show', {'slug': groupe.slug}) }}">{{groupe.name}}</a></h2>
......
{% extends 'block/block_collapse.html.twig' %} {% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-apple-alt mr-4"></i> {{'Inscription AMAP/Marchés'|trans}} <i class="fa fa-apple-alt mr-4"></i> {{ 'Inscription AMAP/Marchés'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blocksubtitle %} {% block blocksubtitle %}
{% endblock blocksubtitle %} {% endblock blocksubtitle %}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block content %} {% block content %}
<div class='container prestalist mt-2'> <div class='container prestalist mt-2'>
<div class='card'> <div class='card'>
<div class="card-header"><h3>{{'Carte des'|trans}} {{groupetype|upper}} :</h3></div> <div class="card-header"><h3>{{ 'Carte des'|trans }} {{groupetype|upper}} :</h3></div>
<div class="card-body"> <div class="card-body">
<div class="card-text"> <div class="card-text">
{% include 'presta/block/carte.html.twig' with {title: 'Situer les '~groupetype|upper, id: 'groupeid', style:"height: 400px;"} %} {% include 'presta/block/carte.html.twig' with {title: 'Situer les '~groupetype|upper, id: 'groupeid', style:"height: 400px;"} %}
......
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
<div class="card-header"><h1>{{groupepresta.name}}</h1></div> <div class="card-header"><h1>{{groupepresta.name}}</h1></div>
<div class="card-body"> <div class="card-body">
{% if groupepresta.groupe != null %} {% if groupepresta.groupe != null %}
<h4 class="card-subtitle mb-3">{{'Groupe local'|trans}} : <a href='{{ path('show_groupe', {'slug': groupepresta.groupe.slug}) }}'>{{groupepresta.groupe.__toString()}}</a></h4> <h4 class="card-subtitle mb-3">{{ 'Groupe local'|trans }} : <a href='{{ path('show_groupe', {'slug': groupepresta.groupe.slug}) }}'>{{groupepresta.groupe.__toString()}}</a></h4>
{% endif %} {% endif %}
{% if groupepresta.horaires != null %} {% if groupepresta.horaires != null %}
<h5 class="card-subtitle mb-3">{{'Horaires'|trans}} : {{groupepresta.horaires}}</h5> <h5 class="card-subtitle mb-3">{{ 'Horaires'|trans }} : {{groupepresta.horaires}}</h5>
{% endif %} {% endif %}
{% if groupepresta.tel != null %} {% if groupepresta.tel != null %}
<h5 class="card-subtitle mb-3">{{'Téléphone'|trans}} : {{groupepresta.tel}}</h5> <h5 class="card-subtitle mb-3">{{ 'Téléphone'|trans }} : {{groupepresta.tel}}</h5>
{% endif %} {% endif %}
{% if groupepresta.email != null %} {% if groupepresta.email != null %}
<h6 class="card-subtitle mb-3">{{'Email'|trans}} : {{ groupepresta.email|safe_email|raw }}</h6> <h6 class="card-subtitle mb-3">{{ 'Email'|trans }} : {{ groupepresta.email|safe_email|raw }}</h6>
{% endif %} {% endif %}
{% if groupepresta.getFullAddresse() != null %} {% if groupepresta.getFullAddresse() != null %}
<h6 class="card-title text-muted mb-3">{{groupepresta.getFullAddresse()}}</h6> <h6 class="card-title text-muted mb-3">{{groupepresta.getFullAddresse()}}</h6>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
{% include 'common/login.html.twig' %} {% include 'common/login.html.twig' %}
{% endset %} {% endset %}
{% include 'block/modal.html.twig' %} {% include 'block/modal.html.twig' %}
<a class='btn btn-primary w-100 mb-4' data-toggle="modal" data-target="#{{ modal_id }}" title='{{'Se connecter'|trans}}' href="{{path('fos_user_security_login')}}">{{'Se connecter'|trans}}</a> <a class='btn btn-primary w-100 mb-4' data-toggle="modal" data-target="#{{ modal_id }}" title='{{ 'Se connecter'|trans }}' href="{{path('fos_user_security_login')}}">{{ 'Se connecter'|trans }}</a>
{% endif %} {% endif %}
{% include 'common/news.html.twig' %} {% include 'common/news.html.twig' %}
{% endblock colonne_droite %} {% endblock colonne_droite %}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block content %} {% block content %}
<div class='container homepage'> <div class='container homepage'>
<div class="card mx-auto mt-5" style="max-width:600px;"> <div class="card mx-auto mt-5" style="max-width:600px;">
<div class="card-header">PREMIERE INSTALLATION</div> <div class="card-header">{{ 'PREMIERE INSTALLATION'|trans }}</div>
<div class="card-body"> <div class="card-body">
<div class="card-text"> <div class="card-text">
{{form_start(form)}} {{form_start(form)}}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block content %} {% block content %}
<div class='container newslist mt-5'> <div class='container newslist mt-5'>
<h1><i class="fa fa-newspaper"></i> {{'Actualités'|trans}}</h1> <h1><i class="fa fa-newspaper"></i> {{ 'Actualités'|trans }}</h1>
{% for new in news %} {% for new in news %}
<div class="card mb-4"> <div class="card mb-4">
<div class="card-header" style='cursor:pointer;'><h2><a href='{{path('show_news', {'slug': new.slug})}}'>{{ new.title|capitalize }}</a></h2></div> <div class="card-header" style='cursor:pointer;'><h2><a href='{{path('show_news', {'slug': new.slug})}}'>{{ new.title|capitalize }}</a></h2></div>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
{% if pathMedia ends with '.jpg' or pathMedia ends with '.png' or pathMedia ends with '.bmp' or pathMedia ends with '.gif' %} {% if pathMedia ends with '.jpg' or pathMedia ends with '.png' or pathMedia ends with '.bmp' or pathMedia ends with '.gif' %}
<img src="{% path new.media, 'reference' %}" style="max-width: 100%;"/> <img src="{% path new.media, 'reference' %}" style="max-width: 100%;"/>
{% else %} {% else %}
<a href="{% path new.media, 'reference' %}">{{'Télécharger'|trans}}</a> <a href="{% path new.media, 'reference' %}">{{ 'Télécharger'|trans }}</a>
{% endif %} {% endif %}
{% endif %} {% endif %}
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</div> </div>
</div> </div>
<div class="card-footer text-muted"> <div class="card-footer text-muted">
{{'Crée le'|trans}} {{new.createdAt|date('d/m/Y')}} {{ 'Crée le'|trans }} {{new.createdAt|date('d/m/Y')}}
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
</div> </div>
<div class="card-footer text-muted"> <div class="card-footer text-muted">
{{'Crée le'|trans}} {{news.createdAt|date('d/m/Y')}} {{ 'Crée le'|trans }} {{news.createdAt|date('d/m/Y')}}
</div> </div>
</div> </div>
</div> </div>
......
{% extends 'block/onetransaction.html.twig' %} {% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %} {% block blocktitle %}
<i class="fa fa-external-link-alt mr-4"></i> Reconversion <i class="fa fa-external-link-alt mr-4"></i> {{ 'Reconversion'|trans }}
{% endblock blocktitle %} {% endblock blocktitle %}
{% block blockcontent %} {% block blockcontent %}
{% set form = getTransfertPrestataireSiegeForm(app.user) %} {% set form = getTransfertPrestataireSiegeForm(app.user) %}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block content %} {% block content %}
<div class='container prestalist mt-2'> <div class='container prestalist mt-2'>
<div class='card'> <div class='card'>
<div class="card-header"><h3>{{'Carte des prestataires :'|trans}}</h3></div> <div class="card-header"><h3>{{ 'Carte des prestataires :'|trans }}</h3></div>
<div class="card-body"> <div class="card-body">
<div class="card-text"> <div class="card-text">
{% include 'presta/block/carte.html.twig' with {style:"height: 400px;"} %} {% include 'presta/block/carte.html.twig' with {style:"height: 400px;"} %}
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="card-header"><h2>{{presta.raison}}</h2></div> <div class="card-header"><h2>{{presta.raison}}</h2></div>
<div class="card-body"> <div class="card-body">
<h4 class="card-title">{{presta.statut}} - {{presta.siret}}</h4> <h4 class="card-title">{{presta.statut}} - {{presta.siret}}</h4>
<h6 class="card-title">Responsable : {{presta.responsable}} ({{presta.metier}})</h6> <h6 class="card-title">{{ 'Responsable'|trans }} : {{presta.responsable}} ({{presta.metier}})</h6>
<div class="card-text"> <div class="card-text">
{% if presta.media %} {% if presta.media %}
<p class='mb-4'> <p class='mb-4'>
...@@ -29,12 +29,12 @@ ...@@ -29,12 +29,12 @@
{% endif %} {% endif %}
{% if presta.horaires != null %} {% if presta.horaires != null %}
<em class='mb-4'> <em class='mb-4'>
{{presta.horaires|raw}} {{ 'Horaires'|trans }} : {{presta.horaires|raw}}
</em> </em>
{% endif %} {% endif %}
{% if presta.web != null %} {% if presta.web != null %}
<p> <p>
<a href='{{presta.web}}'>Site web</a> <a href='{{presta.web}}'>{{ 'Site web'|trans }}</a>
</p> </p>
{% endif %} {% endif %}
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block content %} {% block content %}
<div class='container rubriquelist mt-5'> <div class='container rubriquelist mt-5'>
<h1>Rubriques</h1> <h1>{{ 'Rubriques'|trans }}</h1>
{# <div class="card-columns"> #} {# <div class="card-columns"> #}
<div class="row"> <div class="row">
{% for rubrique in rubriques %} {% for rubrique in rubriques %}
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<h1>{{rubrique.name}}</h1> <h1>{{rubrique.name}}</h1>
<div class="my-3 p-3 bg-white rounded box-shadow"> <div class="my-3 p-3 bg-white rounded box-shadow">
<p>{{rubrique.content|raw}}</p> <p>{{rubrique.content|raw}}</p>
<h3>Prestataires : </h3> <h3>{{ 'Prestataires'|trans }} : </h3>
{% for prestataire in rubrique.prestataires %} {% for prestataire in rubrique.prestataires %}
<div class="my-3 p-3 bg-grey rounded box-shadow"> <div class="my-3 p-3 bg-grey rounded box-shadow">
<span><a href="{{ path('show_prestataire', {'slug': prestataire.slug}) }}">{{prestataire.raison}}</a></span> <span><a href="{{ path('show_prestataire', {'slug': prestataire.slug}) }}">{{prestataire.raison}}</a></span>
......
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