Use HTML beautifier to indent ERB files

We had inconsistent indentation in many places. Now we're fixing them
and adding a linter to our CI so we don't accidentally introduce
inconsistent indentations again.
This commit is contained in:
Javi Martín
2025-02-20 18:41:46 +01:00
parent b4b33926cf
commit b51aa31e6a
66 changed files with 574 additions and 558 deletions

View File

@@ -29,31 +29,31 @@
</tr>
</thead>
<tbody>
<% @process.draft_versions.each do |draft_version| %>
<tr id="<%= dom_id(draft_version) %>">
<td>
<%= link_to draft_version.title, edit_admin_legislation_process_draft_version_path(@process, draft_version) %>
</td>
<td><%= draft_version.created_at.to_date %></td>
<td>
<% if draft_version.status == "draft" %>
<%= Legislation::DraftVersion.human_attribute_name(:status_draft) %>
<%= link_to "(#{t("admin.legislation.draft_versions.index.preview")})",
legislation_process_draft_version_path(@process, draft_version) %>
<% else %>
<%= Legislation::DraftVersion.human_attribute_name(:status_published) %>
<% end %>
</td>
<td class="text-center"><%= draft_version.total_comments %></td>
<td class="text-center">
<% if draft_version.final_version %>
<span class="icon-check" title="<%= draft_version.final_version %>"></span>
<% else %>
<span class="icon-x delete" title="<%= draft_version.final_version %>"></span>
<% end %>
</td>
</tr>
<% end %>
<% @process.draft_versions.each do |draft_version| %>
<tr id="<%= dom_id(draft_version) %>">
<td>
<%= link_to draft_version.title, edit_admin_legislation_process_draft_version_path(@process, draft_version) %>
</td>
<td><%= draft_version.created_at.to_date %></td>
<td>
<% if draft_version.status == "draft" %>
<%= Legislation::DraftVersion.human_attribute_name(:status_draft) %>
<%= link_to "(#{t("admin.legislation.draft_versions.index.preview")})",
legislation_process_draft_version_path(@process, draft_version) %>
<% else %>
<%= Legislation::DraftVersion.human_attribute_name(:status_published) %>
<% end %>
</td>
<td class="text-center"><%= draft_version.total_comments %></td>
<td class="text-center">
<% if draft_version.final_version %>
<span class="icon-check" title="<%= draft_version.final_version %>"></span>
<% else %>
<span class="icon-x delete" title="<%= draft_version.final_version %>"></span>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>

View File

@@ -18,7 +18,7 @@
<% if @process.questions.any? %>
<table class="stack">
<thead>
<thead>
<tr>
<th><%= t("admin.legislation.questions.table.title") %></th>
<th><%= t("admin.legislation.questions.table.question_options") %></th>
@@ -27,22 +27,22 @@
</tr>
</thead>
<tbody>
<% @process.questions.each do |question| %>
<tr id="<%= dom_id(question) %>">
<td>
<%= link_to question.title, edit_admin_legislation_process_question_path(@process, question) %>
</td>
<td>
<ul>
<% question.question_options.each do |question_option| %>
<li><%= "#{question_option.value} (#{question_option.answers_count})" %></li>
<% end %>
</ul>
</td>
<td class="text-center"><%= question.answers_count %></td>
<td class="text-center"><%= link_to question.comments.count, legislation_process_question_path(@process, question, anchor: "comments") %></td>
</tr>
<% end %>
<% @process.questions.each do |question| %>
<tr id="<%= dom_id(question) %>">
<td>
<%= link_to question.title, edit_admin_legislation_process_question_path(@process, question) %>
</td>
<td>
<ul>
<% question.question_options.each do |question_option| %>
<li><%= "#{question_option.value} (#{question_option.answers_count})" %></li>
<% end %>
</ul>
</td>
<td class="text-center"><%= question.answers_count %></td>
<td class="text-center"><%= link_to question.comments.count, legislation_process_question_path(@process, question, anchor: "comments") %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>