From: Andy Allan Date: Wed, 6 Mar 2019 09:17:44 +0000 (+0100) Subject: Whitespace fixes in traces erb files X-Git-Tag: live~2644^2~17 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/bbd44f8099bc24bc514a04f98aa29102fff4963f?ds=inline Whitespace fixes in traces erb files --- diff --git a/app/views/traces/_trace.html.erb b/app/views/traces/_trace.html.erb index 849695e80..35536f3e8 100644 --- a/app/views/traces/_trace.html.erb +++ b/app/views/traces/_trace.html.erb @@ -12,16 +12,16 @@ <%= link_to trace.name, { :controller => 'traces', :action => 'show', :display_name => trace.user.display_name, :id => trace.id } %> ... <% if trace.inserted %> - (<%= t '.count_points', :count => trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>) + (<%= t '.count_points', :count => trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %>) <% end %> ... <%= t '.ago', :time_in_words_ago => time_ago_in_words(trace.timestamp) %> - <%= link_to_if trace.inserted?, t('.map'), {:controller => 'site', :action => 'index', :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}"}, {:title => t('.view_map')} %> / - <%= link_to t('.edit'), {:controller => 'site', :action => 'edit', :gpx => trace.id }, {:title => t('.edit_map')} %> + <%= link_to_if trace.inserted?, t('.map'), { :controller => 'site', :action => 'index', :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}" }, { :title => t('.view_map') } %> / + <%= link_to t('.edit'), { :controller => 'site', :action => 'edit', :gpx => trace.id }, { :title => t('.edit_map') } %> <%= t('.' + trace.visibility) %>
<%= trace.description %>
- <%= t '.by' %> <%=link_to h(trace.user.display_name), user_path(trace.user) %> + <%= t '.by' %> <%= link_to h(trace.user.display_name), user_path(trace.user) %> <% if !trace.tags.empty? %> <%= t '.in' %> <%= raw(trace.tags.collect { |tag| link_to_tag tag.tag }.join(", ")) %> diff --git a/app/views/traces/edit.html.erb b/app/views/traces/edit.html.erb index b5b4a84d6..0900a45dc 100644 --- a/app/views/traces/edit.html.erb +++ b/app/views/traces/edit.html.erb @@ -19,7 +19,7 @@ <% if @trace.inserted? %>
-

<%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>

+

<%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %>

@@ -28,7 +28,7 @@ <%= @trace.latitude %>; <%= @trace.longitude %>
- (<%=link_to t('.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) + (<%= link_to t('.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%= link_to t('.edit'), :controller => 'site', :action => 'edit', :gpx => @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) <% end %>
@@ -44,7 +44,7 @@
- <%= f.select :visibility, [[t('traces.visibility.private'),"private"], [t('traces.visibility.public'),"public"], [t('traces.visibility.trackable'),"trackable"], [t('traces.visibility.identifiable'),"identifiable"]] %> (<%= t '.visibility_help' %>) + <%= f.select :visibility, [[t('traces.visibility.private'), "private"], [t('traces.visibility.public'), "public"], [t('traces.visibility.trackable'), "trackable"], [t('traces.visibility.identifiable'), "identifiable"]] %> (<%= t '.visibility_help' %>)
diff --git a/app/views/traces/new.html.erb b/app/views/traces/new.html.erb index 42d9f8ab2..d72899f16 100644 --- a/app/views/traces/new.html.erb +++ b/app/views/traces/new.html.erb @@ -22,7 +22,7 @@
- <%= f.select :visibility, [[t('traces.visibility.private'),"private"],[t('traces.visibility.public'),"public"],[t('traces.visibility.trackable'),"trackable"],[t('traces.visibility.identifiable'),"identifiable"]] %> + <%= f.select :visibility, [[t('traces.visibility.private'), "private"], [t('traces.visibility.public'), "public"], [t('traces.visibility.trackable'), "trackable"], [t('traces.visibility.identifiable'), "identifiable"]] %> (<%= t '.visibility_help' %>)
diff --git a/app/views/traces/show.html.erb b/app/views/traces/show.html.erb index f8e8510f9..cea119d54 100644 --- a/app/views/traces/show.html.erb +++ b/app/views/traces/show.html.erb @@ -22,10 +22,10 @@ <% if @trace.inserted? %> <%= t '.points' %> - <%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %> + <%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %> <%= t '.start_coordinates' %> -
<%= @trace.latitude %>; <%= @trace.longitude %>
(<%=link_to t('.map'), :controller => 'site', :action => 'index', :mlat => @trace.latitude, :mlon => @trace.longitude, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) +
<%= @trace.latitude %>; <%= @trace.longitude %>
(<%= link_to t('.map'), :controller => 'site', :action => 'index', :mlat => @trace.latitude, :mlon => @trace.longitude, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%= link_to t('.edit'), :controller => 'site', :action => 'edit', :gpx => @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) <% end %> @@ -54,7 +54,7 @@

-<% if current_user && (current_user==@trace.user || current_user.administrator? || current_user.moderator?)%> +<% if current_user && (current_user==@trace.user || current_user.administrator? || current_user.moderator?) %>
<% if current_user == @trace.user %> <%= link_to t('.edit_trace'), edit_trace_path(@trace), :class => "button" %>