Files
grecia/app/views/verification/letter/new.html.erb
Javi Martín 9b908d7264 Extract component to render account permissions
We were using similar code in four different places; six, if we count
the welcome pages seeds. Reducing duplication in the pages seeds is a
bit tricky because administrators are supposed to edit their content and
might remove the HTML class we use to define styles. However, we can
share the code everywhere else.

Note that there's a bug in the application since we show that level 2
users cannot vote for budget projects but we give them permission to do
so in the abilities model. We're keeping the same behavior after this
refactoring but we might change it in the future.
2022-11-29 18:48:24 +01:00

51 lines
1.5 KiB
Plaintext

<div class="verification account row">
<div class="small-12 column">
<div class="text-center">
<div class="small-4 column verification-step completed">
<span class="number">1</span> <%= t("verification.step_1") %>
</div>
<div class="small-4 column verification-step completed">
<span class="number">2</span> <%= t("verification.step_2") %>
</div>
<div class="small-4 column verification-step is-active">
<span class="number">3</span> <%= t("verification.step_3") %>
</div>
<div class="progress small-12 success">
<span class="meter" style="width: 100%"></span>
</div>
</div>
<div class="small-12 medium-4 column">
<%= back_link_to account_path, t("verification.back") %>
<h1><%= t("verification.letter.new.title") %></h1>
<div class="user-permissions">
<p><%= t("verification.letter.new.user_permission_info") %></p>
<%= render Account::PermissionsListComponent.new(current_user) %>
</div>
<%= link_to t("verification.letter.new.go_to_index"), root_path, class: "button warning" %>
</div>
<div class="small-12 medium-8 column final-votes-info">
<span class="icon-box"></span>
<p><strong><%= t("verification.letter.new.explanation") %></strong></p>
<ul>
<li>
<%= t("verification.letter.new.office") %>
</li>
<li>
<%= link_to t("verification.letter.new.send_letter"), letter_path, method: :post %>
</li>
</ul>
</div>
</div>
</div>