From 2d37a0396b1f85dac5fbac58378f89c5cddfc25a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 30 Sep 2020 21:04:37 +0200 Subject: [PATCH] Apply Layout/ExtraSpacing rule in ERB files Note that in Ruby files this rule allows vertical alignment, but doesn't seem to do the same in ERB. Since we only used vertical alignment in one place, and that place also had an unneeded extra space on every aligned line, I've decided to change the code in that place and follow the rule. --- app/views/admin/settings/_map_form.html.erb | 6 +++--- app/views/mailer/budget_investment_created.html.erb | 2 +- app/views/mailer/budget_investment_selected.html.erb | 2 +- app/views/mailer/proposal_notification_digest.html.erb | 4 ++-- app/views/organizations/registrations/new.html.erb | 2 +- app/views/users/registrations/new.html.erb | 2 +- .../valuation/budget_investments/_dossier_form.html.erb | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/admin/settings/_map_form.html.erb b/app/views/admin/settings/_map_form.html.erb index 49d2496f2..8c85666f7 100644 --- a/app/views/admin/settings/_map_form.html.erb +++ b/app/views/admin/settings/_map_form.html.erb @@ -17,9 +17,9 @@ <%= form_tag admin_update_map_path, method: :put, id: "map-form" do |f| %> - <%= hidden_field_tag :latitude, Setting["map.latitude"] %> - <%= hidden_field_tag :longitude, Setting["map.longitude"] %> - <%= hidden_field_tag :zoom, Setting["map.zoom"] %> + <%= hidden_field_tag :latitude, Setting["map.latitude"] %> + <%= hidden_field_tag :longitude, Setting["map.longitude"] %> + <%= hidden_field_tag :zoom, Setting["map.zoom"] %>
<%= submit_tag t("admin.settings.index.map.form.submit"), diff --git a/app/views/mailer/budget_investment_created.html.erb b/app/views/mailer/budget_investment_created.html.erb index c7a866112..3c0c29980 100644 --- a/app/views/mailer/budget_investment_created.html.erb +++ b/app/views/mailer/budget_investment_created.html.erb @@ -25,7 +25,7 @@ <%= link_to budget_investment_url(@investment.budget, @investment, anchor: "social-share"), style: "font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; background: #f7f5f2; border-radius: 6px; color: #3d3d66!important; font-weight: bold; margin: 0px; padding: 10px 15px; text-align: center; text-decoration: none; min-width: 160px; display: inline-block;" do %> - <%= image_tag("icon_mailer_share.png", style: "border: 0; display: inline-block; width: 100%; max-width: 16px", alt: "") %> + <%= image_tag("icon_mailer_share.png", style: "border: 0; display: inline-block; width: 100%; max-width: 16px", alt: "") %> <%= t("mailers.budget_investment_created.share") %> <% end %> diff --git a/app/views/mailer/budget_investment_selected.html.erb b/app/views/mailer/budget_investment_selected.html.erb index 876c73443..08e3409b8 100644 --- a/app/views/mailer/budget_investment_selected.html.erb +++ b/app/views/mailer/budget_investment_selected.html.erb @@ -13,7 +13,7 @@ <%= link_to budget_investment_url(@investment.budget, @investment, anchor: "social-share"), style: "font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; background: #f7f5f2; border-radius: 6px; color: #3d3d66 !important; font-weight: bold; margin: 0px; padding: 10px 15px; text-align: center; text-decoration: none; min-width: 160px; display: inline-block;" do %> - <%= image_tag("icon_mailer_share.png", style: "border: 0; display: inline-block; width: 100%; max-width: 16px", alt: "") %> + <%= image_tag("icon_mailer_share.png", style: "border: 0; display: inline-block; width: 100%; max-width: 16px", alt: "") %> <%= t("mailers.budget_investment_selected.share_button") %> <% end %> diff --git a/app/views/mailer/proposal_notification_digest.html.erb b/app/views/mailer/proposal_notification_digest.html.erb index d70ff3eef..576b592cd 100644 --- a/app/views/mailer/proposal_notification_digest.html.erb +++ b/app/views/mailer/proposal_notification_digest.html.erb @@ -38,12 +38,12 @@ <%= link_to proposal_url(notification.notifiable.proposal, anchor: "social-share"), style: "font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; background: #f7f5f2; border-radius: 6px; color: #3d3d66!important; font-weight: bold; margin: 0px; padding: 10px 15px; text-align: center; text-decoration: none; min-width: 160px; display: inline-block;" do %> - <%= image_tag("icon_mailer_share.png", style: "border: 0; display: inline-block; width: 100%; max-width: 16px", alt: "") %> + <%= image_tag("icon_mailer_share.png", style: "border: 0; display: inline-block; width: 100%; max-width: 16px", alt: "") %> <%= t("mailers.proposal_notification_digest.share") %> <% end %> <%= link_to proposal_url(notification.notifiable.proposal, anchor: "comments"), style: "font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; background: #f7f5f2; border-radius: 6px; color: #3d3d66!important; font-weight: bold; margin: 0px; padding: 10px 15px; text-align: center; text-decoration: none; min-width: 160px; display: inline-block; margin-left: 12px;" do %> - <%= image_tag("icon_mailer_comment.png", style: "border: 0; display: inline-block; width: 100%; max-width: 16px; vertical-align: middle;", alt: "") %> + <%= image_tag("icon_mailer_comment.png", style: "border: 0; display: inline-block; width: 100%; max-width: 16px; vertical-align: middle;", alt: "") %> <%= t("mailers.proposal_notification_digest.comment") %> <% end %> diff --git a/app/views/organizations/registrations/new.html.erb b/app/views/organizations/registrations/new.html.erb index 1f6b4b22e..ce0d4a025 100644 --- a/app/views/organizations/registrations/new.html.erb +++ b/app/views/organizations/registrations/new.html.erb @@ -16,7 +16,7 @@ <%= f.email_field :email, placeholder: t("devise_views.organizations.registrations.new.email_label") %> - <%= f.text_field :phone_number, placeholder: t("devise_views.organizations.registrations.new.phone_number_label") %> + <%= f.text_field :phone_number, placeholder: t("devise_views.organizations.registrations.new.phone_number_label") %> <%= f.invisible_captcha :address %> diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index 7dafa264f..888acbac6 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -23,7 +23,7 @@ <%= f.invisible_captcha :address %> - <%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %> + <%= f.email_field :email, placeholder: t("devise_views.users.registrations.new.email_label") %> <%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.users.registrations.new.password_label") %> diff --git a/app/views/valuation/budget_investments/_dossier_form.html.erb b/app/views/valuation/budget_investments/_dossier_form.html.erb index a5229234d..56460f0ed 100644 --- a/app/views/valuation/budget_investments/_dossier_form.html.erb +++ b/app/views/valuation/budget_investments/_dossier_form.html.erb @@ -47,7 +47,7 @@
<%= f.number_field :price_first_year, - label: t("valuation.budget_investments.edit.price_first_year", currency: budget.currency_symbol), + label: t("valuation.budget_investments.edit.price_first_year", currency: budget.currency_symbol), max: 1000000000000000 %>