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

@@ -19,9 +19,9 @@
officing_poll_ballot_sheets_path(poll),
class: "button" %>
<%= link_to t("officing.polls.final.add_results"),
new_officing_poll_ballot_sheet_path(poll),
class: "button hollow" %>
<%= link_to t("officing.polls.final.add_results"),
new_officing_poll_ballot_sheet_path(poll),
class: "button hollow" %>
<% else %>
<%= link_to t("officing.polls.final.add_results"),
new_officing_poll_result_path(poll),

View File

@@ -81,7 +81,7 @@
<%= results_by_booth[booth_assignment].first.booth_assignment.booth.name %>
</td>
<td>
<%= link_to t("officing.results.new.see_results"), officing_poll_results_path(@poll, date: l(date), booth_assignment_id: booth_assignment) %>
<%= link_to t("officing.results.new.see_results"), officing_poll_results_path(@poll, date: l(date), booth_assignment_id: booth_assignment) %>
</td>
</tr>
<% end %>

View File

@@ -9,10 +9,10 @@
method: :post,
remote: true,
html: { id: "new_officing_voter" } do |f| %>
<%= f.hidden_field :poll_id, value: poll.id %>
<%= f.hidden_field :user_id, value: @user.id %>
<%= f.submit t("officing.voters.show.submit"),
class: "button success",
data: { disable_with: t("officing.voters.can_vote.submit_disable_with") } %>
<%= f.hidden_field :poll_id, value: poll.id %>
<%= f.hidden_field :user_id, value: @user.id %>
<%= f.submit t("officing.voters.show.submit"),
class: "button success",
data: { disable_with: t("officing.voters.can_vote.submit_disable_with") } %>
<% end %>
</td>

View File

@@ -13,18 +13,18 @@
</thead>
<tbody>
<% @polls.each do |poll| %>
<tr id="<%= dom_id(poll) %>">
<td>
<%= poll.name %>
</td>
<% if poll.votable_by?(@user) %>
<%= render "can_vote", poll: poll %>
<% elsif poll.voted_by?(@user) || poll.user_has_an_online_ballot?(@user) %>
<%= render "already_voted" %>
<% else %>
<%= render "cannot_vote" %>
<% end %>
</tr>
<tr id="<%= dom_id(poll) %>">
<td>
<%= poll.name %>
</td>
<% if poll.votable_by?(@user) %>
<%= render "can_vote", poll: poll %>
<% elsif poll.voted_by?(@user) || poll.user_has_an_online_ballot?(@user) %>
<%= render "already_voted" %>
<% else %>
<%= render "cannot_vote" %>
<% end %>
</tr>
<% end %>
</tbody>
</table>