Merge pull request #1 from ApesHDF/chore/sync-les-tilleuls
Chore/sync les tilleuls
This commit is contained in:
commit
7445b772d1
15 changed files with 351 additions and 107 deletions
|
|
@ -4,6 +4,8 @@ App\Entity\Configuration:
|
||||||
|
|
||||||
features (extends configuration_template):
|
features (extends configuration_template):
|
||||||
configuration:
|
configuration:
|
||||||
|
services:
|
||||||
|
servicesEnabled: true
|
||||||
notificationsSender:
|
notificationsSender:
|
||||||
notificationsSenderEmail: info@example.com
|
notificationsSenderEmail: info@example.com
|
||||||
notificationsSenderName: Contact
|
notificationsSenderName: Contact
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ App\Entity\ServiceRequest:
|
||||||
recipient: '@user_17'
|
recipient: '@user_17'
|
||||||
startAt: '<date_create_immutable("tomorrow midnight")>'
|
startAt: '<date_create_immutable("tomorrow midnight")>'
|
||||||
endAt: '<date_create_immutable("+1 week midnight")>'
|
endAt: '<date_create_immutable("+1 week midnight")>'
|
||||||
|
createdAt: <date_create_immutable('+1 month')>
|
||||||
|
|
||||||
# ongoing service request, can be finalized manually
|
# ongoing service request, can be finalized manually
|
||||||
# @see ServiceRequestStatusWorkflowControllerFinalizeTest
|
# @see ServiceRequestStatusWorkflowControllerFinalizeTest
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ App\Entity\User:
|
||||||
address: '@address_region_hauts_de_france'
|
address: '@address_region_hauts_de_france'
|
||||||
schedule: '9h30 - 17h30'
|
schedule: '9h30 - 17h30'
|
||||||
phoneNumber: null
|
phoneNumber: null
|
||||||
|
createdAt: <date_create_immutable('+1 month')>
|
||||||
|
|
||||||
# —— Users —————————————————————————————————————————————————————————————————
|
# —— Users —————————————————————————————————————————————————————————————————
|
||||||
# user with vacation mode
|
# user with vacation mode
|
||||||
|
|
@ -111,6 +112,7 @@ App\Entity\User:
|
||||||
confirmationExpiresAt: <date_create_immutable('+12 hours')>
|
confirmationExpiresAt: <date_create_immutable('+12 hours')>
|
||||||
firstname: <firstname()>
|
firstname: <firstname()>
|
||||||
lastname: <lastname()>
|
lastname: <lastname()>
|
||||||
|
createdAt: <date_create_immutable('-1 month')>
|
||||||
|
|
||||||
# user with an expired confirmation token
|
# user with an expired confirmation token
|
||||||
# user with an unconfirmed email
|
# user with an unconfirmed email
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ use App\Enum\Product\ProductType;
|
||||||
use App\Enum\Product\ProductVisibility;
|
use App\Enum\Product\ProductVisibility;
|
||||||
use App\Flysystem\EasyAdminHelper;
|
use App\Flysystem\EasyAdminHelper;
|
||||||
use App\Flysystem\MediaManager;
|
use App\Flysystem\MediaManager;
|
||||||
|
use App\Helper\CsvExporter;
|
||||||
use App\Repository\CategoryRepository;
|
use App\Repository\CategoryRepository;
|
||||||
use App\Repository\ProductRepository;
|
use App\Repository\ProductRepository;
|
||||||
use Doctrine\ORM\QueryBuilder;
|
use Doctrine\ORM\QueryBuilder;
|
||||||
|
|
@ -27,8 +28,10 @@ use EasyCorp\Bundle\EasyAdminBundle\Config\Filters;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext;
|
use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
|
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
|
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Dto\CrudDto;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
|
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Dto\SearchDto;
|
use EasyCorp\Bundle\EasyAdminBundle\Dto\SearchDto;
|
||||||
|
use EasyCorp\Bundle\EasyAdminBundle\Factory\FilterFactory;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
|
use EasyCorp\Bundle\EasyAdminBundle\Field\AssociationField;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
|
use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Field\CollectionField;
|
use EasyCorp\Bundle\EasyAdminBundle\Field\CollectionField;
|
||||||
|
|
@ -45,6 +48,8 @@ use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
||||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\String\Slugger\SluggerInterface;
|
||||||
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
abstract class AbstractProductCrudController extends AbstractCrudController implements AdminSecuredCrudControllerInterface
|
abstract class AbstractProductCrudController extends AbstractCrudController implements AdminSecuredCrudControllerInterface
|
||||||
{
|
{
|
||||||
|
|
@ -65,6 +70,10 @@ abstract class AbstractProductCrudController extends AbstractCrudController impl
|
||||||
private readonly MediaManager $mediaManager,
|
private readonly MediaManager $mediaManager,
|
||||||
#[Autowire('%product_base_path%')]
|
#[Autowire('%product_base_path%')]
|
||||||
private readonly string $productBasePath,
|
private readonly string $productBasePath,
|
||||||
|
private readonly CsvExporter $csvExporter,
|
||||||
|
private readonly TranslatorInterface $translator,
|
||||||
|
private readonly FilterFactory $filterFactory,
|
||||||
|
private readonly SluggerInterface $slugger,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,13 +121,29 @@ abstract class AbstractProductCrudController extends AbstractCrudController impl
|
||||||
$availability = Action::new('availability', 'action.availability')
|
$availability = Action::new('availability', 'action.availability')
|
||||||
->linkToCrudAction('linkToProductAvailabilityPage');
|
->linkToCrudAction('linkToProductAvailabilityPage');
|
||||||
|
|
||||||
|
$exportAction = Action::new('export')
|
||||||
|
->linkToUrl(function () {
|
||||||
|
/** @var AdminContext $context */
|
||||||
|
$context = $this->getContext();
|
||||||
|
|
||||||
|
return $this->adminUrlGenerator->setAll($context->getRequest()->query->all())
|
||||||
|
->setEntityId(null)
|
||||||
|
->setAction('export')
|
||||||
|
->generateUrl();
|
||||||
|
})
|
||||||
|
->addCssClass('btn btn-success')
|
||||||
|
->setIcon('fa fa-download')
|
||||||
|
->createAsGlobalAction()
|
||||||
|
;
|
||||||
|
|
||||||
return $actions
|
return $actions
|
||||||
->add(Crud::PAGE_INDEX, Action::DETAIL)
|
->add(Crud::PAGE_INDEX, Action::DETAIL)
|
||||||
->add(Crud::PAGE_EDIT, Action::DETAIL)
|
->add(Crud::PAGE_EDIT, Action::DETAIL)
|
||||||
->add(Crud::PAGE_EDIT, Action::INDEX)
|
->add(Crud::PAGE_EDIT, Action::INDEX)
|
||||||
->add(Crud::PAGE_INDEX, $onBreak)
|
->add(Crud::PAGE_INDEX, $onBreak)
|
||||||
->add(Crud::PAGE_INDEX, $activate)
|
->add(Crud::PAGE_INDEX, $activate)
|
||||||
->add(Crud::PAGE_DETAIL, $availability);
|
->add(Crud::PAGE_DETAIL, $availability)
|
||||||
|
->add(Crud::PAGE_INDEX, $exportAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function redirectToObjectCrudPage(): RedirectResponse
|
private function redirectToObjectCrudPage(): RedirectResponse
|
||||||
|
|
@ -147,6 +172,23 @@ abstract class AbstractProductCrudController extends AbstractCrudController impl
|
||||||
return $this->redirectToObjectCrudPage();
|
return $this->redirectToObjectCrudPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For now, we export exactly what we see in the list to avoid security problems.
|
||||||
|
*/
|
||||||
|
public function export(AdminContext $context): Response
|
||||||
|
{
|
||||||
|
$fields = FieldCollection::new($this->configureFields(Crud::PAGE_INDEX));
|
||||||
|
/** @var CrudDto $crud Crud is defined here */
|
||||||
|
$crud = $context->getCrud();
|
||||||
|
$filters = $this->filterFactory->create($crud->getFiltersConfig(), $fields, $context->getEntity());
|
||||||
|
/** @var SearchDto $search */
|
||||||
|
$search = $context->getSearch();
|
||||||
|
$queryBuilder = $this->createIndexQueryBuilder($search, $context->getEntity(), $fields, $filters);
|
||||||
|
$fileName = $this->slugger->slug($this->translator->trans($this->getEntityLabelInPlural(), [], DashboardController::DOMAIN));
|
||||||
|
|
||||||
|
return $this->csvExporter->createResponseFromQueryBuilder($queryBuilder, $fields, $fileName.'.csv');
|
||||||
|
}
|
||||||
|
|
||||||
public static function getEntityFqcn(): string
|
public static function getEntityFqcn(): string
|
||||||
{
|
{
|
||||||
return Product::class;
|
return Product::class;
|
||||||
|
|
|
||||||
|
|
@ -354,6 +354,7 @@ abstract class AbstractUserCrudController extends AbstractCrudController impleme
|
||||||
$smsNotificationsField = BooleanField::new('smsNotifications');
|
$smsNotificationsField = BooleanField::new('smsNotifications');
|
||||||
$vacationModeField = BooleanField::new('vacationMode');
|
$vacationModeField = BooleanField::new('vacationMode');
|
||||||
$addressField = AssociationField::new('address');
|
$addressField = AssociationField::new('address');
|
||||||
|
$groupsCountField = AssociationField::new('userGroups')->setLabel('Groups number');
|
||||||
|
|
||||||
return compact(
|
return compact(
|
||||||
'idField',
|
'idField',
|
||||||
|
|
@ -376,6 +377,7 @@ abstract class AbstractUserCrudController extends AbstractCrudController impleme
|
||||||
'smsNotificationsField',
|
'smsNotificationsField',
|
||||||
'vacationModeField',
|
'vacationModeField',
|
||||||
'addressField',
|
'addressField',
|
||||||
|
'groupsCountField',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,13 @@ use App\Entity\Page;
|
||||||
use App\Entity\ServiceRequest;
|
use App\Entity\ServiceRequest;
|
||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use App\Entity\UserGroup;
|
use App\Entity\UserGroup;
|
||||||
|
use App\Enum\User\UserType;
|
||||||
use App\Repository\GroupRepository;
|
use App\Repository\GroupRepository;
|
||||||
|
use App\Repository\ServiceRequestRepository;
|
||||||
|
use App\Repository\UserRepository;
|
||||||
use App\Security\Checker\AuthorizationChecker;
|
use App\Security\Checker\AuthorizationChecker;
|
||||||
|
use Doctrine\ORM\NonUniqueResultException;
|
||||||
|
use Doctrine\ORM\NoResultException;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
|
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
|
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
|
||||||
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
|
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
|
||||||
|
|
@ -55,6 +60,8 @@ final class DashboardController extends AbstractDashboardController
|
||||||
private readonly GroupRepository $groupRepository,
|
private readonly GroupRepository $groupRepository,
|
||||||
private readonly AdminUrlGenerator $adminUrlGenerator,
|
private readonly AdminUrlGenerator $adminUrlGenerator,
|
||||||
private readonly AuthorizationChecker $authorizationChecker,
|
private readonly AuthorizationChecker $authorizationChecker,
|
||||||
|
private readonly UserRepository $userRepository,
|
||||||
|
private readonly ServiceRequestRepository $requestRepository
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,6 +81,10 @@ final class DashboardController extends AbstractDashboardController
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws NonUniqueResultException
|
||||||
|
* @throws NoResultException
|
||||||
|
*/
|
||||||
#[Route('/admin', name: 'admin')]
|
#[Route('/admin', name: 'admin')]
|
||||||
public function index(): Response
|
public function index(): Response
|
||||||
{
|
{
|
||||||
|
|
@ -87,6 +98,11 @@ final class DashboardController extends AbstractDashboardController
|
||||||
|
|
||||||
return $this->render('admin/dashboard.html.twig', [
|
return $this->render('admin/dashboard.html.twig', [
|
||||||
'group_count' => $this->groupRepository->count([]),
|
'group_count' => $this->groupRepository->count([]),
|
||||||
|
'user_count' => $this->userRepository->getUserCountByType(UserType::USER),
|
||||||
|
'place_count' => $this->userRepository->getUserCountByType(UserType::PLACE),
|
||||||
|
'month_users_count' => $this->userRepository->getNewUsersOfMonthByType(UserType::USER),
|
||||||
|
'month_places_count' => $this->userRepository->getNewUsersOfMonthByType(UserType::PLACE),
|
||||||
|
'month_requests_count' => $this->requestRepository->getNewServiceRequestsOfMonth(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,11 @@ final class PlaceCrudController extends AbstractUserCrudController
|
||||||
'loginAt' => $loginAt,
|
'loginAt' => $loginAt,
|
||||||
'createdAt' => $createdAt,
|
'createdAt' => $createdAt,
|
||||||
'updatedAt' => $updatedAt,
|
'updatedAt' => $updatedAt,
|
||||||
|
'groupsCountField' => $groupsCountField,
|
||||||
] = $this->getFields($pageName);
|
] = $this->getFields($pageName);
|
||||||
|
|
||||||
if ($pageName === Crud::PAGE_INDEX) {
|
if ($pageName === Crud::PAGE_INDEX) {
|
||||||
return [$emailField, $nameField, $enabledField, $emailConfirmedField, $createdAt, $updatedAt, $loginAt];
|
return [$emailField, $nameField, $enabledField, $emailConfirmedField, $createdAt, $updatedAt, $loginAt, $groupsCountField];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($pageName === Crud::PAGE_NEW || $pageName === Crud::PAGE_EDIT) {
|
if ($pageName === Crud::PAGE_NEW || $pageName === Crud::PAGE_EDIT) {
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,11 @@ final class UserCrudController extends AbstractUserCrudController
|
||||||
'smsNotificationsField' => $smsNotificationsField,
|
'smsNotificationsField' => $smsNotificationsField,
|
||||||
'vacationModeField' => $vacationModeField,
|
'vacationModeField' => $vacationModeField,
|
||||||
'addressField' => $addressField,
|
'addressField' => $addressField,
|
||||||
|
'groupsCountField' => $groupsCountField,
|
||||||
] = $this->getFields($pageName);
|
] = $this->getFields($pageName);
|
||||||
|
|
||||||
if ($pageName === Crud::PAGE_INDEX) {
|
if ($pageName === Crud::PAGE_INDEX) {
|
||||||
return [$emailField, $firstNameField, $lastNameField, $enabledField, $emailConfirmedField, $avatarField, $createdAt, $updatedAt, $loginAt];
|
return [$emailField, $firstNameField, $lastNameField, $enabledField, $emailConfirmedField, $avatarField, $createdAt, $updatedAt, $loginAt, $groupsCountField];
|
||||||
}
|
}
|
||||||
|
|
||||||
$panels = $this->getPanels();
|
$panels = $this->getPanels();
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ class Configuration
|
||||||
*/
|
*/
|
||||||
public function getServices(): array
|
public function getServices(): array
|
||||||
{
|
{
|
||||||
/** @var array<bool> $services */
|
/** @var array<string, bool> $services */
|
||||||
$services = $this->configuration['services'] ?? [];
|
$services = $this->configuration['services'] ?? [];
|
||||||
|
|
||||||
return $services;
|
return $services;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ use App\Entity\User;
|
||||||
use App\Enum\ServiceRequest\ServiceRequestStatus;
|
use App\Enum\ServiceRequest\ServiceRequestStatus;
|
||||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\ORM\NonUniqueResultException;
|
||||||
|
use Doctrine\ORM\NoResultException;
|
||||||
use Doctrine\ORM\Query;
|
use Doctrine\ORM\Query;
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
|
|
@ -126,4 +128,26 @@ final class ServiceRequestRepository extends ServiceEntityRepository
|
||||||
{
|
{
|
||||||
return $this->getActionSoon('endAt');
|
return $this->getActionSoon('endAt');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws NonUniqueResultException
|
||||||
|
* @throws NoResultException
|
||||||
|
*/
|
||||||
|
public function getNewServiceRequestsOfMonth(): int
|
||||||
|
{
|
||||||
|
$today = new \DateTime();
|
||||||
|
|
||||||
|
/** @var int */
|
||||||
|
return $this
|
||||||
|
->createQueryBuilder('sr')
|
||||||
|
->select('COUNT(sr.id)')
|
||||||
|
->where('sr.createdAt >= :firstDay')
|
||||||
|
->andWhere('sr.createdAt <= :lastDay')
|
||||||
|
->setParameters([
|
||||||
|
'firstDay' => $today->modify('first day of this month')->format('Y-m-d'),
|
||||||
|
'lastDay' => $today->modify('last day of this month')->format('Y-m-d'),
|
||||||
|
])
|
||||||
|
->getQuery()
|
||||||
|
->getSingleScalarResult();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ namespace App\Repository;
|
||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use App\Enum\User\UserType;
|
use App\Enum\User\UserType;
|
||||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\ORM\NonUniqueResultException;
|
||||||
|
use Doctrine\ORM\NoResultException;
|
||||||
use Doctrine\ORM\QueryBuilder;
|
use Doctrine\ORM\QueryBuilder;
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
|
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
|
||||||
|
|
@ -105,4 +107,44 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
|
||||||
->orderBy('p.name', 'ASC')
|
->orderBy('p.name', 'ASC')
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws NonUniqueResultException
|
||||||
|
* @throws NoResultException
|
||||||
|
*/
|
||||||
|
public function getUserCountByType(UserType $type): int
|
||||||
|
{
|
||||||
|
/** @var int */
|
||||||
|
return $this
|
||||||
|
->createQueryBuilder('u')
|
||||||
|
->select('COUNT(u.id)')
|
||||||
|
->where('u.type = :type')
|
||||||
|
->setParameter('type', $type)
|
||||||
|
->getQuery()
|
||||||
|
->getSingleScalarResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws NonUniqueResultException
|
||||||
|
* @throws NoResultException
|
||||||
|
*/
|
||||||
|
public function getNewUsersOfMonthByType(UserType $type): int
|
||||||
|
{
|
||||||
|
$today = new \DateTime();
|
||||||
|
|
||||||
|
/** @var int */
|
||||||
|
return $this
|
||||||
|
->createQueryBuilder('u')
|
||||||
|
->select('COUNT(u.id)')
|
||||||
|
->where('u.type = :type')
|
||||||
|
->andWhere('u.createdAt >= :firstDay')
|
||||||
|
->andWhere('u.createdAt <= :lastDay')
|
||||||
|
->setParameters([
|
||||||
|
'firstDay' => $today->modify('first day of this month')->format('Y-m-d'),
|
||||||
|
'lastDay' => $today->modify('last day of this month')->format('Y-m-d'),
|
||||||
|
'type' => $type,
|
||||||
|
])
|
||||||
|
->getQuery()
|
||||||
|
->getSingleScalarResult();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
{% trans_default_domain 'admin' %}
|
{% trans_default_domain 'admin' %}
|
||||||
|
|
||||||
|
{% set i18n_prefix = _self|i18n_prefix %}
|
||||||
|
|
||||||
{% block content_title %}Dashboard{% endblock %}
|
{% block content_title %}Dashboard{% endblock %}
|
||||||
|
|
||||||
{% block page_actions %}
|
{% block page_actions %}
|
||||||
|
|
@ -17,12 +19,53 @@
|
||||||
<table class="datagrid">
|
<table class="datagrid">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td><b>Nombre de groupes</b></td>
|
<td><b>{{ (i18n_prefix ~ '.group')|trans }}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ group_count }}</td>
|
<td>{{ (i18n_prefix ~ '.group_count')|trans({'%group_count%': group_count}) }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td><b>{{ (i18n_prefix ~ '.users')|trans }}</b></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>{{ (i18n_prefix ~ '.month_users_count')|trans({'%month_users_count%': month_users_count}) }}</p>
|
||||||
|
<p>{{ (i18n_prefix ~ '.user_count')|trans({'%user_count%': user_count}) }}</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td><b>{{ (i18n_prefix ~ '.places')|trans }}</b></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>{{ (i18n_prefix ~ '.month_places_count')|trans({'%month_places_count%': month_places_count}) }}</p>
|
||||||
|
<p>{{ (i18n_prefix ~ '.place_count')|trans({'%place_count%': place_count}) }}</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td><b>{{ (i18n_prefix ~ '.loans')|trans }}</b></td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p>{{ (i18n_prefix ~ '.month_requests_count')|trans({'%month_requests_count%': month_requests_count}) }}</p>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
{% set my_account_links = [
|
{% set my_account_links = [
|
||||||
{
|
{
|
||||||
section: 'Messagerie',
|
section: 'Messagerie',
|
||||||
|
enable: true,
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
name: 'Mes emprunts',
|
name: 'Mes emprunts',
|
||||||
|
|
@ -36,6 +37,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'Mes objets',
|
section: 'Mes objets',
|
||||||
|
enable: true,
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
name: 'Voir mes objets',
|
name: 'Voir mes objets',
|
||||||
|
|
@ -53,7 +55,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'Mes services',
|
section: 'Mes services',
|
||||||
disable: servicesConfig,
|
enable: servicesConfig,
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
name: 'Voir mes services',
|
name: 'Voir mes services',
|
||||||
|
|
@ -71,6 +73,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'Mes groupes',
|
section: 'Mes groupes',
|
||||||
|
enable: true,
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
name: 'Voir mes groupes',
|
name: 'Voir mes groupes',
|
||||||
|
|
@ -94,6 +97,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'Compte',
|
section: 'Compte',
|
||||||
|
enable: true,
|
||||||
links: [
|
links: [
|
||||||
{
|
{
|
||||||
name: 'Mon adresse',
|
name: 'Mon adresse',
|
||||||
|
|
@ -134,7 +138,7 @@
|
||||||
} %}
|
} %}
|
||||||
<div class="row flex-wrap">
|
<div class="row flex-wrap">
|
||||||
{% for my_account_link in my_account_links %}
|
{% for my_account_link in my_account_links %}
|
||||||
{% if my_account_link.disable is not defined %}
|
{% if my_account_link.enable %}
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
<nav class="myAccount d-flex flex-column mt-3 mt-md-5">
|
<nav class="myAccount d-flex flex-column mt-3 mt-md-5">
|
||||||
<div class="myAccount-header w-100 rounded-2">
|
<div class="myAccount-header w-100 rounded-2">
|
||||||
|
|
|
||||||
|
|
@ -358,6 +358,11 @@
|
||||||
<target>Retour</target>
|
<target>Retour</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="D4hiuPj" resname="Groups number">
|
||||||
|
<source>Groups number</source>
|
||||||
|
<target>Nombre de groupes</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</file>
|
</file>
|
||||||
</xliff>
|
</xliff>
|
||||||
|
|
|
||||||
59
translations/templates/admin/dashboard/admin.fr.xlf
Normal file
59
translations/templates/admin/dashboard/admin.fr.xlf
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||||
|
<file source-language="en" target-language="fr" datatype="plaintext" original="file.ext">
|
||||||
|
<header>
|
||||||
|
<tool tool-id="symfony" tool-name="Symfony" />
|
||||||
|
</header>
|
||||||
|
<body>
|
||||||
|
<trans-unit id="xIbdP9t" resname="templates.admin.dashboard.group">
|
||||||
|
<source>templates.admin.dashboard.group</source>
|
||||||
|
<target>Groupes</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="kjbR67l" resname="templates.admin.dashboard.group_count">
|
||||||
|
<source>templates.admin.dashboard.group_count</source>
|
||||||
|
<target>Nombre de groupe: %group_count%</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="jhQrGv7" resname="templates.admin.dashboard.users">
|
||||||
|
<source>templates.admin.dashboard.users</source>
|
||||||
|
<target>Utilisateurs</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="aml4vgY" resname="templates.admin.dashboard.month_users_count">
|
||||||
|
<source>templates.admin.dashboard.month_users_count</source>
|
||||||
|
<target>Nombre de nouveaux utilisateurs du mois: %month_users_count%</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="xhMdko2" resname="templates.admin.dashboard.user_count">
|
||||||
|
<source>templates.admin.dashboard.user_count</source>
|
||||||
|
<target>Nombre total: %user_count%</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="kjBr0ll" resname="templates.admin.dashboard.places">
|
||||||
|
<source>templates.admin.dashboard.places</source>
|
||||||
|
<target>Lieux</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="hGa6vcQ" resname="templates.admin.dashboard.month_places_count">
|
||||||
|
<source>templates.admin.dashboard.month_places_count</source>
|
||||||
|
<target>Nombre de nouveaux lieux du mois: %month_places_count%</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="om9jZug" resname="templates.admin.dashboard.place_count">
|
||||||
|
<source>templates.admin.dashboard.place_count</source>
|
||||||
|
<target>Nombre total: %place_count%</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="xIhuGv7" resname="templates.admin.dashboard.loans">
|
||||||
|
<source>templates.admin.dashboard.loans</source>
|
||||||
|
<target>Emprunts</target>
|
||||||
|
</trans-unit>
|
||||||
|
|
||||||
|
<trans-unit id="olk9wsr" resname="templates.admin.dashboard.month_requests_count">
|
||||||
|
<source>templates.admin.dashboard.month_requests_count</source>
|
||||||
|
<target>Nombre d’emprunts du mois: %month_requests_count%</target>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
||||||
Loading…
Reference in a new issue