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 22, 2024
1 parent 90e0e12 commit daaf33a
Show file tree
Hide file tree
Showing 29 changed files with 39 additions and 44 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.
19 changes: 9 additions & 10 deletions templates/common/header.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@
<div class="fr-header__logo">
<p class="fr-logo">{{ 'common.ministry'|trans|raw }}</p>
</div>
<div class="fr-header__operator">
<a href="{{ path('app_landing') }}" 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="{{ path('app_landing') }}" title="{{ 'common.site_name'|trans }}">
<a href="{{ path('app_landing') }}" title="{{ 'common.title'|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 @@ -26,11 +30,6 @@
<div class="fr-header__tools" data-testid="user-links">
<div class="fr-header__tools-links">
<ul class="fr-btns-group">
<li>
<a class="fr-btn fr-icon-file-text-line" href="{{ path('app_regulations_list') }}">
{{ 'regulation.list.title'|trans }}
</a>
</li>
{% if app.user %}
<li>
<a class="fr-btn fr-icon-edit-line" href="{{ path('app_feedback') }}">
Expand All @@ -44,12 +43,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
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testAdd(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Demande de création de compte', $crawler->filter('h2')->text());
$this->assertMetaTitle('Demande de création de compte - DiaLog', $crawler);
$this->assertMetaTitle('Demande de création de compte - Dialog', $crawler);

$saveButton = $crawler->selectButton('Envoyer');
$form = $saveButton->form();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testGet(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('public, s-maxage=86400', $client->getResponse()->headers->get('Cache-Control'));
$this->assertMetaTitle('Accessibilité : non conforme - DiaLog', $crawler);
$this->assertMetaTitle('Accessibilité : non conforme - Dialog', $crawler);
$this->assertSame('Accessibilité', $crawler->filter('h1')->text());
$this->assertStringContainsString('non conforme', $crawler->text());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function testDashboard(): void

$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('DiaLog', $crawler->filter('span.logo-custom')->text());
$this->assertSame('Dialog', $crawler->filter('span.logo-custom')->text());
}

public function testDashboardWithoutAuthentication(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testGet(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('public, s-maxage=86400', $client->getResponse()->headers->get('Cache-Control'));
$this->assertMetaTitle("Déclaration d'écoconception - DiaLog", $crawler);
$this->assertMetaTitle("Déclaration d'écoconception - Dialog", $crawler);
$this->assertSame("Déclaration d'écoconception", $crawler->filter('h1')->text());
$this->assertStringContainsString('partiellement conforme', $crawler->text());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testFeedback(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Votre avis', $crawler->filter('h1')->text());
$this->assertMetaTitle('Votre avis - DiaLog', $crawler);
$this->assertMetaTitle('Votre avis - Dialog', $crawler);

$saveButton = $crawler->selectButton('Envoyer');
$form = $saveButton->form();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testPage(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();

$this->assertMetaTitle('Collectivités - DiaLog', $crawler);
$this->assertMetaTitle('Collectivités - Dialog', $crawler);

$this->assertPageStructure([
['h1', 'Numériser votre réglementation de circulation routière avec DiaLog'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testPage(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();

$this->assertMetaTitle('Services numériques - DiaLog', $crawler);
$this->assertMetaTitle('Services numériques - Dialog', $crawler);

$this->assertPageStructure([
['h1', 'La réglementation de circulation accessible, à jour et standardisée'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testPage(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();

$this->assertMetaTitle('Usagers - DiaLog', $crawler);
$this->assertMetaTitle('Usagers - Dialog', $crawler);

$this->assertPageStructure([
['h1', 'Vous êtes sur la bonne voie !'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testGet(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('public, s-maxage=86400', $client->getResponse()->headers->get('Cache-Control'));
$this->assertMetaTitle('Mentions légales - DiaLog', $crawler);
$this->assertMetaTitle('Mentions légales - Dialog', $crawler);
$this->assertSame('Mentions légales', $crawler->filter('h1')->text());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function testGet(): void

$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertMetaTitle('Carte - DiaLog', $crawler);
$this->assertMetaTitle('Carte - Dialog', $crawler);

// Search form is present
$this->assertNotNull($crawler->selectButton('Rechercher'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testIndex(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Mon espace', $crawler->filter('h2')->text());
$this->assertMetaTitle('Mon espace - DiaLog', $crawler);
$this->assertMetaTitle('Mon espace - Dialog', $crawler);

$organizations = $crawler->filter('[data-testid="organization-list"]');
$this->assertCount(1, $organizations->filter('[data-testid="organization-detail"]'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testAdd(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Nouvel utilisateur', $crawler->filter('h2')->text());
$this->assertMetaTitle('Nouvel utilisateur - DiaLog', $crawler);
$this->assertMetaTitle('Nouvel utilisateur - Dialog', $crawler);

$saveButton = $crawler->selectButton('Sauvegarder');
$form = $saveButton->form();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testEdit(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Mathieu MARCHOIS', $crawler->filter('h2')->text());
$this->assertMetaTitle('Mathieu MARCHOIS - DiaLog', $crawler);
$this->assertMetaTitle('Mathieu MARCHOIS - Dialog', $crawler);

$saveButton = $crawler->selectButton('Sauvegarder');
$form = $saveButton->form();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testIndexAsAdmin(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Utilisateurs', $crawler->filter('h2')->text());
$this->assertMetaTitle('Utilisateurs - DiaLog', $crawler);
$this->assertMetaTitle('Utilisateurs - Dialog', $crawler);

$users = $crawler->filter('[data-testid="user-list"]');
$tr0 = $users->filter('tr')->eq(0)->filter('td');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testAdd(string $name, ?string $description, array $visas): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Ajouter un modèle', $crawler->filter('h2')->text());
$this->assertMetaTitle('Ajouter un modèle - DiaLog', $crawler);
$this->assertMetaTitle('Ajouter un modèle - Dialog', $crawler);

$saveButton = $crawler->selectButton('Sauvegarder');
$form = $saveButton->form();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testEdit(string $name, ?string $description, array $visas): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Interdiction de circulation', $crawler->filter('h2')->text());
$this->assertMetaTitle('Interdiction de circulation - DiaLog', $crawler);
$this->assertMetaTitle('Interdiction de circulation - Dialog', $crawler);

$saveButton = $crawler->selectButton('Sauvegarder');
$form = $saveButton->form();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function testIndex(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Modèles de visas', $crawler->filter('h2')->text());
$this->assertMetaTitle('Modèles de visas - DiaLog', $crawler);
$this->assertMetaTitle('Modèles de visas - Dialog', $crawler);

$users = $crawler->filter('[data-testid="visa-list"]');
$tr0 = $users->filter('tr')->eq(0)->filter('td');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testDetailDeleteProfilePage(): void
$crawler = $client->request('GET', '/mon-espace/profile/delete/detail');

$this->assertResponseStatusCodeSame(200);
$this->assertMetaTitle('Mathieu FERNANDEZ - DiaLog', $crawler);
$this->assertMetaTitle('Mathieu FERNANDEZ - Dialog', $crawler);
$this->assertSame('Suppression du compte', $crawler->filter('h2')->text());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function testEdit(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Modification du mot de passe', $crawler->filter('h2')->text());
$this->assertMetaTitle('Mathieu FERNANDEZ - DiaLog', $crawler);
$this->assertMetaTitle('Mathieu FERNANDEZ - Dialog', $crawler);

$saveButton = $crawler->selectButton('Sauvegarder');
$form = $saveButton->form();
Expand All @@ -40,7 +40,7 @@ public function testWithTooShortPsw(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Modification du mot de passe', $crawler->filter('h2')->text());
$this->assertMetaTitle('Mathieu FERNANDEZ - DiaLog', $crawler);
$this->assertMetaTitle('Mathieu FERNANDEZ - Dialog', $crawler);

$saveButton = $crawler->selectButton('Sauvegarder');
$form = $saveButton->form();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function testEdit(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Mon compte', $crawler->filter('h2')->text());
$this->assertMetaTitle('Mathieu FERNANDEZ - DiaLog', $crawler);
$this->assertMetaTitle('Mathieu FERNANDEZ - Dialog', $crawler);

$saveButton = $crawler->selectButton('Sauvegarder');
$form = $saveButton->form();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function testAdd(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Nouvel arrêté', $crawler->filter('h2')->text());
$this->assertMetaTitle('Nouvel arrêté - DiaLog', $crawler);
$this->assertMetaTitle('Nouvel arrêté - Dialog', $crawler);

$this->assertSame('Brouillon', $crawler->filter('[data-testid="status-badge"]')->text());
$this->assertSame('', $crawler->selectButton('Publier')->attr('disabled'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testNavAndPagination(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Arrêtés de circulation', $crawler->filter('h3')->text());
$this->assertMetaTitle('Arrêtés de circulation - DiaLog', $crawler);
$this->assertMetaTitle('Arrêtés de circulation - Dialog', $crawler);
$this->assertSkipLinks(
[
['Contenu', '#content'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testDraftRegulationDetailAsAdmin(): void
$this->assertSecurityHeaders();
$this->assertResponseStatusCodeSame(200);
$this->assertSame('Arrêté temporaire FO1/2023', $crawler->filter('h2')->text());
$this->assertMetaTitle('Arrêté temporaire FO1/2023 - DiaLog', $crawler);
$this->assertMetaTitle('Arrêté temporaire FO1/2023 - Dialog', $crawler);
$this->assertSame('Brouillon', $crawler->filter('[data-testid="status-badge"]')->text());

$generalInfo = $crawler->filter('[data-testid="general_info"]');
Expand Down Expand Up @@ -98,7 +98,7 @@ public function testPermanentRegulationDetail(): void
$this->assertSecurityHeaders();
$this->assertResponseStatusCodeSame(200);
$this->assertSame('Arrêté permanent FO3/2023', $crawler->filter('h2')->text());
$this->assertMetaTitle('Arrêté permanent FO3/2023 - DiaLog', $crawler);
$this->assertMetaTitle('Arrêté permanent FO3/2023 - Dialog', $crawler);

$goBackLink = $crawler->selectLink('Revenir aux arrêtés');
$this->assertSame('/regulations', $goBackLink->extract(['href'])[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function testPage(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Mot de passe oublié', $crawler->filter('h1')->text());
$this->assertMetaTitle('Mot de passe oublié - DiaLog', $crawler);
$this->assertMetaTitle('Mot de passe oublié - Dialog', $crawler);
$this->assertSame('Pour toute demande de réinitialisation de mot de passe, veuillez contacter notre équipe à l\'adresse dialog@beta.gouv.fr en précisant l\'adresse e-mail du compte que vous souhaitez réinitialiser.', $crawler->filter('p[data-testid="forgot_password_instructions"]')->text());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testLoginSuccessfully(): void
$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertSame('Connexion à DiaLog', $crawler->filter('h1')->text());
$this->assertMetaTitle('Connexion - DiaLog', $crawler);
$this->assertMetaTitle('Connexion - Dialog', $crawler);
$saveButton = $crawler->selectButton('Se connecter');
$form = $saveButton->form();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function testStatistics(): void

$this->assertResponseStatusCodeSame(200);
$this->assertSecurityHeaders();
$this->assertMetaTitle('Statistiques - DiaLog', $crawler);
$this->assertMetaTitle('Statistiques - Dialog', $crawler);
$this->assertSame('Statistiques', $crawler->filter('h1')->text());

$stats = $crawler->filter('div.fr-card');
Expand Down
8 changes: 2 additions & 6 deletions translations/messages.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@
</trans-unit>
<trans-unit id="common.title">
<source>common.title</source>
<target>DiaLog</target>
</trans-unit>
<trans-unit id="common.site_name">
<source>common.site_name</source>
<target>DiaLog</target>
<target>Dialog</target>
</trans-unit>
<trans-unit id="common.feedback">
<source>common.feedback</source>
Expand Down Expand Up @@ -2178,7 +2174,7 @@
<source>map.filters.title.type.regulation</source>
<target>Réglementation</target>
</trans-unit>

<trans-unit id="map.filter.type.noEntry">
<source>map.filter.type.noEntry</source>
<target>Interdiction de circulation</target>
Expand Down

0 comments on commit daaf33a

Please sign in to comment.