Skip to content

Commit

Permalink
display id of habilitation next to the date
Browse files Browse the repository at this point in the history
  • Loading branch information
JeSuisUnCaillou committed Jan 15, 2025
1 parent a0c2c73 commit 6fabd33
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

<% if @authorization.present? %>
<li>
<span class="fr-badge fr-badge--no-icon"><%= t("authorization.badge", date: @authorization.created_at.strftime('%d/%m/%Y')) %></span>
<span class="fr-badge fr-badge--no-icon"><%= t("authorization.id_badge", id: @authorization.id) %></span>
</li>
<li>
<span class="fr-badge fr-badge--no-icon"><%= t("authorization.date_badge", date: @authorization.created_at.strftime('%d/%m/%Y')) %></span>
</li>
<% elsif @authorization_request.persisted? %>
<li>
Expand Down
25 changes: 15 additions & 10 deletions app/views/instruction/authorizations/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@
<% @authorizations.each do |authorization| %>
<li class="authorization-row fr-mb-4w fr-pb-2w">
<div class="fr-grid-row fr-grid-row--middle">
<div class="fr-pr-2w fr-col">
<span class="fr-mr-2w fr-my-1w">
<strong><%= authorization.id %></strong>
</span>

<span class="fr-my-1w fr-badge fr-badge--no-icon">
<%= t("authorization.badge", date: authorization.created_at.strftime('%d/%m/%Y')) %>
</span>
<ul class="fr-badge-group fr-col">
<li>
<span class="fr-badge fr-badge--no-icon">
<%= t("authorization.id_badge", id: authorization.id) %>
</span>
</li>
<li>
<span class="fr-badge fr-badge--no-icon">
<%= t("authorization.date_badge", date: authorization.created_at.strftime('%d/%m/%Y')) %>
</span>
</li>

<% if authorization.definition.stage.exists? %>
<%= authorization_stage_badge(authorization, css_class: "fr-my-1w fr-ml-1w") %>
<li>
<%= authorization_stage_badge(authorization) %>
</li>
<% end %>
</div>
</ul>

<div>
<%= link_to t('.show_cta'), authorization_request_authorization_path(@authorization_request, authorization), class: "fr-btn" %>
Expand Down
3 changes: 2 additions & 1 deletion config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ fr:
france_connect_eidas: niveau-eidas

authorization:
badge: habilitation du %{date}
id_badge: habilitation N°%{id}
date_badge: du %{date}

malware_scan:
badge_class:
Expand Down

0 comments on commit 6fabd33

Please sign in to comment.