]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'master' of git://git.openstreetmap.org/rails into openstreetbugs
authorKai Krueger <kakrueger@gmail.com>
Sun, 2 May 2010 10:42:58 +0000 (11:42 +0100)
committerKai Krueger <kakrueger@gmail.com>
Sun, 2 May 2010 10:42:58 +0000 (11:42 +0100)
1  2 
app/views/browse/_map.html.erb
config/environment.rb
config/locales/en.yml
config/routes.rb

index 5d7285840c05aa097bfbdc9fa1242213282b6b64,f41deff9513a94ac3378b71320a5fe21731768c6..0b7f76f238b80daf3416433d3194f275cde38835
@@@ -1,22 -1,20 +1,20 @@@
  <%= javascript_include_tag '/openlayers/OpenLayers.js' %>
  <%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
  <%= javascript_include_tag 'map.js' %>
- <td>
-   <div style="width: 250px; margin: auto; text-align: right"">
-     <% if map.instance_of? Changeset or map.visible %>
-       <div id="small_map" style="width:250px; height: 300px; border: solid 1px black">
-       </div>
-       <span id="loading"><%= t 'browse.map.loading' %></span>
-       <a id="area_larger_map" href=""></a>
-       <% unless map.instance_of? Changeset %>
-         <br />
-         <a id="object_larger_map" href=""></a>
-       <% end %>
-     <% else %>
-       <%= t 'browse.map.deleted' %>
-     <% end %>
+ <div id="browse_map">
+   <% if map.instance_of? Changeset or map.visible %>
+   <div id="small_map">
    </div>
- </td>
+   <span id="loading"><%= t 'browse.map.loading' %></span>
+   <a id="area_larger_map" href=""></a>
+   <% unless map.instance_of? Changeset %>
+     <br />
+     <a id="object_larger_map" href=""></a>
+   <% end %>
+   <% else %>
+     <%= t 'browse.map.deleted' %>
+   <% end %>
+ </div>
  <% if map.instance_of? Changeset or map.visible %>
    <script type="text/javascript">
      OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
  
          $("area_larger_map").href = '/?minlon='+minlon+'&minlat='+minlat+'&maxlon='+maxlon+'&maxlat='+maxlat+'&box=yes';
          $("area_larger_map").innerHTML = "<%= t 'browse.map.larger.area' %>";
 +      <% else if map.instance_of? MapBug %>
 +              $("loading").innerHTML = "";
 +              var centre = new OpenLayers.LonLat(<%= map.lon %>, <%= map.lat %>);
 +        var zoom = 16;
 +        setMapCenter(centre, zoom);
 +              marker = addMarkerToMap(centre);
 +              $("area_larger_map").href = '/?mlon=<%= map.lon %>&mlat=<%=map.lat %>';
 +        $("area_larger_map").innerHTML = "<%= t 'browse.map.larger.area' %>";
        <% else %>
          var obj_type = "<%= map.class.name.downcase %>";
          var obj_id = <%= map.id %>;
@@@ -74,7 -64,7 +72,7 @@@
              $("small_map").style.display = "none";
            }
          });
 -      <% end %>
 +      <% end end %>
      }
  
      window.onload = init;
diff --combined config/environment.rb
index 98fdfaa8c2b3709eb2271a7cc3745a2c3c0665a5,018e97451501ceacab36f74ac7e5148e2f6cb449..6158dfa8cdb3a7cd0dfaeebdea67d14188f43584
@@@ -13,6 -13,10 +13,10 @@@ SERVER_URL = ENV['OSM_SERVER_URL'] || '
  # Set the generator
  GENERATOR = ENV['OSM_SERVER_GENERATOR'] || 'OpenStreetMap server'
  
+ # Settings for generated emails (e.g. signup confirmation
+ EMAIL_FROM = ENV['OSM_EMAIL_FROM'] || 'OpenStreetMap <webmaster@openstreetmap.org>'
+ EMAIL_RETURN_PATH = ENV['OSM_EMAIL_RETURN_PATH'] || 'bounces@openstreetmap.org'
  # Application constants needed for routes.rb - must go before Initializer call
  API_VERSION = ENV['OSM_API_VERSION'] || '0.6'
  
@@@ -100,5 -104,4 +104,5 @@@ Rails::Initializer.run do |config
  
    # Make Active Record use UTC-base instead of local time
    config.active_record.default_timezone = :utc
 +
  end
diff --combined config/locales/en.yml
index abec2d991f1af9fce042d66e9070fc39ee628cf2,ba76a9b4afd04e945860a259fce22f48f201e70c..7e9046c4f75948484273a77f7e1e156cbe27ca55
@@@ -3,7 -3,7 +3,7 @@@ en
      dir: ltr
    time:
      formats:
-       friendly: "%e %B %Y at %H:%M"    
+       friendly: "%e %B %Y at %H:%M"
    activerecord:
      # Translates all the model names, which is used in error handling on the web site
      models:
@@@ -89,7 -89,7 +89,7 @@@
        feed:
          title: "Changeset {{id}}"
          title_comment: "Changeset {{id}} - {{comment}}"
-     changeset_navigation:
+     navigation:
        paging:
          user:
            prev: "&laquo; {{id}}"
            prev: "&laquo; {{id}}"
            next: "{{id}} &raquo;"
        user:
-         name_tooltip: "View edits by {{user}}"
-         prev_tooltip: "Previous edit by {{user}}"
-         next_tooltip: "Next edit by {{user}}"
+         name_changeset_tooltip: "View edits by {{user}}"
+         prev_changeset_tooltip: "Previous edit by {{user}}"
+         next_changeset_tooltip: "Next edit by {{user}}"
        all:
-         prev_tooltip: "Previous changeset"
-         next_tooltip: "Next changeset"
+         prev_node_tooltip: "Previous node"
+         next_node_tooltip: "Next node"
+         prev_way_tooltip: "Previous way"
+         next_way_tooltip: "Next way"
+         prev_relation_tooltip: "Previous relation"
+         next_relation_tooltip: "Next relation"
+         prev_changeset_tooltip: "Previous changeset"
+         next_changeset_tooltip: "Next changeset"
      changeset_details:
        created_at: "Created at:"
        closed_at: "Closed at:"
        has_relations:
          one:  "Has the following {{count}} relation:"
          other: "Has the following {{count}} relations:"
-     common_details: 
+     common_details:
        edited_at: "Edited at:"
        edited_by: "Edited by:"
        version: "Version:"
              # There is no 'relation' type because it is not represented in OpenLayers
      tag_details:
        tags: "Tags:"
+       wiki_link:
+         key: "The wiki description page for the {{key}} tag"
+         tag: "The wiki description page for the {{key}}={{value}} tag"
+       wikipedia_link: "The {{page}} article on Wikipedia"
      way_details:
        nodes: "Nodes:"
        part_of: "Part of:"
        download_xml: "Download XML"
        view_history: "view history"
        edit: "edit"
 +    bug:
 +      open_title: "Unresolved issue: {{bug_name}}"
 +      closed_title: "Resolved issue: {{bug_name}}"
 +      created_at: "Created at:"
 +      edited_at: "Edited at:"
 +      closed_at: "Closed at:"
 +      opened_by: "Opened by:"
 +      description: "Description:"
 +      comment_by: "Comment by: "
 +      comment: "Comment:"
 +      date: "Date:"
    changeset:
-     changeset_paging_nav: 
+     changeset_paging_nav:
        showing_page: "Showing page {{page}}"
        next: "Next &raquo;"
        previous: "&laquo; Previous"
      help_wiki: "Help &amp; Wiki"
      help_wiki_tooltip: "Help &amp; Wiki site for the project"
      help_wiki_url: "http://wiki.openstreetmap.org"
+     copyright: "Copyright &amp; License"
      news_blog: "News blog"
      news_blog_tooltip: "News blog about OpenStreetMap, free geographical data, etc."
      shop: Shop
      make_a_donation:
        title: Support OpenStreetMap with a monetary donation
        text: Make a Donation
+   license_page:
+     foreign:
+       title: About this translation
+       text: In the event of a conflict between this translated page and {{english_original_link}}, the English page shall take precedence
+       english_link: the English original
+     native:
+       title: About this page
+       text: You are viewing the English version of the copyright page. You can go back to the {{native_link}} of this pag or you can stop reading about copyright and {{mapping_link}}.
+       native_link: THIS_LANGUAGE_NAME_HERE version
+       mapping_link: start mapping
+     legal_babble: |
+       <h2>Copyright and License</h2>
+       <p>
+          OpenStreetMap is <i>open data</i>, licensed under the <a
+          href="http://creativecommons.org/licenses/by-sa/2.0/">Creative
+          Commons Attribution-ShareAlike 2.0</a> licence (CC-BY-SA).
+       </p>
+       <p>
+         You are free to copy, distribute, transmit and adapt our maps
+         and data, as long as you credit OpenStreetMap and its
+         contributors. If you alter or build upon our maps or data, you
+         may distribute the result only under the same licence. The
+         full <a
+         href="http://creativecommons.org/licenses/by-sa/2.0/legalcode">legal
+         code</a> explains your rights and responsibilities.
+       </p>
+       <h3>How to credit OpenStreetMap</h3>
+       <p>
+         If you are using OpenStreetMap map images, we request that
+         your credit reads at least &ldquo;&copy; OpenStreetMap
+         contributors, CC-BY-SA&rdquo;. If you are using map data only,
+         we request &ldquo;Map data &copy; OpenStreetMap contributors,
+         CC-BY-SA&rdquo;.
+       </p>
+       <p>
+         Where possible, OpenStreetMap should be hyperlinked to <a
+         href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a>
+         and CC-BY-SA to <a
+         href="http://creativecommons.org/licenses/by-sa/2.0/">http://creativecommons.org/licenses/by-sa/2.0/</a>. If
+         you are using a medium where links are not possible (e.g. a
+         printed work), we suggest you direct your readers to
+         www.openstreetmap.org (perhaps by expanding
+         &lsquo;OpenStreetMap&rsquo; to this full address) and to
+         www.creativecommons.org.
+       </p>
+       <h3>Finding out more</h3>
+       <p>
+         Read more about using our data at the <a
+         href="http://wiki.openstreetmap.org/wiki/Legal_FAQ">Legal
+         FAQ</a>.
+       </p>
+       <p>
+         OSM contributors are reminded never to add data from any
+         copyrighted sources (e.g. Google Maps or printed maps) without
+         explicit permission from the copyright holders.
+       </p>
+       <p>
+         Although OpenStreetMap is open data, we cannot provide a
+         free-of-charge map API for third-party developers.
+         See our <a href="http://wiki.openstreetmap.org/wiki/API_usage_policy">API Usage Policy</a>,
+         <a href="http://wiki.openstreetmap.org/wiki/Tile_usage_policy">Tile Usage Policy</a>
+         and <a href="http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy">Nominatim Usage Policy</a>.
+       </p>
+       <h3>Our contributors</h3>
+       <p>
+         Our CC-BY-SA licence requires you to &ldquo;give the Original
+         Author credit reasonable to the medium or means You are
+         utilising&rdquo;. Individual OSM mappers do not request a
+         credit over and above that to &ldquo;OpenStreetMap
+         contributors&rdquo;, but where data from a national mapping
+         agency or other major source has been included in
+         OpenStreetMap, it may be reasonable to credit them by directly
+         reproducing their credit or by linking to it on this page.
+       </p>
+       <!--
+       Information for page editors
+       The following lists only those organisations who require attribution
+       as a condition of their data being used in OpenStreetMap. It is not a
+       general catalogue of imports, and must not be used except when
+       attribution is required to comply with the licence of the imported
+       data.
+       Any additions here must be discussed with OSM sysadmins first.
+       -->
+       <ul id="contributors">
+           <li><strong>Australia</strong>: Contains suburb data based
+           on Australian Bureau of Statistics data.</li>
+           <li><strong>Canada</strong>: Contains data from
+           GeoBase&reg;, GeoGratis (&copy; Department of Natural
+           Resources Canada), CanVec (&copy; Department of Natural
+           Resources Canada), and StatCan (Geography Division,
+           Statistics Canada).</li>
+           <li><strong>New Zealand</strong>: Contains data sourced from
+           Land Information New Zealand. Crown Copyright reserved.</li>
+           <li><strong>United Kingdom</strong>: Contains Ordnance
+           Survey data &copy; Crown copyright and database right
+           2010.</li>
+       </ul>
+       <p>
+         Inclusion of data in OpenStreetMap does not imply that the original
+         data provider endorses OpenStreetMap, provides any warranty, or
+         accepts any liability.
+       </p>
    notifier:
      diary_comment_notification:
        subject: "[OpenStreetMap] {{user}} commented on your diary entry"
        subject: "Subject"
        date: "Date"
        no_messages_yet: "You have no messages yet. Why not get in touch with some of the {{people_mapping_nearby_link}}?"
-       people_mapping_nearby: "people mapping nearby" 
+       people_mapping_nearby: "people mapping nearby"
      message_summary:
        unread_button: "Mark as unread"
        read_button: "Mark as read"
        title: "No such message"
        heading: "No such message"
        body: "Sorry there is no message with that id."
-     outbox: 
+     outbox:
        title: "Outbox"
        my_inbox: "My {{inbox_link}}"
        inbox: "inbox"
        allow_write_api:   "modify the map."
        allow_read_gpx:    "read their private GPS traces."
        allow_write_gpx:   "upload GPS traces."
-     not_found: 
+     not_found:
        sorry: "Sorry, that {{type}} could not be found."
      create:
        flash: "Registered the information successfully"
      logout:
        title: "Logout"
        heading: "Logout from OpenStreetMap"
-       logout_button: "Logout"      
+       logout_button: "Logout"
      lost_password:
        title: "Lost password"
        heading: "Forgotten Password?"
        back: "View all blocks"
        revoker: "Revoker:"
        needs_view: "The user needs to log in before this block will be cleared."
 +  bugs:
 +    rss:
 +      description_area: "A list of bugs, reported, commented on or closed in your area [({{min_lat}}|{{min_lon}}) -- ({{max_lat}}|{{max_lon}})]"
 +      description_item: "An rss feed for bug {{id}}"
 +      closed: "closed bug (near {{place}})"
 +      new: "new bug (near {{place}})"
 +      comment: "new comment (near {{place}})"
 +    user:
 +      title_user: "Bugs submitted or commented on by {{user}}"
 +      heading_user: "{{user}}'s bugs"
 +      description_user: "Bugs submitted or commented on by {{user}}"
 +      id: "Id"
 +      last_changed: "Last changed"
 +
    javascripts:
      map:
        base:
diff --combined config/routes.rb
index 5975f48b7ed69bafab2a190cdda7efb6819810c7,9a86f920058a179eecdb1f7d3ba9183801a30287..d12bfbb5ae6391396f23c19db1f41a4a279f5602
@@@ -70,27 -70,6 +70,27 @@@ ActionController::Routing::Routes.draw 
    map.connect "api/#{API_VERSION}/amf/read", :controller =>'amf', :action =>'amf_read'
    map.connect "api/#{API_VERSION}/amf/write", :controller =>'amf', :action =>'amf_write'
    map.connect "api/#{API_VERSION}/swf/trackpoints", :controller =>'swf', :action =>'trackpoints'
 +
 +  # Map Bugs API  
 +  map.connect "api/#{API_VERSION}/bugs/getBugs", :controller =>'map_bugs', :action =>'get_bugs'
 +  map.connect "api/#{API_VERSION}/bugs/addPOIexec", :controller =>'map_bugs', :action =>'add_bug'
 +  map.connect "api/#{API_VERSION}/bugs/closePOIexec", :controller =>'map_bugs', :action =>'close_bug'
 +  map.connect "api/#{API_VERSION}/bugs/editPOIexec", :controller =>'map_bugs', :action =>'edit_bug'
 +  map.connect "api/#{API_VERSION}/bugs/getGPX", :controller =>'map_bugs', :action =>'gpx_bugs'
 +  map.connect "api/#{API_VERSION}/bugs/getRSSfeed", :controller =>'map_bugs', :action =>'rss'
 +
 +  map.connect "api/#{API_VERSION}/bugs", :controller => 'map_bugs', :action => 'get_bugs'
 +  map.connect "api/#{API_VERSION}/bugs/search", :controller => 'map_bugs', :action => 'search'
 +  map.connect "api/#{API_VERSION}/bugs/rss", :controller =>'map_bugs', :action =>'rss'
 +  map.connect "api/#{API_VERSION}/bug/create", :controller => 'map_bugs', :action => 'add_bug'
 +  map.connect "api/#{API_VERSION}/bug/:id/comment", :controller => 'map_bugs', :action => 'edit_bug', :id => /\d+/
 +  map.connect "api/#{API_VERSION}/bug/:id/close", :controller => 'map_bugs', :action => 'close_bug', :id => /\d+/
 +  map.connect "api/#{API_VERSION}/bug/:id", :controller => 'map_bugs', :action => 'read', :id => /\d+/, :conditions => { :method => :get }
 +  map.connect "api/#{API_VERSION}/bug/:id", :controller => 'map_bugs', :action => 'delete', :id => /\d+/, :conditions => { :method => :delete }
 +
 +  map.connect '/user/:display_name/bugs', :controller => 'map_bugs', :action => 'my_bugs'
 +  
 +
    
    # Data browsing
    map.connect '/browse', :controller => 'changeset', :action => 'list'
    map.changeset '/browse/changeset/:id', :controller => 'browse', :action => 'changeset', :id => /\d+/
    map.connect '/browse/changesets', :controller => 'changeset', :action => 'list'
    map.connect '/browse/changesets/feed', :controller => 'changeset', :action => 'list', :format => :atom
 +  map.connect '/browse/bug/:id', :controller => 'browse', :action => 'bug', :id => /\d+/
    
    # web site
    map.root :controller => 'site', :action => 'index'
    map.connect '/', :controller => 'site', :action => 'index'
    map.connect '/edit', :controller => 'site', :action => 'edit'
+   map.connect '/copyright', :controller => 'site', :action => 'copyright'
+   map.connect '/copyright/:copyright_locale', :controller => 'site', :action => 'copyright'
    map.connect '/history', :controller => 'changeset', :action => 'list'
    map.connect '/history/feed', :controller => 'changeset', :action => 'list', :format => :atom
    map.connect '/export', :controller => 'site', :action => 'export'