Apply SpaceAroundErbTag ERB Lint rule

This commit is contained in:
Javi Martín
2019-06-22 16:12:08 +02:00
parent 24359f8152
commit c62da726b8
60 changed files with 70 additions and 70 deletions

View File

@@ -16,7 +16,7 @@
<div class="row"> <div class="row">
<div class="small-12 medium-7 column"> <div class="small-12 medium-7 column">
<h2><%= t("account.show.personal")%></h2> <h2><%= t("account.show.personal") %></h2>
<div class="small-12 medium-10"> <div class="small-12 medium-10">
<% if @account.organization? %> <% if @account.organization? %>
@@ -50,7 +50,7 @@
</div> </div>
<% if @account.email.present? %> <% if @account.email.present? %>
<h2><%= t("account.show.notifications")%></h2> <h2><%= t("account.show.notifications") %></h2>
<div> <div>
<%= f.label :email_on_comment do %> <%= f.label :email_on_comment do %>

View File

@@ -205,7 +205,7 @@
</li> </li>
<li <%= "class=is-active" if controller_name == "moderators" %>> <li <%= "class=is-active" if controller_name == "moderators" %>>
<%= link_to t("admin.menu.moderators"), admin_moderators_path%> <%= link_to t("admin.menu.moderators"), admin_moderators_path %>
</li> </li>
<li <%= "class=is-active" if controller_name == "valuators" %>> <li <%= "class=is-active" if controller_name == "valuators" %>>
@@ -281,7 +281,7 @@
<span class="icon-settings"></span> <span class="icon-settings"></span>
<strong><%= t("admin.menu.title_settings") %></strong> <strong><%= t("admin.menu.title_settings") %></strong>
</a> </a>
<ul <%="class=is-active" if menu_settings? %>> <ul <%= "class=is-active" if menu_settings? %>>
<li <%= "class=is-active" if controller_name == "settings" %>> <li <%= "class=is-active" if controller_name == "settings" %>>
<%= link_to t("admin.menu.settings"), admin_settings_path %> <%= link_to t("admin.menu.settings"), admin_settings_path %>
</li> </li>
@@ -300,7 +300,7 @@
</li> </li>
<li <%= "class=is-active" if controller_name == "content_blocks" %>> <li <%= "class=is-active" if controller_name == "content_blocks" %>>
<%= link_to t("admin.menu.site_customization.content_blocks"), admin_site_customization_content_blocks_path%> <%= link_to t("admin.menu.site_customization.content_blocks"), admin_site_customization_content_blocks_path %>
</li> </li>
<li <%= "class=is-active" if submenu_local_census_records? %>> <li <%= "class=is-active" if submenu_local_census_records? %>>

View File

@@ -15,7 +15,7 @@
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th> <th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
</thead> </thead>
<% @administrators.each do |administrator| %> <% @administrators.each do |administrator| %>
<tr id="<%= dom_id(administrator)%>"> <tr id="<%= dom_id(administrator) %>">
<td class="text-center"> <td class="text-center">
<%= administrator.id %> <%= administrator.id %>
</td> </td>

View File

@@ -15,7 +15,7 @@
class: "js-calendar-full", class: "js-calendar-full",
id: "post_started_at" %> id: "post_started_at" %>
</div> </div>
<% date_ended_at = @banner.post_ended_at.present? ? I18n.localize(@banner.post_ended_at) : ""%> <% date_ended_at = @banner.post_ended_at.present? ? I18n.localize(@banner.post_ended_at) : "" %>
<div class="small-12 medium-3 column end"> <div class="small-12 medium-3 column end">
<%= f.label :post_ended_at, t("admin.banners.banner.post_ended_at") %> <%= f.label :post_ended_at, t("admin.banners.banner.post_ended_at") %>
<%= f.text_field :post_ended_at, <%= f.text_field :post_ended_at,

View File

@@ -11,9 +11,9 @@
<table> <table>
<thead> <thead>
<tr id="<%= dom_id(banner) %>"> <tr id="<%= dom_id(banner) %>">
<th scope="col"><%= t("admin.banners.banner.post_started_at")%></th> <th scope="col"><%= t("admin.banners.banner.post_started_at") %></th>
<th scope="col"><%= t("admin.banners.banner.post_ended_at")%></th> <th scope="col"><%= t("admin.banners.banner.post_ended_at") %></th>
<th scope="col" class="small-4"><%= t("admin.actions.actions")%></th> <th scope="col" class="small-4"><%= t("admin.actions.actions") %></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@@ -8,7 +8,7 @@
class: "button hollow float-right clear" %> class: "button hollow float-right clear" %>
<% else %> <% else %>
<span class="button hollow disabled float-right clear"> <span class="button hollow disabled float-right clear">
<%= t("admin.budgets.winners.calculate")%> <%= t("admin.budgets.winners.calculate") %>
</span> </span>
<div class="callout warning clear"> <div class="callout warning clear">
<%= t("admin.budget_investments.index.cannot_calculate_winners") %> <%= t("admin.budget_investments.index.cannot_calculate_winners") %>

View File

@@ -9,7 +9,7 @@
</div> </div>
<div class="small-12 medium-3 column"> <div class="small-12 medium-3 column">
<%= link_to_remove_association t("admin.legislation.questions.question_option_fields.remove_option"), f, class: "delete"%> <%= link_to_remove_association t("admin.legislation.questions.question_option_fields.remove_option"), f, class: "delete" %>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -57,7 +57,7 @@
<% if can? :reject, organization %> <% if can? :reject, organization %>
<%= link_to t("admin.organizations.index.reject"), <%= link_to t("admin.organizations.index.reject"),
reject_admin_organization_path(organization, request.query_parameters), reject_admin_organization_path(organization, request.query_parameters),
method: :put, class: "button hollow alert small-5"%> method: :put, class: "button hollow alert small-5" %>
<% end %> <% end %>
</td> </td>
</tr> </tr>

View File

@@ -21,7 +21,7 @@
<tbody> <tbody>
<% @officer_assignments.each do |officer_assignment| %> <% @officer_assignments.each do |officer_assignment| %>
<tr id="<%= dom_id officer_assignment %>"> <tr id="<%= dom_id officer_assignment %>">
<td><%= l(officer_assignment.date.to_date)%> <%= content_tag :strong, t("polls.final_date") if officer_assignment.final %></td> <td><%= l(officer_assignment.date.to_date) %> <%= content_tag :strong, t("polls.final_date") if officer_assignment.final %></td>
<td><%= booth_name_with_location(officer_assignment.booth_assignment.booth) %></td> <td><%= booth_name_with_location(officer_assignment.booth_assignment.booth) %></td>
</tr> </tr>
<% end %> <% end %>

View File

@@ -1,6 +1,6 @@
<%= back_link_to %> <%= back_link_to %>
<h2><%= t("admin.stats.direct_messages.title")%></h2> <h2><%= t("admin.stats.direct_messages.title") %></h2>
<div class="stats"> <div class="stats">
<div class="row stats-numbers"> <div class="row stats-numbers">

View File

@@ -1,6 +1,6 @@
<%= back_link_to %> <%= back_link_to %>
<h2 id="top"><%= t("admin.stats.polls.title")%></h2> <h2 id="top"><%= t("admin.stats.polls.title") %></h2>
<div class="stats"> <div class="stats">
<div class="row stats-numbers"> <div class="row stats-numbers">

View File

@@ -1,6 +1,6 @@
<%= back_link_to %> <%= back_link_to %>
<h2><%= t("admin.stats.proposal_notifications.title")%></h2> <h2><%= t("admin.stats.proposal_notifications.title") %></h2>
<div class="stats"> <div class="stats">
<div class="row stats-numbers"> <div class="row stats-numbers">

View File

@@ -101,7 +101,7 @@
<p> <p>
<%= t "admin.stats.show.summary.verified_users_who_didnt_vote_proposals" %> <br> <%= t "admin.stats.show.summary.verified_users_who_didnt_vote_proposals" %> <br>
<span class="number"> <span class="number">
<%=number_with_delimiter(@user_ids_who_didnt_vote_proposals)%> <%= number_with_delimiter(@user_ids_who_didnt_vote_proposals) %>
</span> </span>
</p> </p>
</div> </div>

View File

@@ -51,7 +51,7 @@
budget_investments_path(budget_id: investment.budget_id, budget_investments_path(budget_id: investment.budget_id,
heading_id: investment.heading_id)) %> heading_id: investment.heading_id)) %>
<% change_ballot = link_to(t("budgets.ballots.reasons_for_not_balloting.change_ballot"), <% change_ballot = link_to(t("budgets.ballots.reasons_for_not_balloting.change_ballot"),
budget_ballot_path(@budget))%> budget_ballot_path(@budget)) %>
<p> <p>
<small> <small>

View File

@@ -6,7 +6,7 @@
<div class="comment-info"> <div class="comment-info">
<span class="user-name"> <span class="user-name">
<%= link_to participant.name, user_path(participant)%> <%= link_to participant.name, user_path(participant) %>
</span> </span>
<% if author?(@community, participant) %> <% if author?(@community, participant) %>

View File

@@ -7,7 +7,7 @@
<% @featured_debates.each do |debate| %> <% @featured_debates.each do |debate| %>
<div class="small-12 medium-6 column end"> <div class="small-12 medium-6 column end">
<h3><%= link_to debate.title, debate %></h3> <h3><%= link_to debate.title, debate %></h3>
<%= link_to debate.author.name, user_path(debate.author)%> <%= link_to debate.author.name, user_path(debate.author) %>
</div> </div>
<% end %> <% end %>
</div> </div>

View File

@@ -34,7 +34,7 @@
placeholder: t("debates.form.tags_placeholder"), placeholder: t("debates.form.tags_placeholder"),
aria: {describedby: "tag-list-help-text"}, aria: {describedby: "tag-list-help-text"},
data: {js_url: suggest_tags_path}, data: {js_url: suggest_tags_path},
class: "tag-autocomplete"%> class: "tag-autocomplete" %>
</div> </div>
<div class="small-12 column"> <div class="small-12 column">
<% if @debate.new_record? %> <% if @debate.new_record? %>

View File

@@ -49,7 +49,7 @@
<%= t("votes.organizations") %> <%= t("votes.organizations") %>
</p> </p>
</div> </div>
<% elsif user_signed_in? && !debate.votable_by?(current_user)%> <% elsif user_signed_in? && !debate.votable_by?(current_user) %>
<div class="participation-not-allowed" style="display:none" aria-hidden="false"> <div class="participation-not-allowed" style="display:none" aria-hidden="false">
<p> <p>
<%= t("votes.anonymous", <%= t("votes.anonymous",

View File

@@ -1,4 +1,4 @@
<li id="<%= dom_id(document)%>"> <li id="<%= dom_id(document) %>">
<%= link_to t("documents.buttons.download_document"), <%= link_to t("documents.buttons.download_document"),
document.attachment.url, target: "_blank", document.attachment.url, target: "_blank",
rel: "nofollow", class: "button hollow medium float-right" %> rel: "nofollow", class: "button hollow medium float-right" %>

View File

@@ -2,7 +2,7 @@
<%= f.label :documents, t("documents.form.title") %> <%= f.label :documents, t("documents.form.title") %>
<p class="help-text"><%= documentables_note(documentable) %></p> <p class="help-text"><%= documentables_note(documentable) %></p>
<div id="nested-documents" data-max-documents-allowed="<%= documentable.class.max_documents_allowed%>"> <div id="nested-documents" data-max-documents-allowed="<%= documentable.class.max_documents_allowed %>">
<%= f.fields_for :documents do |documents_builder| %> <%= f.fields_for :documents do |documents_builder| %>
<%= render "documents/document_fields", f: documents_builder %> <%= render "documents/document_fields", f: documents_builder %>
<% end %> <% end %>

View File

@@ -12,7 +12,7 @@
<div class="expanded row admin-top-bar"> <div class="expanded row admin-top-bar">
<div class="title-bar" data-responsive-toggle="responsive_menu" data-hide-for="medium"> <div class="title-bar" data-responsive-toggle="responsive_menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle="responsive_menu"></button> <button class="menu-icon" type="button" data-toggle="responsive_menu"></button>
<div class="title-bar-title"><%= t("application.menu")%></div> <div class="title-bar-title"><%= t("application.menu") %></div>
</div> </div>
<div class="top-bar"> <div class="top-bar">

View File

@@ -17,7 +17,7 @@
<span data-responsive-toggle="responsive-menu" data-hide-for="medium" class="float-right"> <span data-responsive-toggle="responsive-menu" data-hide-for="medium" class="float-right">
<span class="menu-icon dark" data-toggle></span> <span class="menu-icon dark" data-toggle></span>
<%= t("application.menu")%> <%= t("application.menu") %>
</span> </span>
<div class="top-bar-title"> <div class="top-bar-title">

View File

@@ -1 +1 @@
<meta name="tracking_data" data-track-usertype="<%=current_user ? current_user.user_type : :anonymous%>" <%= yield(:track_event) %>/> <meta name="tracking_data" data-track-usertype="<%= current_user ? current_user.user_type : :anonymous %>" <%= yield(:track_event) %>/>

View File

@@ -19,7 +19,7 @@
<%= t("votes.organizations") %> <%= t("votes.organizations") %>
</p> </p>
</div> </div>
<% elsif user_signed_in? && !proposal.votable_by?(current_user)%> <% elsif user_signed_in? && !proposal.votable_by?(current_user) %>
<div class="participation-not-allowed" style="display:none" aria-hidden="false"> <div class="participation-not-allowed" style="display:none" aria-hidden="false">
<p> <p>
<%= t("votes.verified_only", <%= t("votes.verified_only",

View File

@@ -18,6 +18,6 @@
<%= t("officing.menu.total_recounts") %> <%= t("officing.menu.total_recounts") %>
<% end %> <% end %>
</li> </li>
<% end%> <% end %>
</ul> </ul>
</div> </div>

View File

@@ -6,7 +6,7 @@
<div class="small-12 medium-9 column"> <div class="small-12 medium-9 column">
<h1><%= @custom_page.title %></h1> <h1><%= @custom_page.title %></h1>
<% if @custom_page.subtitle.present? %> <% if @custom_page.subtitle.present? %>
<h2><%= @custom_page.subtitle%></h2> <h2><%= @custom_page.subtitle %></h2>
<% end %> <% end %>
<%= safe_html_with_links AdminWYSIWYGSanitizer.new.sanitize(@custom_page.content) %> <%= safe_html_with_links AdminWYSIWYGSanitizer.new.sanitize(@custom_page.content) %>

View File

@@ -19,7 +19,7 @@
<%= t("votes.organizations") %> <%= t("votes.organizations") %>
</p> </p>
</div> </div>
<% elsif user_signed_in? && !proposal.votable_by?(current_user)%> <% elsif user_signed_in? && !proposal.votable_by?(current_user) %>
<div class="participation-not-allowed" style="display:none" aria-hidden="false"> <div class="participation-not-allowed" style="display:none" aria-hidden="false">
<p> <p>
<%= t("votes.verified_only", <%= t("votes.verified_only",

View File

@@ -6,7 +6,7 @@
<h1><%= t("proposals.new.start_new") %></h1> <h1><%= t("proposals.new.start_new") %></h1>
<div data-alert class="callout primary"> <div data-alert class="callout primary">
<%= link_to help_path(anchor: "proposals"), title: t("shared.target_blank_html"), target: "_blank" do %> <%= link_to help_path(anchor: "proposals"), title: t("shared.target_blank_html"), target: "_blank" do %>
<%= t("proposals.new.more_info")%> <%= t("proposals.new.more_info") %>
<% end %> <% end %>
</div> </div>
<%= render "proposals/form", form_url: proposals_url %> <%= render "proposals/form", form_url: proposals_url %>

View File

@@ -2,7 +2,7 @@
<% @related_contents.compact.each do |related| %> <% @related_contents.compact.each do |related| %>
<li id="related-content-<%= related.find_related_content(relationable).id %>"> <li id="related-content-<%= related.find_related_content(relationable).id %>">
<% related_content = related.find_related_content(relationable) %> <% related_content = related.find_related_content(relationable) %>
<% if current_user && related_content.author != current_user && !related_content.scored_by_user?(current_user)%> <% if current_user && related_content.author != current_user && !related_content.scored_by_user?(current_user) %>
<span id="<%= dom_id(related.find_related_content(relationable)) %>" class="js-score-actions score-actions"> <span id="<%= dom_id(related.find_related_content(relationable)) %>" class="js-score-actions score-actions">
<%= render "relationable/score", related: related_content %> <%= render "relationable/score", related: related_content %>
</span> </span>

View File

@@ -1,4 +1,4 @@
<% description = local_assigns[:social_description] || setting["meta_description"]%> <% description = local_assigns[:social_description] || setting["meta_description"] %>
<% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %> <% description = truncate(ActionView::Base.full_sanitizer.sanitize(description), length: 140) %>
<!-- Twitter --> <!-- Twitter -->
<meta name="twitter:card" content="summary"/> <meta name="twitter:card" content="summary"/>

View File

@@ -13,7 +13,7 @@
image: local_assigns.fetch(:image_url, ""), image: local_assigns.fetch(:image_url, ""),
desc: description, desc: description,
"data-twitter-title": local_assigns[:mobile], "data-twitter-title": local_assigns[:mobile],
"data-telegram-title": local_assigns[:mobile])%> "data-telegram-title": local_assigns[:mobile]) %>
<a href="whatsapp://send?text=<%= mobile_url %><%= url %>" <a href="whatsapp://send?text=<%= mobile_url %><%= url %>"
class="show-for-small-only" data-action="share/whatsapp/share"> class="show-for-small-only" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span> <span class="icon-whatsapp whatsapp"></span>

View File

@@ -5,7 +5,7 @@
<strong> <strong>
<%= t("shared.suggest.#{resource_name}.found", <%= t("shared.suggest.#{resource_name}.found",
count: @resources.count, count: @resources.count,
query: @search_terms)%> query: @search_terms) %>
</strong> </strong>
</p> </p>
@@ -24,7 +24,7 @@
limit: @limit) %> limit: @limit) %>
</strong> </strong>
<%= link_to t("shared.suggest.#{resource_name}.see_all"), <%= link_to t("shared.suggest.#{resource_name}.see_all"),
polymorphic_url(resource_model, search: @search_terms)%> polymorphic_url(resource_model, search: @search_terms) %>
</p> </p>
<% end %> <% end %>

View File

@@ -1,5 +1,5 @@
<div class="row verify"> <div class="row verify">
<%track_event(category: "verification", action: "edit_letter" )%> <% track_event(category: "verification", action: "edit_letter" ) %>
<div class="small-12 medium-9 large-6 small-centered column"> <div class="small-12 medium-9 large-6 small-centered column">
<div class="text-center"> <div class="text-center">
<h1> <h1>

View File

@@ -1,5 +1,5 @@
<div class="verification account row"> <div class="verification account row">
<%track_event(category: "verification", action: "success_sms" )%> <% track_event(category: "verification", action: "success_sms" ) %>
<div class="small-12 column"> <div class="small-12 column">
<div class="text-center"> <div class="text-center">

View File

@@ -1,5 +1,5 @@
<div class="row"> <div class="row">
<%track_event(category: "verification", action: "start_letter" )%> <% track_event(category: "verification", action: "start_letter" ) %>
<div class="small-12 column"> <div class="small-12 column">
<%= back_link_to account_path, t("verification.back") %> <%= back_link_to account_path, t("verification.back") %>

View File

@@ -1,5 +1,5 @@
<div class="verification account row"> <div class="verification account row">
<%track_event(category: "verification", action: "start_census" )%> <% track_event(category: "verification", action: "start_census" ) %>
<div class="small-12 column"> <div class="small-12 column">
<div class="text-center"> <div class="text-center">

View File

@@ -1,5 +1,5 @@
<div class="verification account row"> <div class="verification account row">
<%track_event(category: "verification", action: "start_sms" )%> <% track_event(category: "verification", action: "start_sms" ) %>
<div class="small-12 column"> <div class="small-12 column">
<div class="text-center"> <div class="text-center">

View File

@@ -1,5 +1,5 @@
<div class="verification account row"> <div class="verification account row">
<%track_event(category: "verification", action: "success_census" )%> <% track_event(category: "verification", action: "success_census" ) %>
<div class="small-12 column"> <div class="small-12 column">
<div class="text-center"> <div class="text-center">