Skip to content

Commit 387e260

Browse files
committed
Tech: migrate new_from_existing to ERB and use standard DSFR classes
Convert the view from HAML to ERB, and modernize it along the way: - .container becomes .fr-container - the chain of <br> and "> " prefixes becomes a <ul class="fr-list"> - .form and .send-wrapper, whose styles targeted form inputs this page does not have, are replaced by a DSFR spacing utility class - external links get rel=noopener noreferrer via external_link_attributes
1 parent e78224a commit 387e260

2 files changed

Lines changed: 50 additions & 42 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<% content_for(:title, "Cloner") %>
2+
3+
<div class="fr-container">
4+
<% if current_administrateur.procedures.brouillons.count == 0 %>
5+
<%= render Dsfr::CalloutComponent.new(title: nil, icon: "fr-icon-information-line", extra_class_names: "fr-my-4w") do |c| %>
6+
<% c.with_html_body do %>
7+
<p>
8+
Bienvenue, vous allez pouvoir créer une première démarche de test.
9+
Celle-ci sera visible uniquement par vous et ne sera publiée nulle
10+
part, alors pas de crainte à avoir.
11+
</p>
12+
13+
<p class="fr-mb-1w">Besoin d’aide ?</p>
14+
15+
<ul class="fr-list fr-text--md">
16+
<li>
17+
Vous pouvez
18+
<%= link_to "visionner le replay de notre webinaire", REPLAY_WEBINAIRE_URL, **external_link_attributes %>
19+
</li>
20+
21+
<li>
22+
Vous pouvez lire notre
23+
<%= link_to "documentation en ligne", ADMINISTRATEUR_TUTORIAL_URL, **external_link_attributes %>
24+
</li>
25+
26+
<li>
27+
Vous pouvez enfin nous contacter à l’adresse électronique&nbsp;:
28+
<%= mail_to CONTACT_EMAIL %>
29+
</li>
30+
</ul>
31+
<% end %>
32+
<% end %>
33+
<%= javascript_tag do %>
34+
document.addEventListener("DOMContentLoaded", function() {
35+
$crisp.push(["do", "trigger:run", ["admin-signup"]]); });
36+
<% end %>
37+
<% end %>
38+
39+
<div class="fr-my-4w">
40+
<%= link_to "Créer une nouvelle démarche de zéro", new_admin_procedure_path, id: "from-scratch", class: "fr-btn fr-btn--lg" %>
41+
</div>
42+
43+
<div class="card">
44+
<h2 class="fr-h4">
45+
Créer une nouvelle démarche à partir d’une démarche existante
46+
</h2>
47+
48+
<%= render Procedure::SearchComponent.new(grouped_procedures: @grouped_procedures) %>
49+
</div>
50+
</div>

app/views/administrateurs/procedures/new_from_existing.html.haml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)