]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/2168'
authorTom Hughes <tom@compton.nu>
Tue, 26 Mar 2019 21:11:51 +0000 (21:11 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 26 Mar 2019 21:11:51 +0000 (21:11 +0000)
62 files changed:
.erb-lint.yml [new file with mode: 0644]
.travis.yml
CONTRIBUTING.md
Gemfile
Gemfile.lock
app/views/browse/_common_details.html.erb
app/views/browse/_containing_relation.html.erb
app/views/browse/_relation.html.erb
app/views/browse/_relation_member.html.erb
app/views/browse/_way.html.erb
app/views/browse/changeset.html.erb
app/views/changeset_comments/_comment.html.erb
app/views/changesets/_changeset.html.erb
app/views/diary_entries/_diary_comment.html.erb
app/views/diary_entries/comments.html.erb
app/views/diary_entries/edit.html.erb
app/views/diary_entries/index.html.erb
app/views/diary_entries/show.html.erb
app/views/errors/forbidden.html.erb
app/views/errors/not_found.html.erb
app/views/export/embed.html.erb
app/views/geocoder/search.html.erb
app/views/issues/index.html.erb
app/views/issues/show.html.erb
app/views/layouts/_header.html.erb
app/views/layouts/_search.html.erb
app/views/layouts/error.html.erb
app/views/layouts/map.html.erb
app/views/messages/_message_count.html.erb
app/views/messages/inbox.html.erb
app/views/messages/outbox.html.erb
app/views/notifier/_gpx_description.html.erb
app/views/notifier/_message_body.html.erb
app/views/notifier/diary_comment_notification.html.erb
app/views/notifier/gpx_failure.html.erb
app/views/notifier/gpx_success.html.erb
app/views/notifier/message_notification.html.erb
app/views/oauth_clients/index.html.erb
app/views/oauth_clients/show.html.erb
app/views/site/copyright.html.erb
app/views/site/edit.html.erb
app/views/site/export.html.erb
app/views/site/offline.html.erb
app/views/traces/_trace.html.erb
app/views/traces/edit.html.erb
app/views/traces/new.html.erb
app/views/traces/show.html.erb
app/views/user_blocks/_block.html.erb
app/views/user_blocks/_blocks.html.erb
app/views/user_blocks/new.html.erb
app/views/user_blocks/not_found.html.erb
app/views/user_blocks/revoke.html.erb
app/views/user_blocks/show.html.erb
app/views/users/_contact.html.erb
app/views/users/_user.html.erb
app/views/users/account.html.erb
app/views/users/confirm.html.erb
app/views/users/index.html.erb
app/views/users/lost_password.html.erb
app/views/users/reset_password.html.erb
app/views/users/show.html.erb
app/views/users/terms.html.erb

diff --git a/.erb-lint.yml b/.erb-lint.yml
new file mode 100644 (file)
index 0000000..29057fe
--- /dev/null
@@ -0,0 +1,57 @@
+---
+linters:
+  SelfClosingTag:
+    enabled: false
+  SpaceInHtmlTag:
+    enabled: false # TODO
+  Rubocop:
+    enabled: true
+    rubocop_config:
+      inherit_from:
+        - .rubocop.yml
+      Layout/InitialIndentation:
+        Enabled: false
+      Layout/TrailingBlankLines:
+        Enabled: false
+      Layout/TrailingWhitespace:
+        Enabled: false
+      Naming/FileName:
+        Enabled: false
+      Style/FrozenStringLiteralComment:
+        Enabled: false
+      Metrics/LineLength:
+        Enabled: false
+      Lint/UselessAssignment:
+        Enabled: false
+      Rails/OutputSafety:
+        Enabled: false
+      Style/StringLiterals:
+        Enabled: false # TODO
+      Style/BracesAroundHashParameters:
+        Enabled: false # TODO
+      Rails/DynamicFindBy:
+        Enabled: false # TODO
+      Style/AndOr:
+        Enabled: false # TODO
+      Style/WordArray:
+        Enabled: false # TODO
+      Style/MethodCallWithoutArgsParentheses:
+        Enabled: false # TODO
+      Layout/LeadingBlankLines:
+        Enabled: false # TODO
+      Style/NestedParenthesizedCalls:
+        Enabled: false # TODO
+      Rails/LinkToBlank:
+        Enabled: false # TODO
+      Style/HashSyntax:
+        Enabled: false # TODO
+      Style/SymbolProc:
+        Enabled: false # TODO
+      Style/Not:
+        Enabled: false # TODO
+      Style/NegatedIf:
+        Enabled: false # TODO
+      Style/ConditionalAssignment:
+        Enabled: false # TODO
+exclude:
+  - '**/vendor/**'
index 1b99a514375447cc93ad5b9606f3d0063a67c593..9b848200fb127855e839de0d0b7adfbb07dee7f5 100644 (file)
@@ -28,4 +28,5 @@ before_script:
 script:
   - bundle exec rubocop -f fuubar
   - bundle exec rake jshint
+  - bundle exec erblint .
   - bundle exec rake test:db
index 43b74224fae6b88aa09495e0a2f12beb94cc44f6..c5a63656981a0ebd8bf8ba3b7eca24bf4f33735f 100644 (file)
@@ -3,15 +3,15 @@
 
 ## Coding style
 
-When writing code it is generally a good idea to try and match your
-formatting to that of any existing code in the same file, or to other
-similar files if you are writing new code. Consistency of layout is
-far more important than the layout itself as it makes reading code
-much easier.
-
-One golden rule of formatting -- please don't use tabs in your code
-as they will cause the file to be formatted differently for different
-people depending on how they have their editor configured.
+We use [Rubocop](https://github.com/rubocop-hq/rubocop) (for ruby files)
+and [ERB Lint](https://github.com/Shopify/erb-lint) (for erb templates)
+to help maintain consistency in our code. You can run these utilities during
+development to check that your code matches our guidelines:
+
+```
+bundle exec rubocop
+bundle exec erblint .
+```
 
 ## Testing
 
diff --git a/Gemfile b/Gemfile
index 83f298101fcd38c2459a8ce25087333864c376d7..b0b5f495019d7f5be2ffe6713a95ce822528032b 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -144,6 +144,7 @@ end
 group :development, :test do
   gem "capybara", "~> 2.13"
   gem "coveralls", :require => false
+  gem "erb_lint", :require => false
   gem "factory_bot_rails"
   gem "jshint"
   gem "poltergeist"
index 57feba1fd0c4623ab2f34d99ed4f3f4c5d2ea0e3..e52ed910e24e84c52fb04c0a2a4ee23aca457212 100644 (file)
@@ -64,6 +64,14 @@ GEM
       coderay (>= 1.0.0)
       erubi (>= 1.0.0)
       rack (>= 0.9.0)
+    better_html (1.0.11)
+      actionview (>= 4.0)
+      activesupport (>= 4.0)
+      ast (~> 2.0)
+      erubi (~> 1.4)
+      html_tokenizer (~> 0.0.6)
+      parser (>= 2.4)
+      smart_properties
     bigdecimal (1.1.0)
     binding_of_caller (0.8.0)
       debug_inspector (>= 0.0.1)
@@ -145,6 +153,13 @@ GEM
       dry-logic (~> 0.5, >= 0.5.0)
       dry-types (~> 0.14, >= 0.14)
     dynamic_form (1.1.4)
+    erb_lint (0.0.28)
+      activesupport
+      better_html (~> 1.0.7)
+      html_tokenizer
+      rainbow
+      rubocop (~> 0.51)
+      smart_properties
     erubi (1.8.0)
     execjs (2.7.0)
     exifr (1.3.6)
@@ -165,6 +180,7 @@ GEM
       activesupport (>= 4.2.0)
     hashdiff (0.3.8)
     hashie (3.6.0)
+    html_tokenizer (0.0.7)
     htmlentities (4.3.4)
     http_accept_language (2.0.5)
     i18n (0.9.5)
@@ -381,6 +397,7 @@ GEM
       json (>= 1.8, < 3)
       simplecov-html (~> 0.10.0)
     simplecov-html (0.10.2)
+    smart_properties (1.13.1)
     sprockets (3.7.2)
       concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
@@ -443,6 +460,7 @@ DEPENDENCIES
   dalli
   delayed_job_active_record
   dynamic_form
+  erb_lint
   factory_bot_rails
   fakefs
   faraday
index 17a5f1f40708867479f07ceb172adbfb4c6ca43c..3b3030abf19d7b54eae58080823cd5f2f58e97f4 100644 (file)
@@ -26,7 +26,7 @@
 <% if @type == "node" and common_details.visible? %>
 <div class="details geo">
   <%= t 'browse.location' %>
-  <%= link_to(content_tag(:span, number_with_delimiter(common_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(common_details.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :anchor => "map=18/#{common_details.lat}/#{common_details.lon}"}) %>
+  <%= link_to(content_tag(:span, number_with_delimiter(common_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(common_details.lon), :class => "longitude"), { :controller => 'site', :action => 'index', :anchor => "map=18/#{common_details.lat}/#{common_details.lon}" }) %>
 </div>
 <% end %>
 
index 1b26a89b61e0fc8fda99e7489244c083d231791c..391462d925f1611fd2ba7e32cf79c5ee6ba3c061 100644 (file)
@@ -5,4 +5,5 @@
   else
     raw t '.entry_role', :relation_name => linked_name, :relation_role => h(containing_relation.member_role)
   end
-%></li>
+    %>
+</li>
index e187da6ca1930d4f3f3f1e2f0ecaeac9199a0ac6..e7c4817b06f35fd02d314e12eb54aa7a9cbe1198 100644 (file)
@@ -11,7 +11,7 @@
     <%= render :partial => "common_details", :object => relation %>
 
     <% unless relation.containing_relation_members.empty? %>
-      <h4><%= t'browse.part_of' %></h4>
+      <h4><%= t 'browse.part_of' %></h4>
       <ul><%= render :partial => "containing_relation", :collection => relation.containing_relation_members.uniq %></ul>
     <% end %>
 
index cedc6f5e906df44971b134e8ff59611e33a4721c..5b6b5c3656f73bfe099f6e1fea67de5bc67ae1e9 100644 (file)
@@ -3,10 +3,12 @@
   linked_name = link_to printable_name(relation_member.member), { :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s }, :title => link_title(relation_member.member), :rel => link_follow(relation_member.member)
   type_str = t '.type.' + relation_member.member_type.downcase
 %>
-  <li class="<%= member_class %>"><%=
+<li class="<%= member_class %>">
+  <%=
     if relation_member.member_role.blank?
       raw t '.entry', :type => type_str, :name => linked_name
     else
       raw t '.entry_role', :type => type_str, :name => linked_name, :role => h(relation_member.member_role)
     end
-  %></li>
+  %>
+</li>
index 4f331b5e9be43ee96ffa8d87b25ce3396bdc80cf..7099f015affcfbec9a9e621c595ab7cb259f0ddf 100644 (file)
@@ -11,7 +11,7 @@
     <%= render :partial => "common_details", :object => way %>
 
     <% unless way.containing_relation_members.empty? %>
-      <h4><%= t'browse.part_of' %></h4>
+      <h4><%= t 'browse.part_of' %></h4>
       <ul>
         <%= render :partial => "containing_relation", :collection => way.containing_relation_members.uniq %>
       </ul>
@@ -25,7 +25,7 @@
             <%= link_to printable_name(wn.node), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node), :rel => link_follow(wn.node) %>
             <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %>
             <% if related_ways.size > 0 then %>
-              (<%= raw t '.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(printable_name(w), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>)
+              (<%= raw t '.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(printable_name(w), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w)) }.to_sentence %>)
             <% end %>
           </li>
         <% end %>
index 1328461d77c0e3c574061f80b195f959775dacc5..1d09cbedf2087bedf8325683cf314ea618c9c183 100644 (file)
@@ -36,8 +36,9 @@
               <li id="c<%= comment.id %>">
                 <small class='deemphasize'>
                   <%= t(".commented_by",
-                    :when => friendly_date(comment.created_at), :exact_time => l(comment.created_at),
-                    :user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %>
+                        :when => friendly_date(comment.created_at),
+                        :exact_time => l(comment.created_at),
+                        :user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %>
                   <% if current_user and current_user.moderator? %>
                     â€” <span class="action-button deemphasize" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_hide_url(comment.id) %>"><%= t('javascripts.changesets.show.hide_comment') %></span>
                   <% end %>
@@ -48,8 +49,9 @@
               <li id="c<%= comment.id %>">
                 <small class='deemphasize'>
                   <%= t(".hidden_commented_by",
-                    :when => friendly_date(comment.created_at), :exact_time => l(comment.created_at),
-                    :user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %>
+                        :when => friendly_date(comment.created_at),
+                        :exact_time => l(comment.created_at),
+                        :user => link_to(h(comment.author.display_name), user_path(comment.author))).html_safe %>
                   â€” <span class="action-button deemphasize" data-comment-id="<%= comment.id %>" data-method="POST" data-url="<%= changeset_comment_unhide_url(comment.id) %>"><%= t('javascripts.changesets.show.unhide_comment') %></span>
                  </small>
                 <%= comment.body.to_html %>
   <% unless @nodes.empty? %>
     <h4>
       <%= type_and_paginated_count('node', @node_pages) %>
-      <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page"} %>
+      <%= render :partial => 'paging_nav', :locals => { :pages => @node_pages, :page_param => "node_page" } %>
     </h4>
     <ul>
       <% @nodes.each do |node| %>
index 32a4b9229de1c4e2e039c36c0f75ead908067c39..3b8314decf28c6b082aef69dc0175757dc759034 100644 (file)
@@ -1,5 +1,6 @@
-<h2><%= t ".comment", :author => comment.author.display_name,
-  :changeset_id => comment.changeset.id.to_s %></h2>
+<h2><%= t ".comment",
+          :author => comment.author.display_name,
+          :changeset_id => comment.changeset.id.to_s %></h2>
 <div class="changeset-comment" style="margin-top: 5px">
   <div class="changeset-comment-description" style="font-size: smaller; color: #999999"><%= t ".commented_at_by_html", :when => friendly_date(comment.created_at), :user => comment.author.display_name %></div>
   <div class="changeset-comment-text"><%= comment.body %></div>
index 03ba013a32df307f31ac7b4cb4bab182661f5168..1bd916bbcb866242feea3e5146f54ec980201ec9 100644 (file)
@@ -1,5 +1,5 @@
 <%
-   changeset_data = {:id => changeset.id}
+   changeset_data = { :id => changeset.id }
 
    if changeset.has_valid_bbox?
      bbox = changeset.bbox.to_unscaled
@@ -12,7 +12,7 @@
    end
 %>
 
-<%= content_tag "li", :id => "changeset_#{changeset.id}", :data => {:changeset => changeset_data} do %>
+<%= content_tag "li", :id => "changeset_#{changeset.id}", :data => { :changeset => changeset_data } do %>
   <h4>
     <a class="changeset_id" href="<%= changeset_path(changeset) %>">
       <%= changeset.tags['comment'].to_s.presence || t('browse.no_comment') %>
index 4ac9a0f967f1950dbe6e86f98b8a9d2c1f7e5a42..2bc892a86beafdabccd4af248da83e18409183c4 100644 (file)
@@ -9,7 +9,7 @@
   <div class="richtext"><%= diary_comment.body.to_html %></div>
   <% if current_user && current_user.administrator? %>
     <span>
-      <%= link_to t('.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('.confirm') } %>
+      <%= link_to t('.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data => { :confirm => t('.confirm') } %>
     </span>
   <% end %>
 </div>
index 3960df3023758bb5f91cf5dfd1cdf7f429c0a205..31ee778a45170e7d73c94c363904ea09ae9a1575 100644 (file)
@@ -19,6 +19,6 @@
 </table>
 
 <div class='secondary-actions clearfix'>
-  <span><%= link_to t('.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %>
+  <span><%= link_to t('.older_comments'), { :page => @comment_pages.current.next } if @comment_pages.current.next %>
   <%= link_to t('.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %></span>
 </div>
index b46dadf1cfd3dde7f8df3ec0bda403ba3b9c3edb..881a6ac84935ccd8ef0d5e71e09965f242a340e5 100644 (file)
@@ -26,7 +26,7 @@
     </fieldset>
     <fieldset class='location'>
       <label class="standard-label"><%= t '.location' -%></label>
-      <%= content_tag "div", "", :id => "map", :data => {:lat => @lat, :lon => @lon, :zoom => @zoom} %>
+      <%= content_tag "div", "", :id => "map", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
       <div class='form-row clearfix'>
         <div class='form-column'>
           <label class="secondary standard-label"><%= t '.latitude' -%></label>
index 63a805b3c5be2679740e5a5b74f81142946584de..1f7a35ae3513e74796cde135125a7578de083aa1 100644 (file)
       <% if @user %>
         <% if @user == current_user %>
           <div>
-            <li><%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('.new'), diary_new_path, {:title => t('.new_title')} %></li>
+            <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t('.new'), diary_new_path, { :title => t('.new_title') } %></li>
           </div>
         <% end %>
       <% else %>
         <% if current_user %>
           <div>
-            <li><%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('.new'), diary_new_path, {:title => t('.new_title')} %></li>
+            <li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t('.new'), diary_new_path, { :title => t('.new_title') } %></li>
           </div>
         <% end %>
       <% end %>
@@ -42,7 +42,7 @@
     <% if @entries.size < @page_size -%>
       <%= t('.older_entries') %>
     <% else -%>
-      <%= link_to t('.older_entries'), @params.merge(:page => @page + 1 ) %>
+      <%= link_to t('.older_entries'), @params.merge(:page => @page + 1) %>
     <% end -%>
 
     |
index 02bebc5bc0d9f277106cbebb54551cf81daecd3c..91a4c61f5d524f6f6ed4e7cbbdcae4feed25ad5f 100644 (file)
@@ -13,7 +13,6 @@
 <%= render :partial => 'diary_comment', :collection => @entry.visible_comments %>
 </div>
 
-
 <div>
   <% if current_user %>
     <h3 id="newcomment"><%= t '.leave_a_comment' %></h3>
index 4c3fb30d21228dc464b8b33e28ee945b18f3972c..6901ec1d59fe2716693d60ae5e938f3f217a5df6 100644 (file)
@@ -1,3 +1,3 @@
-<h1>Forbidden</h1>  
+<h1>Forbidden</h1>
 <p>The operation you requested on the OpenStreetMap server is only available to administrators (HTTP 403)</p>
 <p>Feel free to <a href="http://wiki.openstreetmap.org/wiki/Contact" title="Various contact channels explained">contact</a> the OpenStreetMap community if you have found a broken link / bug. Make a note of the exact URL of your request.</p>
index 6ef39d0d523801f91b4ffca2da4023dfe49f6c2e..bf4744b5aa88757461cced075df4061f84ab9d92 100644 (file)
@@ -1,3 +1,3 @@
-<h1>File not found</h1>  
+<h1>File not found</h1>
 <p>Couldn't find a file/directory/API operation by that name on the OpenStreetMap server (HTTP 404)</p>
 <p>Feel free to <a href="http://wiki.openstreetmap.org/wiki/Contact" title="Various contact channels explained">contact</a> the OpenStreetMap community if you have found a broken link / bug. Make a note of the exact URL of your request.</p>
index 6c3ebdd160295fa6ec358e4aad7ec457dabeada9..83bc65c5078b47e28afcf9f80f0e6e092d59151d 100644 (file)
@@ -3,7 +3,7 @@
   <head>
     <meta charset="utf-8">
     <title>OpenStreetMap Embedded</title>
-    <%= stylesheet_link_tag "embed", :media=> "screen" %>
+    <%= stylesheet_link_tag "embed", :media => "screen" %>
     <%= javascript_include_tag "embed" %>
   </head>
   <body>
index 2d2a25c97b7b9911ea509d9c7b098a5541776db1..8d5b762c6464bc13af89849f1cfcb4f0fcd98934 100644 (file)
@@ -1,6 +1,6 @@
 <h2>
     <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
-       <%= t('site.sidebar.search_results') %>
+    <%= t('site.sidebar.search_results') %>
 </h2>
 <% @sources.each do |source| %>
   <h4 class="inner12"><%= raw(t ".title.#{source}") %></h4>
index bfb11ee5bfe907ba48a872ca8b6b29faa17f276e..9590632315f23ac3ca25976a91927abbed7f7d84 100644 (file)
@@ -4,10 +4,10 @@
 
 <%= form_tag(issues_path, :method => :get) do %>
 <p><%= t ".search_guidance" %></p>
-<%= select_tag :status, options_for_select(Issue.aasm.states.map(&:name).map{|state| [t(".states.#{state}"), state]}, params[:status]), :include_blank => t(".select_status"), :data => { :behavior => 'category_dropdown' } %>
+<%= select_tag :status, options_for_select(Issue.aasm.states.map(&:name).map { |state| [t(".states.#{state}"), state] }, params[:status]), :include_blank => t(".select_status"), :data => { :behavior => 'category_dropdown' } %>
 <%= select_tag :issue_type, options_for_select(@issue_types, params[:issue_type]), :include_blank => t(".select_type"), :data => { :behavior => 'category_dropdown' } %>
 <%= text_field_tag :search_by_user, params[:search_by_user], placeholder: t(".reported_user") %>
-<%= 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' } %>
+<%= 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 %>
 <br/>
index 6612f069b24d6b01e36c7c6ef814ac36786e834d..e8cfafb45cfa1d0f406aebeab86ebdfe5d57a710 100644 (file)
@@ -6,8 +6,8 @@
     <%= @issue.assigned_role %>
     | <%= t ".reports", :count => @issue.reports.count %>
     | <%= t ".report_created_at", :datetime => l(@issue.created_at.to_datetime, :format => :friendly) %>
-    <%= " | " + t(".last_resolved_at", :datetime => l(@issue.resolved_at.to_datetime, :format =>:friendly)) if @issue.resolved_at? %>
-    <%= " | " + t(".last_updated_at", :datetime => l(@issue.updated_at.to_datetime, :format => :friendly), :displayname => @issue.user_updated.display_name ) if @issue.user_updated %>
+    <%= " | " + t(".last_resolved_at", :datetime => l(@issue.resolved_at.to_datetime, :format => :friendly)) if @issue.resolved_at? %>
+    <%= " | " + t(".last_updated_at", :datetime => l(@issue.updated_at.to_datetime, :format => :friendly), :displayname => @issue.user_updated.display_name) if @issue.user_updated %>
   </small>
 </p>
 <p>
index a9919f7d2216949b4ea76e691f22f0e4df5c8ea9..65b1729f0464aeb6e9cf63d3f6e0ae6d7e10dc99 100644 (file)
     <%= content_for :header %>
     <ul>
       <li id="edit_tab" class="dropdown <%= current_page_class(edit_path) %>">
-        <%= link_to t('layouts.edit'), edit_path, :class => "tab geolink editlink",
+        <%= link_to t('layouts.edit'),
+                    edit_path,
+                    :class => "tab geolink editlink",
                     :id => 'editanchor',
-                    :data => { :editor => preferred_editor }
-        %><a class='dropdown-toggle' data-toggle='dropdown' href='#'><b class="caret"></b></a>
+                    :data => { :editor => preferred_editor } %>
+        <a class='dropdown-toggle' data-toggle='dropdown' href='#'><b class="caret"></b></a>
         <ul class='dropdown-menu'>
           <% Editors::RECOMMENDED_EDITORS.each do |editor| %>
             <li>
     <% if current_user && current_user.id %>
       <div class='dropdown user-menu logged-in'>
         <a class='dropdown-toggle' data-toggle='dropdown' href="#">
-          <%= user_thumbnail_tiny(current_user, :width => 25, :height => 25)
-          %><%= render :partial => 'layouts/inbox'
-        %><span class="user-button"><span class='username'><%= current_user.display_name %></span>
-          <b class="caret"></b></span>
+          <%= user_thumbnail_tiny(current_user, :width => 25, :height => 25) %>
+          <%= render :partial => 'layouts/inbox' %>
+          <span class="user-button">
+            <span class='username'>
+              <%= current_user.display_name %>
+            </span>
+            <b class="caret"></b>
+          </span>
         </a>
         <ul class='dropdown-menu'>
           <li>
index 98b3c6c542188b0e4b4ff081858797196b7bb094..36614fd56b5a854b41957a73fdd0cb20e22c248c 100644 (file)
     <div class="header"><span class="icon close"></span></div>
 
     <div class="line">
-      <%= image_tag "marker-green.png", :class => "routing_marker", :data => { :type =>  "from" }, :draggable => "true" %>
+      <%= image_tag "marker-green.png", :class => "routing_marker", :data => { :type => "from" }, :draggable => "true" %>
       <span class="force_width"><%= text_field_tag "route_from", params[:from], :placeholder => t('site.search.from') %></span>
     </div>
     <div class="line">
       <%= image_tag "marker-red.png", :class => "routing_marker", :data => { :type => "to" }, :draggable => "true" %>
-      <span class="force_width"><%= text_field_tag "route_to"  , params[:to]  , :placeholder => t('site.search.to') %></span>
+      <span class="force_width"><%= text_field_tag "route_to", params[:to], :placeholder => t('site.search.to') %></span>
     </div>
     <div class="line">
       <select class="routing_engines" name="routing_engines"></select>
index 590f32095dab8445db2c69c5e03d73f1e01a4477..f429feb5963b083201f242508ed97b3663a17b56 100644 (file)
@@ -3,7 +3,7 @@
   <head>
     <meta charset="utf-8">
     <title>OpenStreetMap</title>
-    <%= stylesheet_link_tag "errors", :media=> "screen" %>
+    <%= stylesheet_link_tag "errors", :media => "screen" %>
   </head>
   <body>
     <%= image_tag "osm_logo.png", :class => "logo" %>
index 05f070914b2cd7e235fc9f0fd477eca235c749db..7e2196a3b5f443dda2fa9a1616a9f81bf576e269 100644 (file)
@@ -44,9 +44,9 @@
         <div class="close-wrap"><span class="icon close"></span></div>
         <p><%= t 'layouts.intro_text' %></p>
         <p><%= t 'layouts.hosting_partners_html',
-               :ucl => link_to(t('layouts.partners_ucl'), "https://www.ucl.ac.uk"),
-               :bytemark => link_to(t('layouts.partners_bytemark'), "https://www.bytemark.co.uk"),
-               :partners => link_to(t('layouts.partners_partners'), "https://hardware.openstreetmap.org/thanks/") %>
+                 :ucl => link_to(t('layouts.partners_ucl'), "https://www.ucl.ac.uk"),
+                 :bytemark => link_to(t('layouts.partners_bytemark'), "https://www.bytemark.co.uk"),
+                 :partners => link_to(t('layouts.partners_partners'), "https://hardware.openstreetmap.org/thanks/") %>
         </p>
         <a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
         <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
index c6d84032dc83029183f134eab4841b0151007e63..33a3b52f3917c400cb1bedbe16e44de4692e66ba 100644 (file)
@@ -3,6 +3,5 @@
       :new_messages => t("messages.inbox.new_messages",
                          :count => current_user.new_messages.size),
       :old_messages => t("messages.inbox.old_messages",
-                         :count => current_user.messages.size - current_user.new_messages.size)
-%>
+                         :count => current_user.messages.size - current_user.new_messages.size) %>
 </p>
index 03e01915eae205067a106787e63a3fbd43dd6b1a..9cb5411075ab9182ced986bb0967dd874057d610 100644 (file)
@@ -3,7 +3,7 @@
 <% end %>
 
 <% content_for :heading do %>
-  <h2><%= t '.my_inbox'%>/<%= link_to t('.outbox'), outbox_messages_path %></h2>
+  <h2><%= t '.my_inbox' %>/<%= link_to t('.outbox'), outbox_messages_path %></h2>
 <% end %>
 
   <h4><%= render :partial => "message_count" %></h4>
index 199cfdc493548b17dbdf9a762ea2fca46e459dbe..36e0f22e9e32905b720e5be0c0997419a217b6bf 100644 (file)
@@ -3,7 +3,7 @@
 <% end %>
 
 <% content_for :heading do %>
-  <h2><%= raw(t '.my_inbox', :inbox_link => link_to(t('.inbox'), inbox_messages_path)) %>/<%= t'.outbox' %></h2>
+  <h2><%= raw(t '.my_inbox', :inbox_link => link_to(t('.inbox'), inbox_messages_path)) %>/<%= t '.outbox' %></h2>
 <% end %>
 
 <h4><%= t '.messages', :count => current_user.sent_messages.size %></h4>
index 8d44336c9910715bbfd59f009b23cdd9a798e86f..d83f72d9091045bb6fbefa5fbc581d11738c77a6 100644 (file)
@@ -1,12 +1,12 @@
-<%= t'notifier.gpx_notification.your_gpx_file' %>
+<%= t 'notifier.gpx_notification.your_gpx_file' %>
 <strong><%= @trace_name %></strong>
-<%= t'notifier.gpx_notification.with_description' %>
+<%= t 'notifier.gpx_notification.with_description' %>
 <em><%= @trace_description %></em>
 <% if @trace_tags.length>0 %>
-  <%= t'notifier.gpx_notification.and_the_tags' %>
+  <%= t 'notifier.gpx_notification.and_the_tags' %>
   <em><% @trace_tags.each do |tag| %>
     <%= tag.tag.rstrip %>
   <% end %></em>
 <% else %>
-  <%= t'notifier.gpx_notification.and_no_tags' %>
+  <%= t 'notifier.gpx_notification.and_no_tags' %>
 <% end %>
index 38f4917993b8c40dbf1ad2afb52a1a7eaba4ec75..b3b0eb687d5b44277e6cd8d76d2e4134e2575562 100644 (file)
@@ -2,17 +2,17 @@
   <tr>
     <td style="width: 50px; min-width: 50px; vertical-align: top; padding: 15px">
       <%= link_to(
-          image_tag(
-            attachments["avatar.png"].url,
-            alt: @author,
-            title: @author,
-            width: 50,
-            height: 50,
-            border: 0
-          ),
-          user_url(@author),
-          :target => "_blank"
-      ) %>
+            image_tag(
+              attachments["avatar.png"].url,
+              alt: @author,
+              title: @author,
+              width: 50,
+              height: 50,
+              border: 0
+            ),
+            user_url(@author),
+            :target => "_blank"
+          ) %>
     </td>
     <td style="text-align: left; vertical-align: top; padding-right: 10px; width: 100%">
       <%= body %>
index 163223b44584cbd2fe92df87b920db081cf85474..1191286f1953a1b193931430ce5115068acf79b0 100644 (file)
@@ -11,8 +11,8 @@
 
 <% content_for :footer do %>
   <p><%= raw t '.footer',
-             :readurl => link_to(@readurl, @readurl) + tag(:br),
-             :commenturl => link_to(@commenturl, @commenturl) + tag(:br),
-             :replyurl => link_to(@replyurl, @replyurl)
-  %></p>
+               :readurl => link_to(@readurl, @readurl) + tag(:br),
+               :commenturl => link_to(@commenturl, @commenturl) + tag(:br),
+               :replyurl => link_to(@replyurl, @replyurl) %>
+  </p>
 <% end %>
index dace1852264604c2a2a38e48b497c54a2b130d50..fee70eed0859e279f44dceeaca94ed9fc95c3e69 100644 (file)
@@ -1,8 +1,8 @@
-<p><%= t'notifier.gpx_notification.greeting' %></p>
+<p><%= t 'notifier.gpx_notification.greeting' %></p>
 
 <p>
   <%= render :partial => "gpx_description" %>
-  <%= t'notifier.gpx_notification.failure.failed_to_import' %>
+  <%= t 'notifier.gpx_notification.failure.failed_to_import' %>
 </p>
 
 <blockquote>
@@ -10,7 +10,7 @@
 </blockquote>
 
 <p>
-  <%= t'notifier.gpx_notification.failure.more_info_1' %>
-  <%= t'notifier.gpx_notification.failure.more_info_2' %>
-  <%= t'notifier.gpx_notification.failure.import_failures_url' %>
+  <%= t 'notifier.gpx_notification.failure.more_info_1' %>
+  <%= t 'notifier.gpx_notification.failure.more_info_2' %>
+  <%= t 'notifier.gpx_notification.failure.import_failures_url' %>
 </p>
index d298bd70a0c9f3690be86482224a663590f75ad6..71611a0887b7783252391e87a87c3d8ee11dc482 100644 (file)
@@ -1,6 +1,6 @@
-<p><%= t'notifier.gpx_notification.greeting' %></p>
+<p><%= t 'notifier.gpx_notification.greeting' %></p>
 
 <p>
   <%= render :partial => "gpx_description" %>
-  <%= t'notifier.gpx_notification.success.loaded_successfully', :trace_points => @trace_points, :possible_points => @possible_points %>
+  <%= t 'notifier.gpx_notification.success.loaded_successfully', :trace_points => @trace_points, :possible_points => @possible_points %>
 </p>
index 4e4b2ea9a993ff9cb97d4e8c76a923c931685b8c..080146fef1925fb921cf7f5898199c1f5196db6b 100644 (file)
@@ -3,9 +3,8 @@
 </p>
 <p>
   <%= raw t '.header',
-          :from_user => link_to_user(@from_user),
-          :subject => content_tag("em", @title)
-  %>
+            :from_user => link_to_user(@from_user),
+            :subject => content_tag("em", @title) %>
 </p>
 
 <%= message_body do %>
@@ -16,7 +15,6 @@
   <p>
     <%= t '.footer_html',
           :readurl => link_to(@readurl, @readurl) + tag(:br),
-          :replyurl => link_to(@replyurl, @replyurl)
-    %>
+          :replyurl => link_to(@replyurl, @replyurl) %>
   </p>
 <% end %>
index 64a316718a9f709239c360779cd5ef4f40be3918..f61048f7253a56bec2766d47ab96c1876c1d6a66 100644 (file)
@@ -8,15 +8,15 @@
 <table>
   <tr><th><%= t '.application' %></th>
     <th><%= t '.issued_at' %></th><th>&nbsp;</th></tr>
-  <% @tokens.each do |token|%>
+  <% @tokens.each do |token| %>
     <%= content_tag_for :tr, token do %>
       <td><%= link_to token.client_application.name, token.client_application.url %></td>
       <td><%= token.authorized_at %></td>
       <td>
-       <%= form_tag :controller => 'oauth', :action => 'revoke' do %>
-       <%= hidden_field_tag 'token', token.token %>
-       <%= submit_tag t('.revoke') %>
-       <% end %>
+  <%= form_tag :controller => 'oauth', :action => 'revoke' do %>
+  <%= hidden_field_tag 'token', token.token %>
+  <%= submit_tag t('.revoke') %>
+  <% end %>
       </td>
     <% end %>
   <% end %>
@@ -27,7 +27,7 @@
 <p><%= raw(t('.no_apps', :oauth => "<a href=\"https://oauth.net\">OAuth</a>")) %></p>
 <% else %>
 <p><%= t '.registered_apps' %></p>
-<% @client_applications.each do |client|%>
+<% @client_applications.each do |client| %>
   <%= div_for client do %>
     <%= link_to client.name, :action => :show, :id => client.id %>
   <% end %>
index 200fbc7beeaa54a8c56b32e1972ec8ee7c7db3ab..55fffd4823eba1e288723386b822d6be55bb5442 100644 (file)
@@ -3,19 +3,19 @@
 <% end %>
 <div class='prose'>
   <p>
-    <strong><%= t '.key' %></strong> <%=@client_application.key %>
+    <strong><%= t '.key' %></strong> <%= @client_application.key %>
   </p>
   <p>
-    <strong><%= t '.secret' %></strong> <%=@client_application.secret %>
+    <strong><%= t '.secret' %></strong> <%= @client_application.secret %>
   </p>
   <p>
-    <strong><%= t '.url' %></strong> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.request_token_path %>
+    <strong><%= t '.url' %></strong> http<%= 's' if request.ssl? %>://<%= request.host_with_port %><%= @client_application.oauth_server.request_token_path %>
   </p>
   <p>
-    <strong><%= t '.access_url' %></strong> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.access_token_path %>
+    <strong><%= t '.access_url' %></strong> http<%= 's' if request.ssl? %>://<%= request.host_with_port %><%= @client_application.oauth_server.access_token_path %>
   </p>
   <p>
-    <strong><%= t '.authorize_url' %></strong> http<%='s' if request.ssl? %>://<%= request.host_with_port %><%=@client_application.oauth_server.authorize_path %>
+    <strong><%= t '.authorize_url' %></strong> http<%= 's' if request.ssl? %>://<%= request.host_with_port %><%= @client_application.oauth_server.authorize_path %>
   </p>
 
   <p><%= t '.requests' %></p>
@@ -28,6 +28,6 @@
   <p><%= t '.support_notice' %></p>
 </div>
 <div class="buttons">
-  <%= button_to t('.edit'), edit_oauth_client_path(@client_application.user.display_name, @client_application), :method => :get, :class=> "oauth-edit" %>
-  <%= button_to t('.delete'), oauth_client_path(@client_application.user.display_name, @client_application), :method => :delete, :data => { :confirm => t('.confirm') }, :class=> "oauth-delete deemphasize" %>
+  <%= button_to t('.edit'), edit_oauth_client_path(@client_application.user.display_name, @client_application), :method => :get, :class => "oauth-edit" %>
+  <%= button_to t('.delete'), oauth_client_path(@client_application.user.display_name, @client_application), :method => :delete, :data => { :confirm => t('.confirm') }, :class => "oauth-delete deemphasize" %>
 </div>
index de4ff3cab1cc6304cf02acca9401ff448adbad5c..2dcccab18fc78fa1a120e5e47ca3e61a26eb569a 100644 (file)
@@ -7,13 +7,13 @@
         <h1><%= t '.native.title' %></h1>
         <p>
           <%= raw t '.native.text',
-                      :native_link => link_to(t('.native.native_link'),
-                                                  :controller => 'site',
-                                                  :action => 'copyright',
-                                                  :copyright_locale => nil),
-                      :mapping_link => link_to(t('.native.mapping_link'),
-                                                  :controller => 'site',
-                                                  :action => 'index') %>
+                    :native_link => link_to(t('.native.native_link'),
+                                            :controller => 'site',
+                                            :action => 'copyright',
+                                            :copyright_locale => nil),
+                    :mapping_link => link_to(t('.native.mapping_link'),
+                                             :controller => 'site',
+                                             :action => 'index') %>
         </p>
       <% end %>
       <hr />
         <h1><%= t '.foreign.title' %></h1>
         <p>
           <%= raw t '.foreign.text',
-                      :english_original_link => link_to(t('.foreign.english_link'),
-                                                            :controller => 'site',
-                                                            :action => 'copyright',
-                                                            :copyright_locale => 'en') %>
+                    :english_original_link => link_to(t('.foreign.english_link'),
+                                                      :controller => 'site',
+                                                      :action => 'copyright',
+                                                      :copyright_locale => 'en') %>
         </p>
       <% end %>
       <hr />
index d89af0596a5ebc566fa92c81b90520a2f6c64691..5451e1b5af122c5b0a44089c80c9d17054d25572 100644 (file)
@@ -5,7 +5,7 @@
     <p><%= t 'layouts.osm_read_only' %></p>
   <% elsif !current_user.data_public? %>
     <p><%= t '.not_public' %></p>
-    <p><%= raw t '.not_public_description', :user_page => (link_to t('.user_page_link'), {:controller => 'user', :action => 'account', :display_name => current_user.display_name, :anchor => 'public'}) %></p>
+    <p><%= raw t '.not_public_description', :user_page => (link_to t('.user_page_link'), { :controller => 'user', :action => 'account', :display_name => current_user.display_name, :anchor => 'public' }) %></p>
     <p><%= raw t 'site.edit.anon_edits', :link => link_to(t('.anon_edits_link_text'), t('.anon_edits_link')) %></p>
   <% else %>
     <%= render :partial => preferred_editor %>
index f11ad8d790a7b85a95f767b8c9de610f3625c5e3..84e3b1736521beeca2fe3d7452d869ab83a3b714 100644 (file)
@@ -5,7 +5,7 @@
   <%= t '.title' %>
 </h2>
 
-<%= form_tag({:controller => "export", :action => "finish"}, :class => "export_form") do %>
+<%= form_tag({ :controller => "export", :action => "finish" }, :class => "export_form") do %>
   <%= hidden_field_tag 'format', 'osm' %>
 
   <div class='export_area_inputs'>
index d306c2af91fb5d79b3128e6ede3d402e34e83325..bfe0bcb9fd3d00a4780bd93ad3f4b855debd8466 100644 (file)
@@ -4,4 +4,4 @@
 <% else %>
 <p><%= t 'layouts.osm_read_only' %>
 </p>
-<% end  %>
+<% end %>
index 849695e80f86514fb7321b2fc8c129a88edd65d0..35536f3e8b363ed7230602349c7ddec2b6565285 100644 (file)
   <td class="<%= cl %>"><%= link_to trace.name, { :controller => 'traces', :action => 'show', :display_name => trace.user.display_name, :id => trace.id } %>
     <span class="trace_summary" title="<%= trace.timestamp %>"> ...
       <% 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) %></span>
-      <%= 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') } %>
       <span class="trace_<%= trace.visibility %>"><%= t('.' + trace.visibility) %></span>
       <br />
       <%= trace.description %>
     <br />
-    <%= 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(", ")) %>
index b5b4a84d667fc9523406607df8f9861169c843e3..0900a45dc7884cff714541c90e0bdef565232281 100644 (file)
@@ -19,7 +19,7 @@
   <% if @trace.inserted? %>
     <div class='form-row'>
       <label class='standard-label'><%= t '.points' %></label>
-      <p class='deemphasize'><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %></p>
+      <p class='deemphasize'><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %></p>
     </div>
     <div class='form-row'>
       <label class='standard-label'><%= t '.start_coord' %></label>
@@ -28,7 +28,7 @@
       <span class="latitude"><%= @trace.latitude %></span>;
       <span class="longitude"><%= @trace.longitude %></span>
     </div>
-    (<%=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 %>
     <div class='form-row'>
       <label class='standard-label'><%= t '.owner' %></label>
@@ -44,7 +44,7 @@
     </div>
     <div class='form-row'>
       <label class='standard-label'><%= t '.visibility' %></label>
-      <%= f.select :visibility, [[t('traces.visibility.private'),"private"], [t('traces.visibility.public'),"public"], [t('traces.visibility.trackable'),"trackable"], [t('traces.visibility.identifiable'),"identifiable"]] %> (<a href="<%= t '.visibility_help_url' %>"><%= t '.visibility_help' %></a>)
+      <%= f.select :visibility, [[t('traces.visibility.private'), "private"], [t('traces.visibility.public'), "public"], [t('traces.visibility.trackable'), "trackable"], [t('traces.visibility.identifiable'), "identifiable"]] %> (<a href="<%= t '.visibility_help_url' %>"><%= t '.visibility_help' %></a>)
     </div>
   </fieldset>
 
index 42d9f8ab27a1b051bcd5333f89f279d16a0bd504..d72899f169a20b6987cea731879d0426a632d656 100644 (file)
@@ -22,7 +22,7 @@
       </div>
       <div class='form-row'>
         <label class="standard-label"><%= t '.visibility' %></label>
-        <%= 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"]] %>
         <span class="form-help deemphasize">(<a href="<%= t '.visibility_help_url' %>"><%= t '.visibility_help' %></a>)</span>
       </div>
     </fieldset>
index f8e8510f9de286c3d1b857fb3b6e2f9d0e3386ce..cea119d5469aec8e8d943216d98212b965434622 100644 (file)
   <% if @trace.inserted? %>
   <tr>
     <td><%= t '.points' %></td>
-    <td><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %></td></tr>
+    <td><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %></td></tr>
   <tr>
     <td><%= t '.start_coordinates' %></td>
-    <td><div class="geo"><span class="latitude"><%= @trace.latitude %></span>; <span class="longitude"><%= @trace.longitude %></span></div> (<%=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}" %>)</td>
+    <td><div class="geo"><span class="latitude"><%= @trace.latitude %></span>; <span class="longitude"><%= @trace.longitude %></span></div> (<%= 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}" %>)</td>
   </tr>
   <% end %>
   <tr>
@@ -54,7 +54,7 @@
 
 <br /><br />
 
-<% 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?) %>
   <div class="buttons">
     <% if current_user == @trace.user %>
       <%= link_to t('.edit_trace'), edit_trace_path(@trace), :class => "button" %>
index b8a753e0412bde9d7da9ae392e812fd0dea3f3fc..1614a4dc45fe617a81364d460c60a5f518d49858 100644 (file)
@@ -7,8 +7,8 @@
   <% if show_creator_name %>
   <td class="<%= c1 %>"><%= link_to h(block.creator.display_name), user_path(block.creator) %></td>
   <% end %>
-  <td class="<%= c1 %>"><%=h truncate(block.reason) %></td>
-  <td class="<%= c1 %>"><%=h block_status(block) %></td>
+  <td class="<%= c1 %>"><%= h truncate(block.reason) %></td>
+  <td class="<%= c1 %>"><%= h block_status(block) %></td>
   <td class="<%= c1 %>">
     <% if block.revoker_id.nil? %>
       <%= t('.not_revoked') %>
index 01e54de21cca256ff8892f14a6d4fc5390619d5e..db6eea2a818391d18368d4fa23b90f71fc5baeba 100644 (file)
@@ -15,7 +15,7 @@
     <th></th>
     <% end %>
   </tr>
-  <%= render :partial => 'block', :locals => {:show_revoke_link => show_revoke_link, :show_user_name => show_user_name, :show_creator_name => show_creator_name }, :collection => @user_blocks %>
+  <%= render :partial => 'block', :locals => { :show_revoke_link => show_revoke_link, :show_user_name => show_user_name, :show_creator_name => show_creator_name }, :collection => @user_blocks %>
 </table>
 
 <ul class='secondary-actions'>
index bd941babcc10f98cf9bba79217653ba97d519b2c..2967ecaf0dd110370452326c65407dad143b1713 100644 (file)
@@ -1,8 +1,7 @@
 <% @title = t '.title', :name => h(@user.display_name) %>
 <% content_for :heading do %>
   <h1><%= raw t('.heading',
-                :name => link_to(
-                                 h(@user.display_name),
+                :name => link_to(h(@user.display_name),
                                  user_path(@user))) %></h1>
 <% end %>
 <%= form_for(@user_block) do |f| %>
@@ -14,7 +13,7 @@
   </p>
   <p>
     <%= label_tag 'user_block_period', t('.period') %><br />
-    <%= select_tag('user_block_period', options_for_select(UserBlock::PERIODS.collect { |h| [t('user_blocks.period', :count => h), h.to_s] }, params[:user_block_period] )) %>
+    <%= select_tag('user_block_period', options_for_select(UserBlock::PERIODS.collect { |h| [t('user_blocks.period', :count => h), h.to_s] }, params[:user_block_period])) %>
   </p>
   <p>
     <%= f.check_box :needs_view %>
index 6aad7eef3dc847dd014c38c1874127042406e717..d5846cc11d8a27f976846eb6c4a3a245a47e0092 100644 (file)
@@ -1,3 +1,3 @@
-<p><%= t'.sorry', :id => params[:id] %></p>
+<p><%= t '.sorry', :id => params[:id] %></p>
 
 <%= link_to t('.back'), user_blocks_path %>
index c7eee67038a4292b21705e801bbdd7a6d32c0f52..d4786b2e5d2c2c0a4373a1f3f5741fde09fbe229 100644 (file)
@@ -4,11 +4,9 @@
 
 <% content_for :heading do %>
   <h1><%= raw t('.heading',
-                :block_on => link_to(
-                                     h(@user_block.user.display_name),
+                :block_on => link_to(h(@user_block.user.display_name),
                                      user_path(@user_block.user)),
-                :block_by => link_to(
-                                     h(@user_block.creator.display_name),
+                :block_by => link_to(h(@user_block.creator.display_name),
                                      user_path(@user_block.creator))) %></h1>
 <% end %>
 
index 4dc03f4e487ec6645c48bc1e73c5a452cf3a6262..1e935c92b04d0023f51485d933e1c27cc52fd574 100644 (file)
@@ -4,11 +4,9 @@
 
 <% content_for :heading do %>
   <h1><%= raw t('.heading',
-                :block_on => link_to(
-                                     h(@user_block.user.display_name),
+                :block_on => link_to(h(@user_block.user.display_name),
                                      user_path(@user_block.user)),
-                :block_by => link_to(
-                                     h(@user_block.creator.display_name),
+                :block_by => link_to(h(@user_block.creator.display_name),
                                      user_path(@user_block.creator))) %></h1>
 <ul class='secondary-actions clearfix'>
   <% if @user_block.ends_at > Time.now.getutc %>
@@ -16,7 +14,7 @@
       <li><%= link_to t('.edit'), edit_user_block_path(@user_block) %></li>
     <% end %>
     <% if current_user and current_user.moderator? %>
-      <li><%= link_to(t('.revoke'),{:controller => 'user_blocks', :action => 'revoke', :id => @user_block.id}) %></li>
+      <li><%= link_to(t('.revoke'), { :controller => 'user_blocks', :action => 'revoke', :id => @user_block.id }) %></li>
     <% end %>
   <% end %>
   <li><%= link_to t('.back'), user_blocks_path %></li>
 
 <% if @user_block.revoker %>
 <p>
-  <b><%= t'.revoker' %></b>
+  <b><%= t '.revoker' %></b>
   <%= link_to h(@user_block.revoker.display_name), user_path(@user_block.revoker) %>
 </p>
 <% end %>
 
-<p><b><%= t'.created' %></b>: <%= raw t'.ago', :time => friendly_date(@user_block.created_at) %></p>
+<p><b><%= t '.created' %></b>: <%= raw t '.ago', :time => friendly_date(@user_block.created_at) %></p>
 
-<p><b><%= t'.status' %></b>: <%= block_status(@user_block) %></p>
+<p><b><%= t '.status' %></b>: <%= block_status(@user_block) %></p>
 
-<p><b><%= t'.reason' %></b></p>
+<p><b><%= t '.reason' %></b></p>
 <div class="richtext"><%= @user_block.reason.to_html %></div>
index 5c3afaa89c89831fc3e85c5c1a8d3d1e6c4361d9..1eef86b87ee1bf35bd5d6b82ffb6e32d6889b3a5 100644 (file)
@@ -3,10 +3,10 @@
      :lon => contact.home_lon,
      :lat => contact.home_lat,
      :icon => image_path(type == "friend" ? "marker-blue.png" : "marker-green.png"),
-     :description => render(:partial => "popup", :object => contact, :locals => {:type => type})
+     :description => render(:partial => "popup", :object => contact, :locals => { :type => type })
    }
 %>
-<%= content_tag :div, :class => "contact-activity clearfix", :data => {:user => user_data} do %>
+<%= content_tag :div, :class => "contact-activity clearfix", :data => { :user => user_data } do %>
   <%= user_thumbnail contact %>
   <div class='activity-details'>
     <p class='deemphasize'>
         <%= t('users.show.latest edit', :ago => t('users.show.ago', :time_in_words_ago => time_ago_in_words(changeset.created_at))) %>
         <% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('browse.no_comment') %>
         "<%= link_to(comment,
-                            {:controller => 'browse', :action => 'changeset', :id => changeset.id},
-                            {:title => t('changesets.changeset.view_changeset_details')})
-        %>"
+                     { :controller => 'browse', :action => 'changeset', :id => changeset.id },
+                     { :title => t('changesets.changeset.view_changeset_details') }) %>"
       <% else %>
-       <%= t'changesets.changeset.no_edits' %>
+       <%= t 'changesets.changeset.no_edits' %>
       <% end %>
     </p>
 
index b9b7bc96345b259bece5f30784112788b11de970..ae8b96383fd16f08f96adf6e38b1addd9790adbf 100644 (file)
@@ -8,15 +8,13 @@
     <p>
       <% if user.creation_ip %>
         <%= raw t 'users.index.summary',
-            :name => link_to(h(user.display_name), user_path(user)),
-            :ip_address => link_to(user.creation_ip, :ip => user.creation_ip),
-            :date => l(user.creation_time, :format => :friendly)
-        %>
+                  :name => link_to(h(user.display_name), user_path(user)),
+                  :ip_address => link_to(user.creation_ip, :ip => user.creation_ip),
+                  :date => l(user.creation_time, :format => :friendly) %>
       <% else %>
         <%= raw t 'users.index.summary_no_ip',
-            :name => link_to(h(user.display_name), user_path(user)),
-            :date => l(user.creation_time, :format => :friendly)
-        %>
+                  :name => link_to(h(user.display_name), user_path(user)),
+                  :date => l(user.creation_time, :format => :friendly) %>
       <% end %>
     </p>
     <div class="richtext"><%= user.description.to_html %></div>
index 233f2629fa96f1ca84174e4c873d8b17c36e376f..fd58888825175561d00cfbecbf4305c3deea7edd 100644 (file)
   <fieldset>
     <div class="form-row">
         <label class="standard-label"><%= t 'users.new.password' %></label>
-      <%= f.password_field :pass_crypt, {:value => '', :autocomplete => :off} %>
+      <%= f.password_field :pass_crypt, { :value => '', :autocomplete => :off } %>
     </div>
 
     <div class="form-row">
       <label class="standard-label"><%= t 'users.new.confirm password' %></label>
-      <%= f.password_field :pass_crypt_confirmation, {:value => '', :autocomplete => :off} %>
+      <%= f.password_field :pass_crypt_confirmation, { :value => '', :autocomplete => :off } %>
     </div>
   </fieldset>
 
@@ -51,7 +51,7 @@
       <%= f.select :auth_provider, Auth::PROVIDERS %>
       <%= f.text_field :auth_uid %>
       <span class="form-help deemphasize">(<a href="<%= t '.openid.link' %>" target="_new"><%= t '.openid.link text' %></a>)</span>
-    </diV>
+    </div>
   </fieldset>
 
   <fieldset class="form-divider">
   <fieldset class="form-divider">
     <div class='form-row location clearfix'>
     <label class="standard-label"><%= t '.home location' %></label>
-    <div id="homerow" <% unless current_user.home_lat and current_user.home_lon %>class="nohome"<%end%> >
+    <div id="homerow" <% unless current_user.home_lat and current_user.home_lon %>class="nohome"<% end %> >
       <p class="message form-help deemphasize"><%= t '.no home location' %></p>
         <div class='form-column'>
           <label class="standard-label secondary"><%= t '.latitude' %></label>
index 7b8d78d3f49c58eb078a88a10ab3d5513a18be9f..167801cbbb84519fce0077d4df54203e11a88109 100644 (file)
@@ -26,5 +26,5 @@
   </h1>
 
   <p class='deemphasize'><%= t ".reconfirm_html",
-                               :reconfirm => url_for(:action => 'confirm_resend')%></p>
+                               :reconfirm => url_for(:action => 'confirm_resend') %></p>
 <% end %>
index 960cf112854219d138c9f6db1b9df9159a71c8b4..deb0eab4c315bef77f2d94ab37ccbb89331a823d 100644 (file)
       <tr>
         <td colspan="2">
           <%= t '.showing',
-              :page => @user_pages.current_page.number,
-              :first_item => @user_pages.current_page.first_item,
-              :last_item => @user_pages.current_page.last_item,
-              :items => @user_pages.item_count,
-              :count => @user_pages.current_page.last_item - @user_pages.current_page.first_item + 1
-          %>
+                :page => @user_pages.current_page.number,
+                :first_item => @user_pages.current_page.first_item,
+                :last_item => @user_pages.current_page.last_item,
+                :items => @user_pages.item_count,
+                :count => @user_pages.current_page.last_item - @user_pages.current_page.first_item + 1 %>
           <% if @user_pages.page_count > 1 %>
           | <%= raw pagination_links_each(@user_pages, {}) { |n| link_to n, @params.merge(:page => n) } %>
           <% end %>
index 6f50526d9119b8825965b24c43d96c63e23daed0..d57f03ed9f88806d4b9eab82484722573c1a0963 100644 (file)
@@ -7,7 +7,7 @@
 <%= form_tag :action => 'lost_password' do %>
   <div class="standard-form">
     <label class="standard-label"><%= t '.email address' %></label>
-    <%= text_field('user', 'email', { :tabindex => 1) %>
+    <%= text_field('user', 'email', { :tabindex => 1 }) %>
     <%= submit_tag t('.new password button'), :tabindex => 2 %>
   </div>
 <% end %>
index 51983b94abb42a108df9721cafc522a7747c69d3..4138bf90d909eedae9aec024f6ce8da2a31dfbd8 100644 (file)
@@ -9,11 +9,11 @@
   <div class="standard-form">
     <fieldset>
       <label class="standard-label"><%= t '.password' %></label>
-      <%= password_field(:user, :pass_crypt, {:value => '', :tabindex => 4}) %>
+      <%= password_field(:user, :pass_crypt, { :value => '', :tabindex => 4 }) %>
     </fieldset>
     <fieldset>
       <label class="standard-label"><%= t '.confirm password' %></label>
-      <%= password_field(:user, :pass_crypt_confirmation, {:value => '', :tabindex => 5}) %>
+      <%= password_field(:user, :pass_crypt_confirmation, { :value => '', :tabindex => 5 }) %>
     </fieldset>
     <%= submit_tag t('.reset'), :tabindex => 6 %>
   </div>
index f62550928ff73b457f2de4ca3f93e14a8739baef..4f08b63513b550e123ed39e65bfff8307e9364f4 100644 (file)
@@ -11,7 +11,7 @@
             <span class='count-number'><%= number_with_delimiter(current_user.changesets.size) %></span>
           </li>
           <li>
-            <%= link_to t('.my notes'), :controller => 'notes', :action=> 'mine' %>
+            <%= link_to t('.my notes'), :controller => 'notes', :action => 'mine' %>
           </li>
           <li>
             <%= link_to t('.my traces'), :controller => 'traces', :action => 'mine' %>
@@ -22,7 +22,7 @@
             <span class='count-number'><%= number_with_delimiter(current_user.diary_entries.size) %></span>
           </li>
           <li>
-            <%= link_to t('.my comments' ), :controller => 'diary_entries', :action => 'comments', :display_name => current_user.display_name %>
+            <%= link_to t('.my comments'), :controller => 'diary_entries', :action => 'comments', :display_name => current_user.display_name %>
           </li>
           <li>
             <%= link_to t('.my settings'), :controller => 'users', :action => 'account', :display_name => current_user.display_name %>
@@ -53,7 +53,7 @@
             <span class='count-number'><%= number_with_delimiter(@user.changesets.size) %></span>
           </li>
           <li>
-            <%= link_to t('.notes'), :controller => 'notes', :action=> 'mine' %>
+            <%= link_to t('.notes'), :controller => 'notes', :action => 'mine' %>
           </li>
           <li>
             <%= link_to t('.traces'), :controller => 'traces', :action => 'index', :display_name => @user.display_name %>
           :lon => current_user.home_lon,
           :lat => current_user.home_lat,
           :icon => image_path("marker-red.png"),
-          :description => render(:partial => "popup", :object => current_user, :locals => {:type => "your location"})
+          :description => render(:partial => "popup", :object => current_user, :locals => { :type => "your location" })
         }
       %>
-      <%= content_tag "div", "", :id => "map", :class => "content_map", :data => {:user => user_data} %>
+      <%= content_tag "div", "", :id => "map", :class => "content_map", :data => { :user => user_data } %>
     <% end %>
 
     <% friends = @user.friends.collect { |f| f.befriendee } %>
         <li><%= link_to t('.friends_diaries'), friend_diaries_path %></li>
       </ul>
       <div id="friends-container">
-        <%= render :partial => "contact", :collection => friends, :locals => {:type => "friend"} %>
+        <%= render :partial => "contact", :collection => friends, :locals => { :type => "friend" } %>
       </div>
     <% end %>
   </div>
         <li><%= link_to t('.nearby_diaries'), nearby_diaries_path %></li>
       </ul>
       <div id="nearbyusers">
-        <%= render :partial => "contact", :collection => nearby, :locals => {:type => "nearby mapper"} %>
+        <%= render :partial => "contact", :collection => nearby, :locals => { :type => "nearby mapper" } %>
       </div>
     <% end %>
   </div>
index a836c859020a3d3526d538d60718ba4d4b58735a..acd617653df630fd4c620a1316195216affdd71d 100644 (file)
@@ -7,7 +7,7 @@
   <div class='header-illustration new-user-terms'></div>
 <% end %>
 
-<%= form_tag({:action => "save"}, { :class => " inner22 standard-form fillL" }) do %>
+<%= form_tag({ :action => "save" }, { :class => " inner22 standard-form fillL" }) do %>
   <!-- legale is <%= @legale %> -->
   <div class='form-row horizontal-list'>
     <label class="standard-label">
@@ -33,7 +33,7 @@
       <%= check_box('user', 'consider_pd') %>
       <%= t '.consider_pd' %>
     </label>
-    <span class="minorNote">(<%= link_to(t('.consider_pd_why'), t('.consider_pd_why_url'), :target => :new)%>)</span>
+    <span class="minorNote">(<%= link_to(t('.consider_pd_why'), t('.consider_pd_why_url'), :target => :new) %>)</span>
 
     <%= hidden_field_tag('referer', h(params[:referer])) unless params[:referer].nil? %>