From: Tom Hughes Date: Thu, 8 Mar 2012 18:23:27 +0000 (+0000) Subject: Merge branch 'master' into openstreetbugs X-Git-Tag: live~5179^2~120 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/e660e609661edadc1ed5ad49d6e83e936b2f91cd?hp=-c Merge branch 'master' into openstreetbugs Conflicts: Gemfile Gemfile.lock lib/migrate.rb --- e660e609661edadc1ed5ad49d6e83e936b2f91cd diff --combined Gemfile index 0f867f3d5,c1bb2f50b..65de156e1 --- a/Gemfile +++ b/Gemfile @@@ -2,7 -2,7 +2,7 @@@ source 'http://rubygems.org' # Require rails - gem 'rails', '3.1.3' + gem 'rails', '3.2.2' # Require the postgres database driver gem 'pg' @@@ -11,21 -11,23 +11,24 @@@ gem 'jquery-rails' # Load rails plugins - gem 'rails-i18n-updater' + gem 'rails-i18n', ">= 0.5.1" gem 'dynamic_form' gem 'rinku', '>= 1.2.2', :require => 'rails_rinku' gem 'oauth-plugin', '>= 0.4.0.pre7' gem 'open_id_authentication', '>= 1.1.0' gem 'validates_email_format_of', '>= 1.5.1' - gem 'composite_primary_keys', '>= 4.1.1' + gem 'composite_primary_keys', '>= 5.0.0' + gem 'http_accept_language', '>= 1.0.2' + gem 'paperclip', '~> 2.0' + gem 'deadlock_retry', '>= 1.2.0' +gem 'jsonify-rails' + # Character conversion support for ruby 1.8 + gem 'iconv', :platforms => :ruby_18 + # Load libxml support for XML parsing and generation gem 'libxml-ruby', '>= 2.0.5', :require => 'libxml' - # Load ImageMagick support for user picture resizing - gem 'rmagick', :require => 'RMagick' - # Load HTML sanitizer gem 'sanitize' @@@ -36,8 -38,7 +39,7 @@@ gem 'SystemTimer', '>= 1.1.3', :requir gem 'httpclient' # Load memcache in case we are using it - gem 'memcache-client' - gem 'memcached' + gem 'memcached', '>= 1.4.1' # Gems needed for running tests group :test do @@@ -46,8 -47,8 +48,8 @@@ en # Gems needed for compiling assets group :assets do - gem 'sass-rails', " ~> 3.1.0" - gem 'coffee-rails', "~> 3.1.0" - gem 'uglifier' + gem 'sass-rails', '~> 3.2.3' + gem 'coffee-rails', '~> 3.2.1' + gem 'uglifier', '>= 1.0.3' gem 'therubyracer' end diff --combined Gemfile.lock index 482d9c3ed,4709cd195..e212d1003 --- a/Gemfile.lock +++ b/Gemfile.lock @@@ -2,76 -2,75 +2,80 @@@ GE remote: http://rubygems.org/ specs: SystemTimer (1.2.3) - actionmailer (3.1.3) - actionpack (= 3.1.3) - mail (~> 2.3.0) - actionpack (3.1.3) - activemodel (= 3.1.3) - activesupport (= 3.1.3) + actionmailer (3.2.2) + actionpack (= 3.2.2) + mail (~> 2.4.0) + actionpack (3.2.2) + activemodel (= 3.2.2) + activesupport (= 3.2.2) builder (~> 3.0.0) erubis (~> 2.7.0) - i18n (~> 0.6) - rack (~> 1.3.5) + journey (~> 1.0.1) + rack (~> 1.4.0) rack-cache (~> 1.1) - rack-mount (~> 0.8.2) rack-test (~> 0.6.1) - sprockets (~> 2.0.3) - activemodel (3.1.3) - activesupport (= 3.1.3) + sprockets (~> 2.1.2) + activemodel (3.2.2) + activesupport (= 3.2.2) builder (~> 3.0.0) - i18n (~> 0.6) - activerecord (3.1.3) - activemodel (= 3.1.3) - activesupport (= 3.1.3) - arel (~> 2.2.1) + activerecord (3.2.2) + activemodel (= 3.2.2) + activesupport (= 3.2.2) + arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.1.3) - activemodel (= 3.1.3) - activesupport (= 3.1.3) - activesupport (3.1.3) + activeresource (3.2.2) + activemodel (= 3.2.2) + activesupport (= 3.2.2) + activesupport (3.2.2) + i18n (~> 0.6) multi_json (~> 1.0) - addressable (2.2.6) - arel (2.2.1) + addressable (2.2.7) + arel (3.0.2) builder (3.0.0) - coffee-rails (3.1.1) + cocaine (0.2.1) + coffee-rails (3.2.2) coffee-script (>= 2.2.0) - railties (~> 3.1.0) + railties (~> 3.2.0) coffee-script (2.2.0) coffee-script-source execjs - coffee-script-source (1.1.3) - composite_primary_keys (4.1.1) - activerecord (~> 3.1) + coffee-script-source (1.2.0) + composite_primary_keys (5.0.1) + activerecord (~> 3.2.0) + deadlock_retry (1.2.0) dynamic_form (1.1.4) erubis (2.7.0) - execjs (1.2.9) + execjs (1.3.0) multi_json (~> 1.0) - faraday (0.7.5) - addressable (~> 2.2.6) - multipart-post (~> 1.1.3) - rack (< 2, >= 1.1.0) + faraday (0.7.6) + addressable (~> 2.2) + multipart-post (~> 1.1) + rack (~> 1.1) hike (1.2.1) - httpclient (2.2.3) + http_accept_language (1.0.2) + httpclient (2.2.4) i18n (0.6.0) - jquery-rails (1.0.18) - railties (~> 3.0) + iconv (0.1) + journey (1.0.3) + jquery-rails (2.0.1) + railties (>= 3.2.0, < 5.0) thor (~> 0.14) - json (1.6.1) - jsonify (0.2.0) - jsonify-rails (0.2.0) + json (1.6.5) ++ jsonify (0.3.1) ++ multi_json (~> 1.0) ++ jsonify-rails (0.3.1) + actionpack - jsonify (>= 0.2.0) ++ jsonify (>= 0.3.1) libv8 (3.3.10.4) libxml-ruby (2.2.2) - mail (2.3.0) - mail (2.4.1) ++ mail (2.4.3) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) - memcache-client (1.8.5) - memcached (1.3.5) + memcached (1.4.1) mime-types (1.17.2) - multi_json (1.0.3) - multipart-post (1.1.3) + multi_json (1.1.0) + multipart-post (1.1.5) nokogiri (1.5.0) oauth (0.4.5) oauth-plugin (0.4.0.rc2) @@@ -79,18 -78,21 +83,21 @@@ oauth (~> 0.4.4) oauth2 rack - oauth2 (0.5.1) - faraday (~> 0.7.4) - multi_json (~> 1.0.3) + oauth2 (0.5.2) + faraday (~> 0.7) + multi_json (~> 1.0) open_id_authentication (1.1.0) rack-openid (~> 1.3) - pg (0.11.0) + paperclip (2.7.0) + activerecord (>= 2.3.0) + activesupport (>= 2.3.2) + cocaine (>= 0.0.2) + mime-types + pg (0.13.2) polyglot (0.3.3) - rack (1.3.5) - rack-cache (1.1) + rack (1.4.1) - rack-cache (1.1) ++ rack-cache (1.2) rack (>= 0.4) - rack-mount (0.8.3) - rack (>= 1.0.0) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) @@@ -98,44 -100,40 +105,40 @@@ rack rack-test (0.6.1) rack (>= 1.0) - rails (3.1.3) - actionmailer (= 3.1.3) - actionpack (= 3.1.3) - activerecord (= 3.1.3) - activeresource (= 3.1.3) - activesupport (= 3.1.3) + rails (3.2.2) + actionmailer (= 3.2.2) + actionpack (= 3.2.2) + activerecord (= 3.2.2) + activeresource (= 3.2.2) + activesupport (= 3.2.2) bundler (~> 1.0) - railties (= 3.1.3) - rails-i18n-updater (1.0.1) - actionpack - activesupport - rails - railties (3.1.3) - actionpack (= 3.1.3) - activesupport (= 3.1.3) + railties (= 3.2.2) + rails-i18n (0.5.1) + i18n (~> 0.5) + railties (3.2.2) + actionpack (= 3.2.2) + activesupport (= 3.2.2) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (~> 0.14.6) rake (0.9.2.2) - rdoc (3.11) + rdoc (3.12) json (~> 1.4) - rinku (1.4.1) - rmagick (2.13.1) + rinku (1.5.1) ruby-openid (2.1.8) sanitize (2.0.3) - nokogiri (< 1.6, >= 1.4.4) - sass (3.1.10) - sass-rails (3.1.5) - actionpack (~> 3.1.0) - railties (~> 3.1.0) - sass (~> 3.1.10) - tilt (~> 1.3.2) - sprockets (2.0.3) + nokogiri (>= 1.4.4, < 1.6) + sass (3.1.15) + sass-rails (3.2.4) + railties (~> 3.2.0) + sass (>= 3.1.10) + tilt (~> 1.3) + sprockets (2.1.2) hike (~> 1.2) rack (~> 1.0) - tilt (!= 1.3.0, ~> 1.1) - therubyracer (0.9.9) + tilt (~> 1.1, != 1.3.0) + therubyracer (0.9.10) libv8 (~> 3.3.10) thor (0.14.6) tilt (1.3.3) @@@ -143,8 -141,8 +146,8 @@@ treetop (1.4.10) polyglot polyglot (>= 0.3.1) -- tzinfo (0.3.31) - uglifier (1.1.0) ++ tzinfo (0.3.32) + uglifier (1.2.3) execjs (>= 0.3.0) multi_json (>= 1.0.2) validates_email_format_of (1.5.3) @@@ -154,25 -152,26 +157,27 @@@ PLATFORM DEPENDENCIES SystemTimer (>= 1.1.3) - coffee-rails (~> 3.1.0) - composite_primary_keys (>= 4.1.1) + coffee-rails (~> 3.2.1) + composite_primary_keys (>= 5.0.0) + deadlock_retry (>= 1.2.0) dynamic_form + http_accept_language (>= 1.0.2) httpclient + iconv jquery-rails + jsonify-rails libxml-ruby (>= 2.0.5) - memcache-client - memcached + memcached (>= 1.4.1) oauth-plugin (>= 0.4.0.pre7) open_id_authentication (>= 1.1.0) + paperclip (~> 2.0) pg - rails (= 3.1.3) - rails-i18n-updater + rails (= 3.2.2) + rails-i18n (>= 0.5.1) rinku (>= 1.2.2) - rmagick sanitize - sass-rails (~> 3.1.0) + sass-rails (~> 3.2.3) therubyracer timecop - uglifier + uglifier (>= 1.0.3) validates_email_format_of (>= 1.5.1) diff --combined app/assets/stylesheets/common.css.scss index a0846e96e,12a5a8089..42b5f5397 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@@ -3,8 -3,10 +3,10 @@@ /* Default rules for the body of every page */ body { - font-family: Arial,sans-serif; - color: #000; + font-family: 'Helvetica Neue',Arial,sans-serif; + font-size: 14px; + line-height: 20px; + color: #222; background-color: #fff; margin: 0px; padding: 0px; @@@ -34,12 -36,22 +36,22 @@@ hr height: 1px; } + /* Default rules for headings */ + + h2 { + margin: 5px 0; + font-size: 25px; + line-height: 30px; + } + /* Rules for the whole left sidebar, including the logo */ #left { position: absolute; top: 0px; - min-width: 170px; + width: 185px; + font-size: 11px; + line-height: 12px; } /* Rules for the OpenStreetMap logo in the top left corner */ @@@ -48,22 -60,20 +60,20 @@@ width: 170px; min-width: 170px; padding: 5px; - margin: 5px; - height: 150px; - background: #fff; - border: 1px solid #ccd; - border-radius: 5px; - -moz-border-radius: 5px; + text-align: center; + margin: 25px 0 5px 0; } #logo h1 { - font-size: 14px; + font-size: 18px; + line-height: 20px; text-align: center; margin: 0px; } #logo h2 { font-size: 10px; + line-height: 15px; margin: 0px; } @@@ -76,13 -86,7 +86,7 @@@ /* Rules for the introductory text displayed in the left sidebar to new users */ #intro { - width: 170px; - padding: 5px; - margin: 5px; - border: 1px solid #ccc; - font-size: 11px; - border-radius: 5px; - -moz-border-radius: 5px; + border-top: 1px solid #ccc; } #intro p { @@@ -119,7 -123,7 +123,7 @@@ padding: 5px; border: 1px solid #ccc; background: #ea0; - line-height: 1.2em; + line-height: 20px; font-size: 14px; border-radius: 5px; -moz-border-radius: 5px; @@@ -128,21 -132,13 +132,13 @@@ /* Rules for the menu displayed in the left sidebar */ .left_menu { - width: 170px; - min-width: 170px; - margin: 5px; padding: 5px; - border: 1px solid #ccc; - background: #ddd; - line-height: 1.2em; + margin: 4px 0; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; + line-height: 20px; font-size: 14px; font-weight: bold; - border-radius: 5px; - -moz-border-radius: 5px; - } - - .left_menu td { - font-size: 12px; } .left_menu h1 { @@@ -182,22 -178,15 +178,15 @@@ */ .optionalbox { - width: 170px; - min-width: 170px; - margin: 5px; padding: 5px; - border: 1px solid #ccc; - line-height: 1.2em; - font-size: 12px; - background: #eee; - border-radius: 5px; - -moz-border-radius: 5px; + margin: 4px 0; + border-top: 1px solid #ccc; } .optionalbox h1 { font-size: 14px; font-weight: bold; - line-height: 22px; + line-height: 20px; margin: 0px; vertical-align: bottom; } @@@ -205,13 -194,13 +194,13 @@@ /* Rules for the search box */ .whereami { - line-height: 22px; + line-height: 20px; vertical-align: bottom; } .search_container { - height: 16px; - padding-bottom: 6px; + height: 15px; + padding-bottom: 5px; } #search_field form { @@@ -231,21 -220,19 +220,19 @@@ } .search_help { - font-size: 10px; - line-height: 1em; - margin-top: 3px; + margin-top: 2px; margin-bottom: 0px; } /* Rules for donation request box */ .donate { - width: 170px; - margin: 5px; + width: 155px; + margin: 10px 5px; padding: 5px; border: 1px solid #ccc; background: #cbeea7; - line-height: 1.2em; + line-height: 20px; text-align: center; font-size: 14px; border-radius: 5px; @@@ -261,66 -248,58 +248,58 @@@ /* Rules for tabbed navigation bar */ - #tabnav - { - height: 20px; - margin: 0px; - padding-top: 5px; - background: image-url('tab_bottom.gif') repeat-x bottom; + #top-bar { + border-bottom: 1px solid #ccc; + height: 29px; } - #tabnav li - { - margin: 0px; + #tabnav { + padding: 0; + margin: 0; + overflow:hidden; + } + + #tabnav li { + margin: 0px; padding: 0px; display: inline; list-style-type: none; } - #tabnav a, #tabnav a:link, #tabnav a:visited - { - background: #f3f3f3; - font-size: 13px; - line-height: 14px; + #tabnav a, #tabnav a:link, #tabnav a:visited { + background: #fff; + font-size: 14px; + line-height: 19px; font-weight: bold; - padding: 2px 10px; - border: 1px solid #ccc; + padding: 5px 10px; text-decoration: none; color: #333; - border-top-right-radius: 5px; - -moz-border-radius-topright: 5px; - border-top-left-radius: 5px; - -moz-border-radius-topleft: 5px; } - #tabnav a:link.active, #tabnav a:visited.active - { - border-bottom: 1px solid #fff; - background: #fff; + #tabnav a:link.active, #tabnav a:visited.active { + border-bottom: 1px solid #aaa; + background: #9ed485; color: #000; } - #tabnav a:link:hover, #tabnav a:visited:hover - { - background: #fff; + #tabnav a:link:hover, #tabnav a:visited:hover { + text-decoration:underline; } - #tabnav a:link.disabled, #tabnav a:visited.disabled, - #tabnav a:link:hover.disabled, #tabnav a:visited:hover.disabled - { - background: #bbbbbb; - color: white + #tabnav a:link.disabled, + #tabnav a:visited.disabled, + #tabnav a:link:hover.disabled, + #tabnav a:visited:hover.disabled { + color: #888; } /* Rules for greeting bar in the top right corner */ #greeting { - height: 20px; + height: 28px; margin: 0px; - padding-top: 5px; font-size: 13px; - line-height: 14px; - background: image-url('tab_bottom.gif') repeat-x bottom; + line-height: 28px; } .greeting-bar-unread { @@@ -338,8 -317,7 +317,7 @@@ /* Rules for OpenLayers maps */ #map { - border: 1px solid black; - margin: 0px; + margin: 0px; padding: 0px; } @@@ -353,10 -331,16 +331,16 @@@ #permalink { z-index: 10000; position: absolute; - bottom: 15px; - right: 15px; + bottom: 0px; + right: 0px; + padding: 5px; + background:#fff; text-align: right; - font-size: smaller; + font-size: 12px; + } + + #permalink a { + padding: 5px; } /* Rules for edit menu */ @@@ -396,7 -380,6 +380,6 @@@ #sidebar { display: none; position: absolute; - border: 1px solid black; margin: 0px; padding: 0px; width: 30%; @@@ -408,7 -391,7 +391,7 @@@ overflow: auto; position: absolute; font-size: 13px; - line-height: 14px; + line-height: 15px; top: 29px; bottom: 0px; left: 0px; @@@ -417,11 -400,10 +400,10 @@@ #sidebar .sidebar_title { margin: 0px; - padding: 3px 6px; + padding: 3px 6px 4px 6px; height: 29px; font-size: 14px; line-height: 15px; - border-bottom: 1px solid black; background: #bbb; } @@@ -454,14 -436,14 +436,14 @@@ .search_results_heading { margin: 0px; - padding: 3px 6px; - border: 1px solid #ccc; - background: #ddd; + padding: 2px 5px; + border-bottom: 1px solid #ccc; + font-weight: bold; } .search_results_entry { margin: 0px; - padding: 2px 6px; + padding: 2px 5px; } .search_results_error { @@@ -488,9 -470,9 +470,9 @@@ .export_heading { margin: 0px; - padding: 3px 6px; - border: 1px solid #ccc; - background: #ddd; + padding: 2px 5px; + border-bottom: 1px solid #ccc; + font-weight: bold; } .export_bounds { @@@ -531,11 -513,17 +513,17 @@@ /* Rules for the main content area */ #content { - padding: 0px; + padding: 10px; margin: 0px; - position: absolute; - bottom: 10px; - line-height: 1.2em; + position: absolute; + bottom: 0px; + } + + #content.site_index, + #content.site_edit, + #content.site_export { + border: 0px; + padding: 0px; } #slim_container { @@@ -654,23 -642,6 +642,23 @@@ table.browse_details th white-space: nowrap; } +td.browse_comments { + padding: 0px; +} + +td.browse_comments table { + border-collapse: collapse; +} + +td.browse_comments table td { + padding-bottom: 10px; +} + +td.browse_comments table td span.by { + font-size: small; + color: #999999; +} + #browse_map { width: 250px; } @@@ -744,6 -715,7 +732,7 @@@ position: relative; width: 90%; height: 400px; + border: 1px solid #ccc; display: none; } @@@ -847,6 -819,7 +836,7 @@@ p#contributorGuidance position: relative; width: 500px; height: 400px; + border: 1px solid #ccc; } #accountImage td { @@@ -875,6 -848,7 +865,7 @@@ position: relative; width: 400px; height: 400px; + border: 1px solid #ccc; } .user_view .user_map p#no_home_location { @@@ -993,18 -967,20 +984,20 @@@ .fieldName { vertical-align: top; font-weight: bold; + font-size: 12px; + line-height: 20px; } .minorNote { font-size: 0.8em; } - input[type="text"], input[type="email"], input[type="url"], input[type="password"], textarea { - border: 1px solid black; - } - - input[type="submit"] { - border: 1px solid black; + input[type="text"], + input[type="email"], + input[type="url"], + input[type="password"], + textarea { + border: 1px solid #888; } /* Rules for user images */ @@@ -1042,11 -1018,11 +1035,11 @@@ abbr.geo /* Rules for doing distinct colour of alternate table rows */ - .table0 { + .table0 { background: #f6f6f6; } - .table1 { + .table1 { background: #fff; } diff --combined app/assets/stylesheets/large.css index 9d664ef26,196b61c01..2cf195632 --- a/app/assets/stylesheets/large.css +++ b/app/assets/stylesheets/large.css @@@ -9,7 -9,7 +9,7 @@@ /* Rules for the main content area */ #content { - top: 35px; + top: 30px; } /* Rules for OpenLayers maps */ @@@ -17,9 -17,3 +17,9 @@@ .olControlPanZoom { display: none; } + +/* Rules for map bug reporting */ + +#reportbuganchor { + font-size: 150%; +} diff --combined app/helpers/application_helper.rb index b30129c5d,ce0c5d67b..dfbb04138 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@@ -89,7 -89,7 +89,7 @@@ module ApplicationHelpe url = "http://nominatim.openstreetmap.org/reverse?lat=#{lat}&lon=#{lon}&zoom=#{zoom}&accept-language=#{language}" begin - response = Timeout::timeout(4) do + response = OSM::Timer.timeout(4) do REXML::Document.new(Net::HTTP.get(URI.parse(url))) end rescue Exception @@@ -106,21 -106,13 +106,13 @@@ def user_image(user, options = {}) options[:class] ||= "user_image" - if user.image - image_tag url_for_file_column(user, "image"), options - else - image_tag "anon_large.png", options - end + image_tag user.image.url(:large), options end def user_thumbnail(user, options = {}) options[:class] ||= "user_thumbnail" - if user.image - image_tag url_for_file_column(user, "image"), options - else - image_tag "anon_small.png", options - end + image_tag user.image.url(:small), options end def preferred_editor @@@ -133,26 -125,6 +125,26 @@@ end end + def friendly_date(date) + content_tag(:span, time_ago_in_words(date), :title => l(date, :format => :friendly)) + end + + def note_author(object, link_options = {}) + if object.author.nil? + h(object.author_name) + else + link_to h(object.author_name), link_options.merge({:controller => "user", :action => "view", :display_name => object.author_name}) + end + end + + def with_format(format, &block) + old_format = @template_format + @template_format = format + result = block.call + @template_format = old_format + return result + end + private def javascript_strings_for_key(key) diff --combined app/views/site/index.html.erb index 7d7d5a163,0c47227f8..884896109 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@@ -18,9 -18,8 +18,9 @@@
@@@ -132,10 -131,6 +132,10 @@@ en OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>"); + <% if @user %> + var loginName = "<%= @user.display_name %>" + <% end %> + function mapInit(){ map = createMap("map"); @@@ -143,65 -138,6 +143,65 @@@ map.dataLayer = new OpenLayers.Layer("<%= I18n.t 'browse.start_rjs.data_layer_name' %>", { "visibility": false }); map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData); map.addLayer(map.dataLayer); + + map.noteLayer = new OpenLayers.Layer.Vector("Notes", { + visibility: false, + projection: new OpenLayers.Projection("EPSG:4326"), + styleMap: new OpenLayers.StyleMap(new OpenLayers.Style({ + graphicWidth: 22, + graphicHeight: 22, + graphicOpacity: 0.7, + graphicXOffset: -11, + graphicYOffset: -11 + }, { + rules: [ + new OpenLayers.Rule({ + filter: new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.EQUAL_TO, + property: "status", + value: "open" + }), + symbolizer: { + externalGraphic: "<%= image_path 'open_note_marker.png' %>" + } + }), + new OpenLayers.Rule({ + filter: new OpenLayers.Filter.Comparison({ + type: OpenLayers.Filter.Comparison.EQUAL_TO, + property: "status", + value: "closed" + }), + symbolizer: { + externalGraphic: "<%= image_path 'closed_note_marker.png' %>" + } + }) + ] + })), + strategies: [ + new OpenLayers.Strategy.BBOX() + ], + protocol: new OpenLayers.Protocol.HTTP({ + url: "<%= url_for :controller => :note, :action => :list, :format => :json %>", + format: new OpenLayers.Format.GeoJSON(), + callback: noteCallback + }) + }); + map.noteLayer.events.register("featureselected", map, noteSelected); + map.noteLayer.events.register("featureunselected", map, noteUnselected); + map.addLayer(map.noteLayer); + + map.noteControl = new OpenLayers.Control.SelectFeature(map.noteLayer, { + autoActivate: true + }); + map.addControl(map.noteControl); + + <% if params[:notes] == "yes" -%> + map.noteLayer.setVisibility(true); + <% end -%> + + $("#createnoteanchor").click(addNote); + + map.events.register("zoomend", map, allowNoteReports); <% end %> <% unless object_zoom %> @@@ -329,46 -265,6 +329,46 @@@ <% end %> } + function noteCallback(scope, response) { + for (var f = 0; f < response.features.length; f++) { + var feature = response.features[f]; + } + } + + function noteSelected(o) { + var feature = o.feature; + var location = feature.geometry.getBounds().getCenterLonLat(); + + feature.popup = new OpenLayers.Popup.FramedCloud( + feature.attributes.id, location, null, + "

" + feature.attributes.id + "

", + null, true, function (e) { map.noteControl.unselect(feature) } + ); + + map.addPopup(feature.popup); +// feature.popup.show(); + } + + function noteUnselected(o) { + var feature = o.feature; + + map.removePopup(feature.popup); + delete feature.popup; + } + + function addNote() { + map.noteLayer.setVisibility(true); + map.noteLayer.addNote(map.getCenter()); + } + + function allowNoteReports() { + if (map.getZoom() > 11) { + $("#createnoteanchor").show(); + } else { + $("#createnoteanchor").hide(); + } + } + $(document).ready(mapInit); $(document).ready(installEditHandler); $(document).ready(handleResize); diff --combined app/views/user/view.html.erb index 0c6968be8,1729f6818..edf290c7b --- a/app/views/user/view.html.erb +++ b/app/views/user/view.html.erb @@@ -21,11 -21,11 +21,13 @@@ | <%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %> | + <%= link_to t('user.view.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %> + | <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %> | - <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %> + <%= link_to t('user.view.my traces'), :controller => 'trace', :action=> 'mine' %> + | + <%= link_to t('user.view.my notes'), :controller => 'note', :action=> 'mine' %> | <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %> | @@@ -41,12 -41,12 +43,14 @@@ | <%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %> | + <%= link_to t('user.view.comments'), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %> + | <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %> | <%= link_to t('user.view.traces'), :controller => 'trace', :action => 'list', :display_name => @this_user.display_name %> | + <%= link_to t('user.view.notes'), :controller => 'note', :action=> 'mine' %> + | <% if @user and @user.is_friends_with?(@this_user) %> <%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %> <% else %> @@@ -122,7 -122,8 +126,8 @@@ <% if friends.empty? %> <%= t 'user.view.no friends' %> <% else %> - <%= link_to t('user.view.friends_changesets'), {:controller => 'browse', :action => 'friends'} %>

+ <%= link_to t('user.view.friends_changesets'), {:controller => 'browse', :action => 'friends'} %>
+ <%= link_to t('user.view.friends_diaries'), {:controller => 'diary', :action => 'friends'} %>

<%= render :partial => "contact", :collection => friends %>
@@@ -133,6 -134,8 +138,8 @@@ <% if nearby.empty? %> <%= t 'user.view.no nearby users' %> <% else %> + <%= link_to t('user.view.nearby_changesets'), {:controller => 'browse', :action => 'nearby'} %>
+ <%= link_to t('user.view.nearby_diaries'), {:controller => 'diary', :action => 'nearby'} %>

<%= render :partial => "contact", :collection => nearby %>
diff --combined config/example.application.yml index 90e2cc74e,420278a1f..501b3d2ad --- a/config/example.application.yml +++ b/config/example.application.yml @@@ -24,8 -24,6 +24,8 @@@ defaults: &default max_number_of_nodes: 50000 # Maximum number of nodes that can be in a way (checked on save) max_number_of_way_nodes: 2000 + # The maximum area you're allowed to request notes from, in square degrees + max_note_request_area: 25 # Zoom level to use for postcode results from the geocoder postcode_zoom: 15 # Zoom level to use for geonames results from the geocoder @@@ -57,8 -55,8 +57,8 @@@ # Location of GPX traces and images gpx_trace_dir: "/home/osm/traces" gpx_image_dir: "/home/osm/images" - # Location of data for file columns - #file_column_root: "" + # Location of data for attachments + attachments_dir: ":rails_root/public/attachments" # Log file to use #log_path: "" # List of memcache servers to use for caching diff --combined config/locales/de.yml index 47799b9e3,49b835742..3f196feed --- a/config/locales/de.yml +++ b/config/locales/de.yml @@@ -302,19 -302,33 +302,33 @@@ de list: description: Letzte Änderungen description_bbox: Letzte Änderungen in %{bbox} + description_friend: Änderungssätze deiner Freunde + description_nearby: Änderungssätze von Benutzern in der Nähe description_user: Letzte Änderungen von %{user} description_user_bbox: Letzte Änderungen von %{user} in %{bbox} heading: Änderungssätze heading_bbox: Änderungssätze + heading_friend: Änderungssätze + heading_nearby: Änderungssätze heading_user: Änderungssätze heading_user_bbox: Änderungssätze title: Änderungssätze title_bbox: Änderungssätze in %{bbox} + title_friend: Änderungssätze deiner Freunde + title_nearby: Änderungssätze von Benutzern in der Nähe title_user: Änderungssätze von %{user} title_user_bbox: Änderungssätze von %{user} in %{bbox} timeout: sorry: Es hat leider zu lange gedauert, die von dir angeforderten Änderungssätze abzurufen. diary_entry: + comments: + ago: vor %{ago} + comment: Kommentar + has_commented_on: "%{display_name} hat die folgenden Blogeinträge kommentiert" + newer_comments: Neuere Kommentare + older_comments: Ältere Kommentare + post: Blogeintrag + when: Zeitpunkt diary_comment: comment_from: Kommentar von %{link_user} am %{comment_created_at} confirm: Bestätigen @@@ -359,6 -373,8 +373,8 @@@ older_entries: Ältere recent_entries: "Neuste Einträge:" title: Blogs + title_friends: Tagebücher meiner Freunde + title_nearby: Tagebücher von Nutzern in der Nähe user_title: "%{user}s Blog" location: edit: Bearbeiten @@@ -406,11 -422,10 +422,10 @@@ licence: Lizenz longitude: "Längengrad:" manually_select: Einen anderen Bereich manuell auswählen - mapnik_image: Mapnik-Bild + map_image: Karte (zeigt die Standardebene) max: max. options: Optionen osm_xml_data: OpenStreetMap-XML-Daten - osmarender_image: Osmarender-Bild output: Ausgabe paste_html: HTML-Code kopieren, um ihn in eine Website einzufügen. scale: Maßstab @@@ -557,7 -572,7 +572,7 @@@ veterinary: Tierarzt village_hall: Gemeindezentrum waste_basket: Mülleimer - wifi: WLAN-Access-Point + wifi: WiFi-Zugang youth_centre: Jugendhaus boundary: administrative: Verwaltungsgrenze @@@ -906,6 -921,7 +921,7 @@@ base: cycle_map: Radfahrerkarte mapquest: MapQuest Open + standard: Standard transport_map: Verkehrskarte site: edit_disabled_tooltip: Reinzoomen zum Editieren der Karte @@@ -914,22 -930,6 +930,22 @@@ history_disabled_tooltip: Reinzoomen um Änderungen für diesen Bereich anzuzeigen history_tooltip: Änderungen für diesen Bereich anzeigen history_zoom_alert: Du musst näher heranzoomen, um die Chronik zu sehen + osb: + Fixed Error: Behobener Fehler + Unresolved Error: Offener Fehler + Description: Beschreibung + Comment: Kommentar + Has been fixed: Der Fehler wurde bereits behoben. Es kann jedoch bis zu einigen Tagen dauern, bis die Kartenansicht aktualisiert wird. + Comment/Close: Kommentieren/Schließen + Nickname: Benutzername + Add comment: Kommentar hinzufügen + Mark as fixed: Als behoben markieren + Cancel: Abbrechen + Create OpenStreetBug: OpenStreetBug melden + Create bug: Bug anlegen + Bug description: Fehlerbeschreibung + Create: Anlegeeen + Permalink: Permalink layouts: community_blogs: Blogs community_blogs_title: Blogs von Mitwirkenden bei OpenStreetMap @@@ -993,7 -993,7 +1009,7 @@@ english_link: dem englischsprachigen Original text: Für den Fall einer Abweichung zwischen der vorliegenden Übersetzung und %{english_original_link}, ist die englischsprachige Seite maßgebend. title: Über diese Übersetzung - legal_babble: "

Urheberrecht und Lizenz

\n\n

\n OpenStreetMap besteht aus freien Daten, die gemäß der Lizenz Creative Commons Attribution-ShareAlike 2.0 (CC-BY-SA) verfügbar sind.\n

\n

\n Es steht dir frei unsere Daten und Karten zu kopieren, weiterzugeben, zu übermittelt sowie anzupassen, sofern du OpenStreetMap und die Mitwirkenden als Quelle angibst. Für den Fall, dass du auf Basis unserer Daten und Karten Anpassungen vornimmst, oder sie als Basis für weitere Bearbeitungen verwendest, kannst du das Ergebnis auch nur gemäß der selben Lizenz weitergeben. Der vollständige Lizenztext ist unter Lizenz einsehbar und erläutert deine Rechte und Pflichten.\n

\n\n

So ist auf die Urheberschaft von OpenStreetMap hinzuweisen

\n

\n Sofern du Bilder von OpenStreetMap verwendest, so ist mindestens „© OpenStreetMap und Mitwirkende, CC-BY-SA“ als Quelle anzugeben. Werden hingegen ausschließlich Geodaten genutzt, so ist mindestens „Geodaten © OpenStreetMap und Mitwirkende, CC-BY-SA“ anzugeben.\n

\n

\n Wo möglich, muss ein Hyperlink auf OpenStreetMap http://www.openstreetmap.org/ und die Lizenz CC-BY-SA http://creativecommons.org/licenses/by-sa/2.0/ gesetzt werden. Für den Fall, dass du ein Medium einsetzt, bei dem keine derartigen Verweise möglich sind (z. B. ein gedrucktes Buch), schlagen wir vor, dass du deine Leser auf www.openstreetmap.org und www.creativecommons.org hinweist.\n

\n\n

Mehr hierzu in Erfahrung bringen

\n

\n Mehr dazu, wie unsere Daten verwendet werden können, ist unter Häufige rechtliche Fragen nachzulesen.\n

\n

\n Die Mitwirkenden von OpenStreetMap weisen wir darauf hin, dass du keinesfalls Daten aus urheberrechtlich geschützten Quellen verwenden darfst (z. B. Google Maps oder gedruckte Kartenwerke), ohne vorher die ausdrückliche Erlaubnis des Rechteinhabers erhalten zu haben.\n

\n

\n Obzwar OpenStreetMap aus freien Daten besteht, können wir Dritten keine kostenfreie Programmierschnittstelle (API) für Karten bereitstellen.\n \n Siehe hierzu die Richtlinie zur Nutzung einer API, die Richtlinie zur Nutzung von Kachelgrafiken und die Nutzungsrichtlinie bezüglich Daten von Nominatim.\n

\n\n

Unsere Mitwirkenden

\n

\n Die von uns verwendete Lizenz CC-BY-SA verlangt, dass du „für das betreffende Medium oder Mittel in angemessener Weise, auf die ursprünglichen Bearbeiter hinweist.“ Einige an OpenStreetMap Mitwirkende verlangen keine über den Vermerk „OpenStreetMap und Mitwirkende“ hinausgehende Hinweise. Wo allerdings Daten von nationalen Kartografierungsinstitutionen oder aus anderen umfangreichen Quellen einbezogen wurden, ist es sinnvoll, deren Lizenzhinweise direkt wiederzugeben oder auf diese auf dieser Website zu verlinken.\n

\n\n\n\n

\n Die Einbeziehung von Daten bei OpenStreetMap impliziert nicht, das der ursprüngliche Datenlieferant OpenStreetMap unterstützt, Gewährleistung gibt, noch Haftung übernimmt.\n

" + legal_babble: "

Urheberrecht und Lizenz

\n\n

\nOpenStreetMap ist „Open Data“, die gemäß der Lizenz Creative Commons Attribution-ShareAlike 2.0 (CC BY-SA) verfügbar sind.\n

\n

\n Es steht dir frei unsere Daten und Karten zu kopieren, weiterzugeben, zu übermittelt sowie anzupassen, sofern du OpenStreetMap und die Mitwirkenden als Quelle angibst. Für den Fall, dass du auf Basis unserer Daten und Karten Anpassungen vornimmst, oder sie als Basis für weitere Bearbeitungen verwendest, kannst du das Ergebnis auch nur gemäß der selben Lizenz weitergeben. Der vollständige Lizenztext ist unter Lizenz einsehbar und erläutert deine Rechte und Pflichten.\n

\n\n

So ist auf die Urheberschaft von OpenStreetMap hinzuweisen

\n

\n Sofern du Bilder von OpenStreetMap verwendest, so ist mindestens „© OpenStreetMap und Mitwirkende, CC BY-SA“ als Quelle anzugeben. Werden hingegen ausschließlich Geodaten genutzt, so ist mindestens „Geodaten © OpenStreetMap und Mitwirkende, CC BY-SA“ anzugeben.\n

\n

\n Wo möglich, muss ein Hyperlink auf OpenStreetMap http://www.openstreetmap.org/ und die Lizenz CC BY-SA http://creativecommons.org/licenses/by-sa/2.0/ gesetzt werden. Für den Fall, dass du ein Medium einsetzt, bei dem keine derartigen Verweise möglich sind (z. B. ein gedrucktes Buch), schlagen wir vor, dass du deine Leser auf www.openstreetmap.org und www.creativecommons.org hinweist.\n

\n\n

Mehr hierzu in Erfahrung bringen

\n

\n Mehr dazu, wie unsere Daten verwendet werden können, ist unter Häufige rechtliche Fragen nachzulesen.\n

\n

\n Die Mitwirkenden von OpenStreetMap weisen wir darauf hin, dass du keinesfalls Daten aus urheberrechtlich geschützten Quellen verwenden darfst (z. B. Google Maps oder gedruckte Kartenwerke), ohne vorher die ausdrückliche Erlaubnis des Rechteinhabers erhalten zu haben.\n

\n

\n Obwohl OpenStreetMap aus freien Daten besteht, können wir Dritten keine kostenfreie Programmierschnittstelle (API) für Karten bereitstellen.\n \n Siehe hierzu die Richtlinie zur Nutzung einer API, die Richtlinie zur Nutzung von Kachelgrafiken und die Nutzungsrichtlinie bezüglich Daten von Nominatim.\n

\n\n

Unsere Mitwirkenden

\n

\n Die von uns verwendete Lizenz CC BY-SA verlangt, dass du „für das betreffende Medium oder Mittel in angemessener Weise, auf die ursprünglichen Bearbeiter hinweist.“ Einige an OpenStreetMap Mitwirkende verlangen keine über den Vermerk „OpenStreetMap und Mitwirkende“ hinausgehende Hinweise. Wo allerdings Daten von nationalen Kartografierungsinstitutionen oder aus anderen umfangreichen Quellen einbezogen wurden, ist es sinnvoll, deren Lizenzhinweise direkt wiederzugeben oder auf diese auf dieser Website zu verlinken.\n

\n\n\n\n

\n Die Einbeziehung von Daten bei OpenStreetMap impliziert nicht, dass der ursprüngliche Datenlieferant OpenStreetMap unterstützt, Gewährleistung gibt, noch Haftung übernimmt.\n

" native: mapping_link: mit dem Kartieren anfangen native_link: deutschen Sprachversion @@@ -1005,13 -1005,19 +1021,19 @@@ inbox: date: Datum from: Absender + messages: Du hast %{new_messages} und %{old_messages} my_inbox: Posteingang + new_messages: + one: eine neue Nachricht + other: "%{count} neue Nachrichten" no_messages_yet: Du hast noch keine Nachrichten. Trete doch mit %{people_mapping_nearby_link} in Kontakt. + old_messages: + one: eine alte Nachricht + other: "%{count} alte Nachrichten" outbox: Gesendet people_mapping_nearby: Mappern in deiner Nähe subject: Betreff title: Posteingang - you_have: Du hast %{new_count} neue Nachrichten und %{old_count} alte Nachrichten mark: as_read: Nachricht als gelesen markiert as_unread: Nachricht als ungelesen markiert @@@ -1040,6 -1046,9 +1062,9 @@@ outbox: date: Datum inbox: Posteingang + messages: + one: Du hast eine Nachricht gesendet + other: Du hast %{count} Nachrichten gesendet my_inbox: "%{inbox_link}" no_sent_messages: Du hast noch keine Nachrichten versendet. Trete doch mit %{people_mapping_nearby_link} in Kontakt. outbox: Gesendet @@@ -1047,7 -1056,6 +1072,6 @@@ subject: Betreff title: Gesendet to: An - you_have_sent_messages: Du hast %{count} Nachrichten versendet read: back_to_inbox: Zurück zum Posteingang back_to_outbox: Zurück zu Gesendete Nachrichten @@@ -1501,8 -1509,8 +1525,8 @@@ summary_no_ip: "%{name} erstellt am %{date}" title: Benutzer login: + account is suspended: Dein Benutzerkonto wurde aufgrund verdächtiger Aktivitäten gesperrt.
Bitte kontaktiere den Webmaster, sofern du dies klären möchtest. account not active: Leider wurde dein Benutzerkonto bislang noch nicht aktiviert.
Bitte aktiviere dein Benutzerkonto, indem du auf den Link in deiner Bestätigungs-E-Mail klickst oder eine neue Bestätigungs-E-Mail anforderst. - account suspended: Dein Benutzerkonto wurde aufgrund verdächtiger Aktivitäten gesperrt, um potentiellen Schaden von OpenStreetMap abzuwenden.
Bitte kontaktiere den %{webmaster}, sofern du diese Angelegenheit klären möchtest. auth failure: Sorry, Anmelden mit diesen Daten nicht möglich. create account minute: Erstelle ein Benutzerkonto. Es dauert nur eine Minute. email or username: "E-Mail-Adresse oder Benutzername:" @@@ -1510,7 -1518,9 +1534,9 @@@ login_button: Anmelden lost password link: Passwort vergessen? new to osm: Neu bei OpenStreetMap? + no account: Du hast noch kein Benutzerkonto? notice: Informiere dich über den bevorstehenden Lizenzwechsel bei OpenStreetMap (Übersetzungen) (Diskussion) + notice_terms: OpenStreetMap stellt am 1. April 2012 auf eine neuen Lizenz um. Es handelt sich bei der neuen Lizenz um eine ebenso freie Lizenz, wie es die aktuelle ist, allerdings sind deren rechtliche Rahmenbedingungen besser auf die Bedürfnisse unserer Kartendatenbank abgestimmt. Wir würden es sehr begrüßen, sofern wir deine Beiträge zu OpenStreetMap weiterhin speichern und zugänglich machen könnten. Dies ist allerdings nur dann möglich, sofern du zustimmst, dass wir dies gemäß den Bedingungen der neuen Lizenz auch tun dürfen. Anderenfalls müssen wir deine Beiträge aus der Datenbank löschen.

Bitte melde dich an, um die neuen Bedingungen zu lesen und zu akzeptieren. Vielen Dank. openid: "%{logo} OpenID:" openid invalid: Deine OpenID scheint leider fehlerhaft zu sein. openid missing provider: Wir konnten leider keine Verbindung zu deinem OpenID-Dienst herstellen. @@@ -1539,7 -1549,6 +1565,6 @@@ remember: "Anmeldedaten merken:" title: Anmelden to make changes: Um Datenänderungen bei OpenStreetMap vornehmen zu können, musst Du ein Benutzerkonto haben. - webmaster: Webmaster with openid: "Alternativ kannst du deine OpenID zum Anmelden nutzen:" with username: "Hast du bereits ein Konto bei OpenStreetMap? Bitte melde dich mit deinem Benutzernamen und Passwort an:" logout: @@@ -1628,16 -1637,23 +1653,23 @@@ block_history: Erhaltene Sperren anzeigen blocks by me: Selbst vergebene Sperren blocks on me: Erhaltene Sperren + comments: Kommentare confirm: Bestätigen confirm_user: Bestätige den Benutzer create_block: Diesen Nutzer sperren created from: "erstellt aus:" + ct accepted: Vor %{ago} akzeptiert + ct declined: Abgelehnt + ct status: "Vereinbarung für Mitwirkende:" + ct undecided: Unentschlossen deactivate_user: Benutzer deaktivieren delete_user: Benutzer löschen description: Beschreibung diary: Blog edits: Bearbeitungen email address: "E-Mail-Adresse:" + friends_changesets: Alle Änderungssätze deiner Freunde durchsuchen + friends_diaries: Alle Tagebucheinträge von Freunden durchsuchen hide_user: Benutzer verstecken if set location: Wenn du deinen Standort angegeben hast, erscheint eine Karte am Seitenende. Du kannst deinen Standort in deinen %{settings_link} ändern. km away: "%{count} km entfernt" @@@ -1645,11 -1661,14 +1677,14 @@@ m away: "%{count} m entfernt" mapper since: "Mapper seit:" moderator_history: Vergebene Sperren anzeigen + my comments: Eigene Kommentare my diary: Eigener Blog my edits: Eigene Bearbeitungen my settings: Eigene Einstellungen my traces: Eigene Tracks nearby users: Anwender in der Nähe + nearby_changesets: Alle Änderungssätze von Benutzern in der Nähe durchsuchen + nearby_diaries: Alle Tagebucheinträge von Benutzern in der Nähe durchsuchen new diary entry: Neuer Blogeintrag no friends: Du hast bis jetzt keine Freunde hinzugefügt. no nearby users: Es gibt bisher keine Benutzer, die einen Standort in deiner Nähe angegeben haben. diff --combined config/locales/en.yml index 58965def1,c431de33e..3e9908bb5 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -121,8 -121,6 +121,8 @@@ en next_relation_tooltip: "Next relation" prev_changeset_tooltip: "Previous changeset" next_changeset_tooltip: "Next changeset" + prev_note_tooltip: "Previous note" + next_note_tooltip: "Next note" changeset_details: created_at: "Created at:" closed_at: "Closed at:" @@@ -284,15 -282,6 +284,15 @@@ download_xml: "Download XML" view_history: "view history" edit: "edit" + note: + open_title: "Unresolved issue: %{note_name}" + closed_title: "Resolved issue: %{note_name}" + opened: "Opened:" + last_modified: "Last modified:" + closed: "Closed:" + at_by: "%{when} ago by %{user}" + description: "Description:" + comments: "Comments:" changeset: changeset_paging_nav: showing_page: "Showing page %{page}" @@@ -319,18 -308,19 +319,19 @@@ title_bbox: "Changesets within %{bbox}" title_user_bbox: "Changesets by %{user} within %{bbox}" title_friend: "Changesets by your friends" - + title_nearby: "Changesets by nearby users" heading: "Changesets" heading_user: "Changesets" heading_bbox: "Changesets" heading_user_bbox: "Changesets" heading_friend: "Changesets" - + heading_nearby: "Changesets" description: "Recent changes" description_user: "Changesets by %{user}" description_bbox: "Changesets within %{bbox}" description_user_bbox: "Changesets by %{user} within %{bbox}" description_friend: "Changesets by your friends" + description_nearby: "Changesets by nearby users" timeout: sorry: "Sorry, the list of changesets you requested took too long to retrieve." diary_entry: @@@ -338,6 -328,8 +339,8 @@@ title: New Diary Entry list: title: "Users' diaries" + title_friends: "Friends' diaries" + title_nearby: "Nearby Users' diaries" user_title: "%{user}'s diary" in_language_title: "Diary Entries in %{language}" new: New Diary Entry @@@ -400,14 -392,21 +403,21 @@@ all: title: "OpenStreetMap diary entries" description: "Recent diary entries from users of OpenStreetMap" + comments: + has_commented_on: "%{display_name} has commented on the following diary entries" + post: Post + when: When + comment: Comment + ago: %{ago} ago + newer_comments: "Newer Comments" + older_comments: "Older Comments" export: start: area_to_export: "Area to Export" manually_select: "Manually select a different area" format_to_export: "Format to Export" osm_xml_data: "OpenStreetMap XML Data" - mapnik_image: "Mapnik Image" - osmarender_image: "Osmarender Image" + map_image: "Map Image (shows standard layer)" embeddable_html: "Embeddable HTML" licence: "Licence" export_details: 'OpenStreetMap data is licensed under the Creative Commons Attribution-ShareAlike 2.0 license.' @@@ -976,7 -975,7 +986,7 @@@ foundation_title: The OpenStreetMap Foundation sotm2011: 'Come to the 2011 OpenStreetMap Conference, The State of the Map, September 9-11th in Denver!' license: - alt: CC by-sa 2.0 + alt: CC BY-SA 2.0 title: OpenStreetMap data is licensed under the Creative Commons Attribution-Share Alike 2.0 Generic License make_a_donation: title: Support OpenStreetMap with a monetary donation @@@ -997,7 -996,7 +1007,7 @@@

OpenStreetMap is open data, licensed under the Creative - Commons Attribution-ShareAlike 2.0 licence (CC-BY-SA). + Commons Attribution-ShareAlike 2.0 licence (CC BY-SA).

You are free to copy, distribute, transmit and adapt our maps @@@ -1013,14 -1012,14 +1023,14 @@@

If you are using OpenStreetMap map images, we request that your credit reads at least “© OpenStreetMap - contributors, CC-BY-SA”. If you are using map data only, + contributors, CC BY-SA”. If you are using map data only, we request “Map data © OpenStreetMap contributors, - CC-BY-SA”. + CC BY-SA”.

Where possible, OpenStreetMap should be hyperlinked to http://www.openstreetmap.org/ - and CC-BY-SA to http://creativecommons.org/licenses/by-sa/2.0/. If you are using a medium where links are not possible (e.g. a printed work), we suggest you direct your readers to @@@ -1051,7 -1050,7 +1061,7 @@@

Our contributors

- Our CC-BY-SA licence requires you to “give the Original + Our CC BY-SA licence requires you to “give the Original Author credit reasonable to the medium or means You are utilising”. Individual OSM mappers do not request a credit over and above that to “OpenStreetMap @@@ -1078,7 -1077,7 +1088,7 @@@ on Australian Bureau of Statistics data.

  • Austria: Contains data from Stadt Wien under - CC-BY.
  • + CC BY.
  • Canada: Contains data from GeoBase®, GeoGratis (© Department of Natural Resources Canada), CanVec (© Department of Natural @@@ -1090,7 -1089,12 +1100,12 @@@ Land Information New Zealand. Crown Copyright reserved.
  • Poland: Contains data from UMP-pcPL maps. Copyright - UMP-pcPL contributors.
  • + UMP-pcPL contributors. + + More about OSM's use of UMP data +
  • South Africa: Contains data sourced from + Chief Directorate: + National Geo-Spatial Information, State copyright reserved.
  • United Kingdom: Contains Ordnance Survey data © Crown copyright and database right 2010.
  • @@@ -1190,19 -1194,18 +1205,25 @@@ greeting: "Hi," hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account." click_the_link: "If this is you, please click the link below to reset your password." + note_plain: + subject_own: "[OpenStreetMap] %{commenter} has commented on one of your notes" + subject_other: "[OpenStreetMap] %{commenter} has commented on a note you are interested in" + greeting: "Hi," + your_note: "%{commenter} has left a comment on one of your map notes near %{place}." + commented_note: "%{commenter} has left a comment on a map note you have commented on. The note is near %{place}." + details: "More details about the note can be found at %{URL}." message: inbox: title: "Inbox" my_inbox: "My inbox" outbox: "outbox" - you_have: "You have %{new_count} new messages and %{old_count} old messages" + messages: "You have %{new_messages} and %{old_messages}" + new_messages: + one: "%{count} new message" + other: "%{count} new messages" + old_messages: + one: "%{count} old message" + other: "%{count} old messages" from: "From" subject: "Subject" date: "Date" @@@ -1235,7 -1238,9 +1256,9 @@@ my_inbox: "My %{inbox_link}" inbox: "inbox" outbox: "outbox" - you_have_sent_messages: "You have %{count} sent messages" + messages: + one: "You have %{count} sent message" + other: "You have %{count} sent messages" to: "To" subject: "Subject" date: "Date" @@@ -1549,7 -1554,7 +1572,7 @@@ email or username: "Email Address or Username:" password: "Password:" openid: "%{logo} OpenID:" - remember: "Remember me:" + remember: "Remember me" lost password link: "Lost your password?" login_button: "Login" register now: Register now @@@ -1558,9 -1563,9 +1581,9 @@@ new to osm: New to OpenStreetMap? to make changes: To make changes to the OpenStreetMap data, you must have an account. create account minute: Create an account. It only takes a minute. + no account: Don't have an account? account not active: "Sorry, your account is not active yet.
    Please use the link in the account confirmation email to activate your account, or request a new confirmation email." - account suspended: Sorry, your account has been suspended due to suspicious activity.
    Please contact the %{webmaster} if you wish to discuss this. - webmaster: webmaster + account is suspended: Sorry, your account has been suspended due to suspicious activity.
    Please contact the webmaster if you wish to discuss this. auth failure: "Sorry, could not log in with those details." notice: "Find out more about OpenStreetMap's upcoming license change (translations) (discussion)" notice_terms: "OpenStreetMap is moving to a new licence on 1st April 2012. It's just as open as our current one, but the legal bits are much better suited to our map database. We'd love to keep your contributions in OpenStreetMap, but we can only do so if you agree to let us distribute them under the new licence. Otherwise, we'll have to remove them from the database.

    Please log in, then take a few seconds to review and accept the new terms. Thank you!" @@@ -1664,8 -1669,8 +1687,9 @@@ new diary entry: new diary entry my edits: my edits my traces: my traces + my notes: my map notes my settings: my settings + my comments: my comments oauth settings: oauth settings blocks on me: blocks on me blocks by me: blocks by me @@@ -1673,7 -1678,6 +1697,7 @@@ diary: diary edits: edits traces: traces + notes: map notes remove as friend: remove as friend add as friend: add as friend mapper since: "Mapper since:" @@@ -1708,6 -1712,7 +1732,7 @@@ moderator: "Revoke moderator access" block_history: "view blocks received" moderator_history: "view blocks given" + comments: "comments" create_block: "block this user" activate_user: "activate this user" deactivate_user: "deactivate this user" @@@ -1717,6 -1722,9 +1742,9 @@@ delete_user: "delete this user" confirm: "Confirm" friends_changesets: "Browse all changesets by friends" + friends_diaries: "Browse all diary entries by friends" + nearby_changesets: "Browse all changesets by nearby users" + nearby_diaries: "Browse all diary entries by nearby users" popup: your location: "Your location" nearby mapper: "Nearby mapper" @@@ -1930,30 -1938,10 +1958,29 @@@ back: "View all blocks" revoker: "Revoker:" needs_view: "The user needs to log in before this block will be cleared." + note: + description: + opened_at_by: "Created %{when} ago by %{user}" + commented_at_by: "Updated %{when} ago by %{user}" + closed_at_by: "Resolved %{when} ago by %{user}" + reopened_at_by: "Reactivated %{when} ago by %{user}" + rss: + title: "OpenStreetMap Notes" + description_area: "A list of notes, reported, commented on or closed in your area [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})]" + description_item: "An rss feed for note %{id}" + closed: "closed note (near %{place})" + new: "new note (near %{place})" + comment: "new comment (near %{place})" + mine: + title: "Notes submitted or commented on by %{user}" + heading: "%{user}'s notes" + description: "Notes submitted or commented on by %{user}" + id: "Id" + last_changed: "Last changed" javascripts: map: base: - mapnik: Mapnik - osmarender: Osmarender + standard: Standard cycle_map: Cycle Map transport_map: Transport Map mapquest: MapQuest Open @@@ -1966,23 -1954,3 +1993,23 @@@ history_tooltip: View edits for this area history_disabled_tooltip: Zoom in to view edits for this area history_zoom_alert: You must zoom in to view edits for this area + note: + closed: Closed Note + open: Open Note + details: Details + permalink: Permalink + description: Description + comment: Comment + render_warning: This error has been fixed already. However, it might take a couple of days before the map image is updated. + update: Update + nickname: Nickname + login: Login + add_comment: Add Comment + close: Close + cancel: Cancel + create: Create Note + create_title: Report a problem with the map + create_help1: Please drag the marker to the location of the problem + create_help2: and descripe it as accurate as possible + report: Report Problem + edityourself: You can also edit the map directly your self diff --combined config/routes.rb index 62c263f0d,89f7e1951..fb4fcd426 --- a/config/routes.rb +++ b/config/routes.rb @@@ -70,28 -70,11 +70,28 @@@ OpenStreetMap::Application.routes.draw match 'api/0.6/gpx/:id/data.:format' => 'trace#api_data' # AMF (ActionScript) API - match 'api/0.6/amf/read' => 'amf#amf_read' match 'api/0.6/amf/write' => 'amf#amf_write' match 'api/0.6/swf/trackpoints' => 'swf#trackpoints' + # Map notes API + match 'api/0.6/notes' => 'note#list' + match 'api/0.6/notes.:format' => 'note#list' + match 'api/0.6/notes/search' => 'note#search' + match 'api/0.6/notes/rss' => 'notes#rss' + match 'api/0.6/note/create' => 'note#create' + match 'api/0.6/note/:id/comment' => 'note#update', :id => /\d+/ + match 'api/0.6/note/:id/close' => 'note#close', :id => /\d+/ + match 'api/0.6/note/:id' => 'note#read', :via => :get, :id => /\d+/ + match 'api/0.6/note/:id.:format' => 'note#read', :via => :get, :id => /\d+/ + match 'api/0.6/note/:id' => 'note#delete', :via => :delete, :id => /\d+/ + match 'api/0.6/notes/getBugs' => 'note#list' + match 'api/0.6/notes/addPOIexec' => 'note#create' + match 'api/0.6/notes/closePOIexec' => 'note#close' + match 'api/0.6/notes/editPOIexec' => 'note#update' + match 'api/0.6/notes/getGPX' => 'note#list', :format => :gpx + match 'api/0.6/notes/getRSSfeed' => 'note#rss' + # Data browsing match '/browse/start' => 'browse#start' match '/browse/way/:id' => 'browse#way', :id => /\d+/ @@@ -104,17 -87,16 +104,18 @@@ match '/user/:display_name/edits' => 'changeset#list' match '/user/:display_name/edits/feed' => 'changeset#feed', :format => :atom match '/browse/friends' => 'changeset#list', :friends => true + match '/browse/nearby' => 'changeset#list', :nearby => true match '/browse/changesets' => 'changeset#list' match '/browse/changesets/feed' => 'changeset#feed', :format => :atom + match '/browse/note/:id' => 'browse#note', :id => /\d+/ + match '/user/:display_name/notes' => 'note#mine' match '/browse' => 'changeset#list' # web site - match '/' => 'site#index' + root :to => 'site#index' match '/edit' => 'site#edit' - match '/copyright' => 'site#copyright' match '/copyright/:copyright_locale' => 'site#copyright' + match '/copyright' => 'site#copyright' match '/history' => 'changeset#list' match '/history/feed' => 'changeset#feed', :format => :atom match '/export' => 'site#export' @@@ -173,9 -155,13 +174,13 @@@ # diary pages match '/diary/new' => 'diary_entry#new' + match '/diary/friends' => 'diary_entry#list', :friends => true + match '/diary/nearby' => 'diary_entry#list', :nearby => true match '/user/:display_name/diary/rss' => 'diary_entry#rss', :format => :rss match '/diary/:language/rss' => 'diary_entry#rss', :format => :rss match '/diary/rss' => 'diary_entry#rss', :format => :rss + match '/user/:display_name/diary/comments/:page' => 'diary_entry#comments', :page => /\d+/ + match '/user/:display_name/diary/comments/' => 'diary_entry#comments' match '/user/:display_name/diary' => 'diary_entry#list' match '/diary/:language' => 'diary_entry#list' match '/diary' => 'diary_entry#list' diff --combined lib/migrate.rb index 8f7e635f1,7549add2a..75e047815 --- a/lib/migrate.rb +++ b/lib/migrate.rb @@@ -42,184 -42,89 +42,102 @@@ module ActiveRecor end end - if defined?(ActiveRecord::ConnectionAdapters::MysqlAdapter) - class MysqlAdapter - alias_method :old_native_database_types, :native_database_types - - def native_database_types - types = old_native_database_types - types[:bigint] = { :name => "bigint", :limit => 20 } - types[:double] = { :name => "double" } - types[:integer_pk] = { :name => "integer DEFAULT NULL auto_increment PRIMARY KEY" } - types[:bigint_pk] = { :name => "bigint(20) DEFAULT NULL auto_increment PRIMARY KEY" } - types[:bigint_pk_64] = { :name => "bigint(64) DEFAULT NULL auto_increment PRIMARY KEY" } - types[:bigint_auto_64] = { :name => "bigint(64) DEFAULT NULL auto_increment" } - types[:bigint_auto_11] = { :name => "bigint(11) DEFAULT NULL auto_increment" } - types[:bigint_auto_20] = { :name => "bigint(20) DEFAULT NULL auto_increment" } - types[:four_byte_unsigned] = { :name=> "integer unsigned" } - types[:inet] = { :name=> "integer unsigned" } - - enumerations.each do |e,v| - types[e.to_sym]= { :name => "enum('#{v.join '\',\''}')" } - end - - types - end - - def change_column(table_name, column_name, type, options = {}) - unless options_include_default?(options) - options[:default] = select_one("SHOW COLUMNS FROM #{table_name} LIKE '#{column_name}'")["Default"] - - unless type == :string or type == :text - options.delete(:default) if options[:default] = ""; - end - end - - change_column_sql = "ALTER TABLE #{table_name} CHANGE #{column_name} #{column_name} #{type_to_sql(type, options[:limit], options[:precision], options[:scale])}" - add_column_options!(change_column_sql, options) - execute(change_column_sql) - end - - def myisam_table - return { :id => false, :force => true, :options => "ENGINE=MyIsam" } - end - - def innodb_table - return { :id => false, :force => true, :options => "ENGINE=InnoDB" } - end - - def innodb_option - return "ENGINE=InnoDB" - end - - def change_engine (table_name, engine) - execute "ALTER TABLE #{table_name} ENGINE = #{engine}" - end - - def add_fulltext_index (table_name, column) - execute "CREATE FULLTEXT INDEX `#{table_name}_#{column}_idx` ON `#{table_name}` (`#{column}`)" - end - - def enumerations - @enumerations ||= Hash.new - end - - def create_enumeration (enumeration_name, values) - enumerations[enumeration_name] = values - end - - def drop_enumeration (enumeration_name) - enumerations.delete(enumeration_name) - end + class PostgreSQLAdapter + alias_method :old_native_database_types, :native_database_types + + def native_database_types + types = old_native_database_types + types[:double] = { :name => "double precision" } + types[:integer_pk] = { :name => "serial PRIMARY KEY" } + types[:bigint_pk] = { :name => "bigserial PRIMARY KEY" } + types[:bigint_pk_64] = { :name => "bigserial PRIMARY KEY" } + types[:bigint_auto_64] = { :name => "bigint" } #fixme: need autoincrement? + types[:bigint_auto_11] = { :name => "bigint" } #fixme: need autoincrement? + types[:bigint_auto_20] = { :name => "bigint" } #fixme: need autoincrement? + types[:four_byte_unsigned] = { :name => "bigint" } # meh + types[:inet] = { :name=> "inet" } + + enumerations.each_key do |e| + types[e.to_sym]= { :name => e } + end + + types + end - def alter_primary_key(table_name, new_columns) - execute("alter table #{table_name} drop primary key, add primary key (#{new_columns.join(',')})") - end + def myisam_table + return { :id => false, :force => true, :options => ""} + end - def interval_constant(interval) - "'#{interval}'" - end + def innodb_table + return { :id => false, :force => true, :options => ""} end - end - if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) - class PostgreSQLAdapter - alias_method :old_native_database_types, :native_database_types - - def native_database_types - types = old_native_database_types - types[:double] = { :name => "double precision" } - types[:integer_pk] = { :name => "serial PRIMARY KEY" } - types[:bigint_pk] = { :name => "bigserial PRIMARY KEY" } - types[:bigint_pk_64] = { :name => "bigserial PRIMARY KEY" } - types[:bigint_auto_64] = { :name => "bigint" } #fixme: need autoincrement? - types[:bigint_auto_11] = { :name => "bigint" } #fixme: need autoincrement? - types[:bigint_auto_20] = { :name => "bigint" } #fixme: need autoincrement? - types[:four_byte_unsigned] = { :name => "bigint" } # meh - types[:inet] = { :name=> "inet" } - - enumerations.each_key do |e| - types[e.to_sym]= { :name => e } - end - - types - end + def innodb_option + return "" + end - def myisam_table - return { :id => false, :force => true, :options => ""} - end + def change_engine (table_name, engine) + end - def innodb_table - return { :id => false, :force => true, :options => ""} - end + def add_fulltext_index (table_name, column) + execute "CREATE INDEX #{table_name}_#{column}_idx on #{table_name} (#{column})" + end - def innodb_option - return "" - end + def enumerations + @enumerations ||= Hash.new + end - def change_engine (table_name, engine) - end - def create_enumeration (enumeration_name, values) ++ def create_enumeration(enumeration_name, values) + enumerations[enumeration_name] = values - execute "create type #{enumeration_name} as enum ('#{values.join '\',\''}')" ++ execute "CREATE TYPE #{enumeration_name} AS ENUM ('#{values.join '\',\''}')" + end - def add_fulltext_index (table_name, column) - execute "CREATE INDEX #{table_name}_#{column}_idx on #{table_name} (#{column})" - end - def drop_enumeration (enumeration_name) - execute "drop type #{enumeration_name}" ++ def drop_enumeration(enumeration_name) ++ execute "DROP TYPE #{enumeration_name}" + enumerations.delete(enumeration_name) + end - def enumerations - @enumerations ||= Hash.new - end ++ def rename_enumeration(old_name, new_name) ++ execute "ALTER TYPE #{quote_table_name(old_name)} RENAME TO #{quote_table_name(new_name)}" ++ end + - def create_enumeration(enumeration_name, values) - enumerations[enumeration_name] = values - execute "CREATE TYPE #{enumeration_name} AS ENUM ('#{values.join '\',\''}')" - end + def alter_primary_key(table_name, new_columns) - execute "alter table #{table_name} drop constraint #{table_name}_pkey; alter table #{table_name} add primary key (#{new_columns.join(',')})" ++ execute "ALTER TABLE #{table_name} DROP CONSTRAINT #{table_name}_pkey" ++ execute "ALTER TABLE #{table_name} ADD PRIMARY KEY (#{new_columns.join(',')})" + end - def drop_enumeration(enumeration_name) - execute "DROP TYPE #{enumeration_name}" - enumerations.delete(enumeration_name) - end + def interval_constant(interval) + "'#{interval}'::interval" + end - def rename_enumeration(old_name, new_name) - execute "ALTER TYPE #{quote_table_name(old_name)} RENAME TO #{quote_table_name(new_name)}" - end + def add_index(table_name, column_name, options = {}) + column_names = Array(column_name) + index_name = index_name(table_name, :column => column_names) - def alter_primary_key(table_name, new_columns) - execute "ALTER TABLE #{table_name} DROP CONSTRAINT #{table_name}_pkey" - execute "ALTER TABLE #{table_name} ADD PRIMARY KEY (#{new_columns.join(',')})" + if Hash === options # legacy support, since this param was a string + index_type = options[:unique] ? "UNIQUE" : "" + index_name = options[:name] || index_name + index_method = options[:method] || "BTREE" + else + index_type = options end - def interval_constant(interval) - "'#{interval}'::interval" + quoted_column_names = column_names.map { |e| quote_column_name(e) } + if Hash === options and options[:lowercase] + quoted_column_names = quoted_column_names.map { |e| "LOWER(#{e})" } end + quoted_column_names = quoted_column_names.join(", ") - def add_index(table_name, column_name, options = {}) - column_names = Array(column_name) - index_name = index_name(table_name, :column => column_names) - - if Hash === options # legacy support, since this param was a string - index_type = options[:unique] ? "UNIQUE" : "" - index_name = options[:name] || index_name - index_method = options[:method] || "BTREE" - else - index_type = options - end - - quoted_column_names = column_names.map { |e| quote_column_name(e) } - if Hash === options and options[:lowercase] - quoted_column_names = quoted_column_names.map { |e| "LOWER(#{e})" } - end - quoted_column_names = quoted_column_names.join(", ") - - execute "CREATE #{index_type} INDEX #{quote_column_name(index_name)} ON #{quote_table_name(table_name)} USING #{index_method} (#{quoted_column_names})" - end + execute "CREATE #{index_type} INDEX #{quote_column_name(index_name)} ON #{quote_table_name(table_name)} USING #{index_method} (#{quoted_column_names})" end + + def rename_index(table_name, old_name, new_name) + execute "ALTER INDEX #{quote_table_name(old_name)} RENAME TO #{quote_table_name(new_name)}" + end + + def rename_sequence(table_name, old_name, new_name) + execute "ALTER SEQUENCE #{quote_table_name(old_name)} RENAME TO #{quote_table_name(new_name)}" + end end end end