From: Tom Hughes Date: Thu, 28 Mar 2019 00:30:48 +0000 (+0000) Subject: erblint: use consistent spacing in HTML tags X-Git-Tag: live~2668 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/7ce40eeb3813aaba6eabec1e134cbe98e4e6b548 erblint: use consistent spacing in HTML tags --- diff --git a/.erb-lint.yml b/.erb-lint.yml index ed5fe48af..c78bcd178 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -3,7 +3,7 @@ linters: SelfClosingTag: enabled: false SpaceInHtmlTag: - enabled: false # TODO + enabled: true Rubocop: enabled: true rubocop_config: diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 0ec89da9d..d52a47426 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -74,7 +74,7 @@
- " data-changeset-id="<%= @changeset.id %>" data-method="POST" data-url="<%= changeset_comment_url(@changeset) %>" disabled="1"/> + " data-changeset-id="<%= @changeset.id %>" data-method="POST" data-url="<%= changeset_comment_url(@changeset) %>" disabled="1" />
<% else %> diff --git a/app/views/browse/note.html.erb b/app/views/browse/note.html.erb index 75d85ae04..c7989d789 100644 --- a/app/views/browse/note.html.erb +++ b/app/views/browse/note.html.erb @@ -14,7 +14,7 @@
<%= note_event("open", @note.created_at, @note.author) %> <% if @note.status == "closed" %> -
+
<%= note_event(@note.status, @note.closed_at, @note_comments.last.author) %> <% end %>
diff --git a/app/views/diary_entries/index.html.erb b/app/views/diary_entries/index.html.erb index ba42ae23c..4e5dc994d 100644 --- a/app/views/diary_entries/index.html.erb +++ b/app/views/diary_entries/index.html.erb @@ -1,5 +1,5 @@ <% content_for :heading do %> -
id="userinformation"<% end %> > +
id="userinformation"<% end %>> <% if @user %> <%= user_image @user %> <% end %> diff --git a/app/views/diary_entries/show.html.erb b/app/views/diary_entries/show.html.erb index 57bd967b4..0216aa447 100644 --- a/app/views/diary_entries/show.html.erb +++ b/app/views/diary_entries/show.html.erb @@ -1,5 +1,5 @@ <% content_for :heading do %> -
+
<%= user_image @entry.user %>

<%= link_to t(".user_title", :user => h(@entry.user.display_name)), :action => :index %>

<%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %>

diff --git a/app/views/issues/_comments.html.erb b/app/views/issues/_comments.html.erb index 89f3098a8..13f5bb192 100644 --- a/app/views/issues/_comments.html.erb +++ b/app/views/issues/_comments.html.erb @@ -4,7 +4,7 @@
<%= link_to user_thumbnail(comment.user), user_path(comment.user) %>
- <%= link_to comment.user.display_name, user_path(comment.user) %>
+ <%= link_to comment.user.display_name, user_path(comment.user) %>
<%= comment.body %>
@@ -13,13 +13,13 @@
<% end %>
-
+
<%= form_for @new_comment, :url => issue_comments_path(@issue) do |f| %> <%= richtext_area :issue_comment, :body, :cols => 10, :rows => 8, :required => true %> <%= label_tag :reassign, t(".reassign_param") %> <%= check_box_tag :reassign, true %> -
-
+
+
<%= submit_tag "Submit" %> <% end %>
diff --git a/app/views/issues/_reports.html.erb b/app/views/issues/_reports.html.erb index 427cbe909..1a43a73c7 100644 --- a/app/views/issues/_reports.html.erb +++ b/app/views/issues/_reports.html.erb @@ -4,13 +4,13 @@ <%= link_to user_thumbnail(report.user), user_path(report.user) %>
<%= t ".reported_by_html", :category => report.category, :user => link_to(report.user.display_name, user_path(report.user)) %> -
+
<%= t(".updated_at", :datetime => l(report.updated_at.to_datetime, :format => :friendly)) %> -
+
<%= report.details %> -
+

<% end %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 135f2ae9e..87d3b03d0 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -10,13 +10,13 @@ <%= select_tag :last_updated_by, options_for_select(@users.all.collect { |f| [f.display_name, f.id] } << [t(".not_updated"), "nil"], params[:last_updated_by]), :include_blank => t(".select_last_updated_by"), :data => { :behavior => "category_dropdown" } %> <%= submit_tag t(".search"), :name => nil %> <% end %> -
+
<% if @issues.length == 0 %>

<%= t ".issues_not_found" %>

<% end %> -
+
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index add65c65a..3e2f5ef48 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -37,7 +37,7 @@ <%= render "reports", :reports => @unread_reports %> <% end %> -
+
<% if @issue.reported_user %> diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb index 96f8d42a3..a9d127835 100644 --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@ -1,6 +1,6 @@ <%= content_tag :head, :data => application_data do %> - - + + <%= javascript_include_tag "html5shiv" unless browser.html5? %> <%= javascript_include_tag "es5" unless browser.es5? %> <%= javascript_include_tag "es6" unless browser.es6? %> diff --git a/app/views/reports/new.html.erb b/app/views/reports/new.html.erb index c607d2ed4..f152049ef 100644 --- a/app/views/reports/new.html.erb +++ b/app/views/reports/new.html.erb @@ -25,7 +25,7 @@ <% Report.categories_for(@report.issue.reportable).each do |c| %>
  • <%= radio_button :report, :category, c, :required => true %> - <%= label_tag "report_category_#{c}", t(".categories.#{@report.issue.reportable.class.name.underscore}.#{c}_label") %>
    + <%= label_tag "report_category_#{c}", t(".categories.#{@report.issue.reportable.class.name.underscore}.#{c}_label") %>
  • <% end %> diff --git a/app/views/site/export.html.erb b/app/views/site/export.html.erb index 7bd4273a3..4af1a0ff3 100644 --- a/app/views/site/export.html.erb +++ b/app/views/site/export.html.erb @@ -11,10 +11,10 @@
    <%= text_field_tag("maxlat", nil, :size => 10, :class => "export_bound") %> -
    +
    <%= text_field_tag("minlon", nil, :size => 10, :class => "export_bound") %> <%= text_field_tag("maxlon", nil, :size => 10, :class => "export_bound") %> -

    +

    <%= text_field_tag("minlat", nil, :size => 10, :class => "export_bound") %>
    <%= t ".manually_select" %> diff --git a/app/views/users/account.html.erb b/app/views/users/account.html.erb index 89643c48c..b0839ad56 100644 --- a/app/views/users/account.html.erb +++ b/app/views/users/account.html.erb @@ -149,7 +149,7 @@
    -
    class="nohome"<% end %> > +
    class="nohome"<% end %>>

    <%= t ".no home location" %>