Skip to content

Commit

Permalink
Intégration du nouveau header
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarchois committed Oct 23, 2024
1 parent cbe5185 commit 93ce178
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 21 deletions.
Binary file added public/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 10 additions & 5 deletions templates/common/header.html.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% set mainPath = app.user ? path('app_regulations_list') : path('app_landing') %}
<header role="banner" class="fr-header">
<div class="fr-header__body">
<div class="fr-container">
Expand All @@ -7,17 +8,21 @@
<div class="fr-header__logo">
<p class="fr-logo">{{ 'common.ministry'|trans|raw }}</p>
</div>
<div class="fr-header__operator">
<a href="{{ mainPath }}" title="{{ 'common.title'|trans }}">
<img class="fr-responsive-img" src="{{ asset('images/logo.png') }}" alt="{{ 'common.title'|trans }}" />
</a>
</div>
<div class="fr-header__navbar">
<button class="fr-btn--menu fr-btn" data-fr-opened="false" aria-controls="modal-499" aria-haspopup="menu" id="button-500" title="Menu">
{{ 'common.menu'|trans }}
</button>
</div>
</div>
<div class="fr-header__service">
<a href="{{ app.user ? path('app_regulations_list') : path('app_landing') }}" title="{{ 'common.site_name'|trans }}">
<a href="{{ mainPath }}" title="{{ 'common.site_name'|trans }}">
<p class="fr-header__service-title">
{{ 'common.site_name'|trans }}
<span class="fr-badge fr-badge--new">bêta</span>
{{ 'common.title'|trans }}
</p>
</a>
<p class="fr-header__service-tagline">{{ 'common.baseline'|trans }}</p>
Expand All @@ -39,12 +44,12 @@
</li>
{% else %}
<li>
<a class="fr-btn fr-icon-user-fill" href="{{ path('app_access_request') }}">
<a class="fr-btn fr-icon-user-line fr-btn--secondary" href="{{ path('app_access_request') }}">
{{ 'common.accessRequest'|trans }}
</a>
</li>
<li>
<a class="fr-btn fr-icon-lock-line" href="{{ path('app_login') }}">
<a class="fr-btn" href="{{ path('app_login') }}">
{{ 'common.login'|trans }}
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'layouts/layout.html.twig' %}
{% extends 'layouts/public.html.twig' %}

{% block title %}
{{ parent() }}
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Domain/Regulation/RegulationOrderRecordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function testGetters(): void
$organization
->expects(self::once())
->method('getName')
->willReturn('Dialog');
->willReturn('DiaLog');
$regulationOrder = $this->createMock(RegulationOrder::class);
$regulationOrderRecord = new RegulationOrderRecord(
'6598fd41-85cb-42a6-9693-1bc45f4dd392',
Expand All @@ -39,7 +39,7 @@ public function testGetters(): void
$this->assertSame($regulationOrder, $regulationOrderRecord->getRegulationOrder());
$this->assertSame($organization, $regulationOrderRecord->getOrganization());
$this->assertSame('4cea911e-edbc-49f1-a855-7a38d21e1209', $regulationOrderRecord->getOrganizationUuid());
$this->assertSame('Dialog', $regulationOrderRecord->getOrganizationName());
$this->assertSame('DiaLog', $regulationOrderRecord->getOrganizationName());
$this->assertSame(RegulationOrderRecordSourceEnum::DIALOG->value, $regulationOrderRecord->getSource());
$this->assertSame($createdAt, $regulationOrderRecord->getCreatedAt());
$this->assertSame(RegulationOrderRecordStatusEnum::PUBLISHED->value, $regulationOrderRecord->getStatus());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testCanEdit(): void
->expects(self::once())
->method('getUserOrganizations')
->willReturn([
new UserOrganizationView('c1790745-b915-4fb5-96e7-79b104092a55', 'Dialog', [OrganizationRolesEnum::ROLE_ORGA_ADMIN->value]),
new UserOrganizationView('c1790745-b915-4fb5-96e7-79b104092a55', 'DiaLog', [OrganizationRolesEnum::ROLE_ORGA_ADMIN->value]),
]);

$pattern = new CanUserEditOrganization();
Expand All @@ -46,7 +46,7 @@ public function testCannotEdit(): void
->expects(self::once())
->method('getUserOrganizations')
->willReturn([
new UserOrganizationView('c1790745-b915-4fb5-96e7-79b104092a55', 'Dialog', [OrganizationRolesEnum::ROLE_ORGA_CONTRIBUTOR->value]),
new UserOrganizationView('c1790745-b915-4fb5-96e7-79b104092a55', 'DiaLog', [OrganizationRolesEnum::ROLE_ORGA_CONTRIBUTOR->value]),
]);

$pattern = new CanUserEditOrganization();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testCanPublish(): void
->expects(self::once())
->method('getUserOrganizations')
->willReturn([
new UserOrganizationView('c1790745-b915-4fb5-96e7-79b104092a55', 'Dialog', [OrganizationRolesEnum::ROLE_ORGA_PUBLISHER->value]),
new UserOrganizationView('c1790745-b915-4fb5-96e7-79b104092a55', 'DiaLog', [OrganizationRolesEnum::ROLE_ORGA_PUBLISHER->value]),
]);

$pattern = new CanUserPublishRegulation();
Expand All @@ -59,7 +59,7 @@ public function testCannotPublish(): void
->expects(self::once())
->method('getUserOrganizations')
->willReturn([
new UserOrganizationView('c1790745-b915-4fb5-96e7-79b104092a55', 'Dialog', [OrganizationRolesEnum::ROLE_ORGA_CONTRIBUTOR->value]),
new UserOrganizationView('c1790745-b915-4fb5-96e7-79b104092a55', 'DiaLog', [OrganizationRolesEnum::ROLE_ORGA_CONTRIBUTOR->value]),
]);

$pattern = new CanUserPublishRegulation();
Expand Down
14 changes: 5 additions & 9 deletions translations/messages.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@
<source>common.title</source>
<target>DiaLog</target>
</trans-unit>
<trans-unit id="common.site_name">
<source>common.site_name</source>
<target>DiaLog</target>
</trans-unit>
<trans-unit id="common.feedback">
<source>common.feedback</source>
<target>Votre avis</target>
Expand Down Expand Up @@ -482,7 +478,7 @@
</trans-unit>
<trans-unit id="regulation.general_info.visas_and_reasons.description">
<source>regulation.general_info.visas_and_reasons.description</source>
<target>Vous pouvez exporter votre arrêté de circulation à partir de Dialog, pour cela vous devez spécifier les visas (Vu le ...) et les motifs (Considérant...).</target>
<target>Vous pouvez exporter votre arrêté de circulation à partir de DiaLog, pour cela vous devez spécifier les visas (Vu le ...) et les motifs (Considérant...).</target>
</trans-unit>
<trans-unit id="regulation.general_info.identifier">
<source>regulation.general_info.identifier</source>
Expand Down Expand Up @@ -921,15 +917,15 @@
</trans-unit>
<trans-unit id="profile.delete.help">
<source>profile.delete.help</source>
<target>Vous pouvez à tout moment décider de supprimer votre compte Dialog.</target>
<target>Vous pouvez à tout moment décider de supprimer votre compte DiaLog.</target>
</trans-unit>
<trans-unit id="profile.delete.details">
<source>profile.delete.details</source>
<target>Si vous supprimez votre compte : </target>
</trans-unit>
<trans-unit id="profile.delete.first.item">
<source>profile.delete.first.item</source>
<target>Vous n’aurez plus accès à l’édition des arrêtés dans Dialog pour votre organisation.</target>
<target>Vous n’aurez plus accès à l’édition des arrêtés dans DiaLog pour votre organisation.</target>
</trans-unit>
<trans-unit id="profile.delete.second.item">
<source>profile.delete.second.item</source>
Expand Down Expand Up @@ -1319,7 +1315,7 @@
<trans-unit id="landing.digital_services.qualitative_data.description3">
<source>landing.digital_services.qualitative_data.description3</source>
<target><![CDATA[<strong>]]>Au bon format :<![CDATA[</strong>]]> les données sont accessibles au format XML via le <![CDATA[<a href="https://transport.data.gouv.fr" target="_blank" rel="noopener">]]>point
d’accès national aux données de transport<![CDATA[</a>]]>. Dialog utilise le standard <![CDATA[<a href="https://www.datex2.eu" target="_blank" rel="noopener">]]>DATEX II<![CDATA[</a>]]>
d’accès national aux données de transport<![CDATA[</a>]]>. DiaLog utilise le standard <![CDATA[<a href="https://www.datex2.eu" target="_blank" rel="noopener">]]>DATEX II<![CDATA[</a>]]>
afin d’être facilement intégrable dans votre solution numérique. D’autres
formats sont en cours d’élaboration.</target>
</trans-unit>
Expand Down Expand Up @@ -1369,7 +1365,7 @@
</trans-unit>
<trans-unit id="landing.digital_services.deployment.description">
<source>landing.digital_services.deployment.description</source>
<target>Dialog se donne 3 ans pour devenir la <![CDATA[<strong>]]>solution de référence d’accès à la
<target>DiaLog se donne 3 ans pour devenir la <![CDATA[<strong>]]>solution de référence d’accès à la
réglementation routière<![CDATA[</strong>]]> :</target>
</trans-unit>
<trans-unit id="landing.digital_services.deployment.test.title">
Expand Down

0 comments on commit 93ce178

Please sign in to comment.