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

View File

@@ -205,7 +205,7 @@
</li>
<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 <%= "class=is-active" if controller_name == "valuators" %>>
@@ -281,7 +281,7 @@
<span class="icon-settings"></span>
<strong><%= t("admin.menu.title_settings") %></strong>
</a>
<ul <%="class=is-active" if menu_settings? %>>
<ul <%= "class=is-active" if menu_settings? %>>
<li <%= "class=is-active" if controller_name == "settings" %>>
<%= link_to t("admin.menu.settings"), admin_settings_path %>
</li>
@@ -300,7 +300,7 @@
</li>
<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 <%= "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>
</thead>
<% @administrators.each do |administrator| %>
<tr id="<%= dom_id(administrator)%>">
<tr id="<%= dom_id(administrator) %>">
<td class="text-center">
<%= administrator.id %>
</td>

View File

@@ -15,7 +15,7 @@
class: "js-calendar-full",
id: "post_started_at" %>
</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">
<%= f.label :post_ended_at, t("admin.banners.banner.post_ended_at") %>
<%= f.text_field :post_ended_at,
@@ -40,7 +40,7 @@
<%= translations_form.text_field :description,
placeholder: t("admin.banners.banner.description"),
data: {js_banner_description: "js_banner_description"},
label: t("admin.banners.banner.description") %>
label: t("admin.banners.banner.description") %>
</div>
<% end %>
</div>

View File

@@ -11,9 +11,9 @@
<table>
<thead>
<tr id="<%= dom_id(banner) %>">
<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" class="small-4"><%= t("admin.actions.actions")%></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" class="small-4"><%= t("admin.actions.actions") %></th>
</tr>
</thead>
<tbody>

View File

@@ -8,7 +8,7 @@
class: "button hollow float-right clear" %>
<% else %>
<span class="button hollow disabled float-right clear">
<%= t("admin.budgets.winners.calculate")%>
<%= t("admin.budgets.winners.calculate") %>
</span>
<div class="callout warning clear">
<%= t("admin.budget_investments.index.cannot_calculate_winners") %>
@@ -27,7 +27,7 @@
<table class="table-for-mobile column-selecteable">
<thead>
<tr>
<th><%= link_to_investments_sorted_by :id %></th>
<th><%= link_to_investments_sorted_by :id %></th>
<th data-field="title"><%= link_to_investments_sorted_by :title %></th>
<th data-field="supports"><%= link_to_investments_sorted_by :supports %></th>
<th data-field="admin"><%= t("admin.budget_investments.index.list.admin") %></th>

View File

@@ -38,7 +38,7 @@
<td>
<% if draft_version.status == "draft" %>
<%= t("admin.legislation.draft_versions.statuses.draft") %>
<%= link_to "(#{t(".preview")})", legislation_process_draft_version_path(@process, draft_version) %>
<%= link_to "(#{t(".preview")})", legislation_process_draft_version_path(@process, draft_version) %>
<% else %>
<%= t("admin.legislation.draft_versions.statuses.published") %>
<% end %>

View File

@@ -9,7 +9,7 @@
</div>
<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>

View File

@@ -57,7 +57,7 @@
<% if can? :reject, organization %>
<%= link_to t("admin.organizations.index.reject"),
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 %>
</td>
</tr>

View File

@@ -67,7 +67,7 @@
<tbody>
<tr>
<td class="text-center" id="total_final">
<%= total_recounts_by_booth(@booth_assignment) || "-" %>
<%= total_recounts_by_booth(@booth_assignment) || "-" %>
</td>
<% unless @poll.recounts_confirmed? %>

View File

@@ -21,7 +21,7 @@
<tbody>
<% @officer_assignments.each do |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>
</tr>
<% end %>

View File

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

View File

@@ -1,6 +1,6 @@
<%= 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="row stats-numbers">

View File

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

View File

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

View File

@@ -4,7 +4,7 @@
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
<div class="small-12 medium-6">
<%= f.label :name, t("admin.tags.name.placeholder") %>
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
</div>
<%= f.submit(t("admin.tags.create"), class: "button success") %>

View File

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

View File

@@ -21,7 +21,7 @@
<%= render "/budgets/investments/header" %>
<% end %>
<% if params[:search].present? || params[:advanced_search].present? %>
<% if params[:search].present? || params[:advanced_search].present? %>
<div class="highlight no-margin-top padding margin-bottom">
<div class="row">
<div class="small-12 column">

View File

@@ -29,7 +29,7 @@
<% @comment_tree.root_comments.each do |comment| %>
<%= render "comments/comment", { comment: comment,
valuation: valuation,
allow_comments: allow_comments } %>
allow_comments: allow_comments } %>
<% end %>
<%= paginate @comment_tree.root_comments %>
</div>

View File

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

View File

@@ -21,7 +21,7 @@
<% end %>
<% @comment_tree.root_comments.each do |comment| %>
<%= render "comments/comment", comment: comment %>
<%= render "comments/comment", comment: comment %>
<% end %>
<%= paginate @comment_tree.root_comments %>
</div>

View File

@@ -7,7 +7,7 @@
<% @featured_debates.each do |debate| %>
<div class="small-12 medium-6 column end">
<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>
<% end %>
</div>

View File

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

View File

@@ -49,7 +49,7 @@
<%= t("votes.organizations") %>
</p>
</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">
<p>
<%= t("votes.anonymous",

View File

@@ -12,7 +12,7 @@
<div class="field">
<%= f.password_field :password_confirmation, autocomplete: "off",
label: t("devise_views.passwords.edit.password_confirmation_label") %>
label: t("devise_views.passwords.edit.password_confirmation_label") %>
</div>
<div class="actions">

View File

@@ -10,6 +10,6 @@
</div>
<h1><%= @direct_message.title %></h1>
<p><%= simple_format text_with_links(@direct_message.body), {}, sanitize: false %></p>
<p><%= simple_format text_with_links(@direct_message.body), {}, sanitize: false %></p>
</div>
</div>

View File

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

View File

@@ -2,7 +2,7 @@
<%= f.label :documents, t("documents.form.title") %>
<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| %>
<%= render "documents/document_fields", f: documents_builder %>
<% end %>

View File

@@ -12,7 +12,7 @@
<div class="expanded row admin-top-bar">
<div class="title-bar" data-responsive-toggle="responsive_menu" data-hide-for="medium">
<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 class="top-bar">

View File

@@ -1,7 +1,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title><%= content_for?(:title) ? yield(:title) : default_title %></title>
<title><%= content_for?(:title) ? yield(:title) : default_title %></title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>

View File

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

View File

@@ -1,5 +1,5 @@
<meta name="description"
content="<%= content_for?(:meta_description) ? yield(:meta_description) : setting["meta_description"] %>" />
content="<%= content_for?(:meta_description) ? yield(:meta_description) : setting["meta_description"] %>" />
<meta name="keywords"
content="<%= content_for?(:meta_keywords) ? yield(:meta_keywords) : setting["meta_keywords"] %>" />
content="<%= content_for?(:meta_keywords) ? yield(:meta_keywords) : setting["meta_keywords"] %>" />

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

@@ -16,7 +16,7 @@
<% end %>
<% @comment_tree.root_comments.each do |comment| %>
<%= render "comments/comment", comment: comment %>
<%= render "comments/comment", comment: comment %>
<% end %>
<%= paginate @comment_tree.root_comments %>
</div>

View File

@@ -19,7 +19,7 @@
<%= t("votes.organizations") %>
</p>
</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">
<p>
<%= t("votes.verified_only",

View File

@@ -4,7 +4,7 @@
</h1>
<div style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px;">
<%= simple_format text_with_links(@direct_message.body), {}, sanitize: false %>
<%= simple_format text_with_links(@direct_message.body), {}, sanitize: false %>
</div>
<table style="width: 100%; border-top: 1px solid #DEE0E3; margin-top: 60px;">

View File

@@ -10,6 +10,6 @@
</h2>
<div style="font-family: 'Open Sans','Helvetica Neue',arial,sans-serif;font-size: 14px;font-weight: normal;line-height: 24px;">
<%= simple_format text_with_links(@direct_message.body), {}, sanitize: false %>
<%= simple_format text_with_links(@direct_message.body), {}, sanitize: false %>
</div>
</td>

View File

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

View File

@@ -10,5 +10,5 @@
<% else %>
<%= render "shared/errors",
resource: @residence,
message: t("officing.residence.new.form_errors") %>
message: t("officing.residence.new.form_errors") %>
<% end %>

View File

@@ -66,7 +66,7 @@
<table>
<thead>
<th><%= t("officing.results.new.date") %></th>
<th><%= t("officing.results.new.date") %></th>
<th><%= t("officing.results.new.booth") %></th>
<th>&nbsp;</th>
</thead>

View File

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

View File

@@ -16,7 +16,7 @@
<% end %>
<% @comment_tree.root_comments.each do |comment| %>
<%= render "comments/comment", comment: comment %>
<%= render "comments/comment", comment: comment %>
<% end %>
<%= paginate @comment_tree.root_comments %>
</div>

View File

@@ -16,7 +16,7 @@
<% end %>
<% @comment_tree.root_comments.each do |comment| %>
<%= render "comments/comment", comment: comment %>
<%= render "comments/comment", comment: comment %>
<% end %>
<%= paginate @comment_tree.root_comments %>
</div>

View File

@@ -19,7 +19,7 @@
<%= t("votes.organizations") %>
</p>
</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">
<p>
<%= t("votes.verified_only",

View File

@@ -6,7 +6,7 @@
<h1><%= t("proposals.new.start_new") %></h1>
<div data-alert class="callout primary">
<%= 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 %>
</div>
<%= render "proposals/form", form_url: proposals_url %>

View File

@@ -2,7 +2,7 @@
<% @related_contents.compact.each do |related| %>
<li id="related-content-<%= related.find_related_content(relationable).id %>">
<% 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">
<%= render "relationable/score", related: related_content %>
</span>

View File

@@ -6,7 +6,7 @@
method: :put,
remote: true,
id: "score-positive-related-#{ related.id }",
class: "score-positive" %>
class: "score-positive" %>
<%= link_to t("related_content.score_negative"),
score_negative_related_content_path(related),

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) %>
<!-- Twitter -->
<meta name="twitter:card" content="summary"/>

View File

@@ -13,7 +13,7 @@
image: local_assigns.fetch(:image_url, ""),
desc: description,
"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 %>"
class="show-for-small-only" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span>

View File

@@ -5,13 +5,13 @@
<strong>
<%= t("shared.suggest.#{resource_name}.found",
count: @resources.count,
query: @search_terms)%>
query: @search_terms) %>
</strong>
</p>
<ul>
<% @resources.limit(@limit).each do |resource| %>
<li><%= link_to resource.title, @resource_path_method.present? ? send(@resource_path_method, resource) : resource %></li>
<li><%= link_to resource.title, @resource_path_method.present? ? send(@resource_path_method, resource) : resource %></li>
<% end %>
</ul>
@@ -24,7 +24,7 @@
limit: @limit) %>
</strong>
<%= link_to t("shared.suggest.#{resource_name}.see_all"),
polymorphic_url(resource_model, search: @search_terms)%>
polymorphic_url(resource_model, search: @search_terms) %>
</p>
<% end %>

View File

@@ -5,7 +5,7 @@
<%= render "shared/wide_order_selector", i18n_namespace: "comments" %>
<% @comment_tree.root_comments.each do |comment| %>
<%= render "comments/comment", comment: comment %>
<%= render "comments/comment", comment: comment %>
<% end %>
<%= paginate @comment_tree.root_comments %>

View File

@@ -1,5 +1,5 @@
<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="text-center">
<h1>

View File

@@ -1,5 +1,5 @@
<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="text-center">

View File

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

View File

@@ -10,5 +10,5 @@
<% else %>
<%= render "shared/errors",
resource: @residence,
message: t("verification.residence.new.form_errors") %>
message: t("verification.residence.new.form_errors") %>
<% end %>

View File

@@ -1,5 +1,5 @@
<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="text-center">

View File

@@ -1,5 +1,5 @@
<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="text-center">

View File

@@ -1,5 +1,5 @@
<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="text-center">

View File

@@ -14,7 +14,7 @@
<div class="small-12 medium-6 column">
<%= image_tag(header.image_url(:large),
class: "margin",
alt: header.image.title) %>
alt: header.image.title) %>
</div>
<% end %>
</div>

View File

@@ -28,7 +28,7 @@
image_default: nil,
carousel_size: carousel_size,
btn_text_link: t("welcome.recommended.proposals.btn_text_link"),
btn_path_link: proposals_path(order: "recommendations") %>
btn_path_link: proposals_path(order: "recommendations") %>
<% end %>
</div>
</div>