From: Tom Hughes Date: Tue, 14 Jul 2009 08:03:24 +0000 (+0000) Subject: Merge 16110:16487 from trunk. X-Git-Tag: live~7788^2~18 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/64fb530581ffd21e2522e70e8a2d4c46d666f760?ds=inline;hp=-c Merge 16110:16487 from trunk. --- 64fb530581ffd21e2522e70e8a2d4c46d666f760 diff --combined app/controllers/changeset_controller.rb index 40c619e13,d7f3d39c8..cc1758bf3 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@@ -7,7 -7,6 +7,7 @@@ class ChangesetController < Application before_filter :authorize_web, :only => [:list, :list_user, :list_bbox] before_filter :set_locale, :only => [:list, :list_user, :list_bbox] before_filter :authorize, :only => [:create, :update, :delete, :upload, :include, :close] + before_filter :require_allow_write_api, :only => [:create, :update, :delete, :upload, :include, :close] before_filter :require_public_data, :only => [:create, :update, :delete, :upload, :include, :close] before_filter :check_api_writable, :only => [:create, :update, :delete, :upload, :include] before_filter :check_api_readable, :except => [:create, :update, :delete, :upload, :download, :query] @@@ -256,79 -255,54 +256,54 @@@ # list edits (open changesets) in reverse chronological order def list conditions = conditions_nonempty - - - # @changesets = Changeset.find(:all, :order => "closed_at DESC", :conditions => ['closed_at < ?', DateTime.now], :limit=> 20) - - - #@edit_pages, @edits = paginate(:changesets, - # :include => [:user, :changeset_tags], - # :conditions => conditions, - # :order => "changesets.created_at DESC", - # :per_page => 20) - # - - @edits = Changeset.find(:all, - :order => "changesets.created_at DESC", - :conditions => conditions, - :limit => 20) - - end - - ## - # list edits (changesets) belonging to a user - def list_user - user = User.find_by_display_name(params[:display_name], :conditions => {:visible => true}) - - if user - @display_name = user.display_name - if not user.data_public? and @user != user - @edits = nil - render - else - conditions = cond_merge conditions, ['user_id = ?', user.id] - conditions = cond_merge conditions, conditions_nonempty - @edit_pages, @edits = paginate(:changesets, - :include => [:user, :changeset_tags], - :conditions => conditions, - :order => "changesets.created_at DESC", - :per_page => 20) + + if params[:display_name] + user = User.find_by_display_name(params[:display_name], :conditions => { :visible => true }) + + if user + if user.data_public? or user == @user + conditions = cond_merge conditions, ['user_id = ?', user.id] + else + conditions = cond_merge conditions, ['false'] + end + elsif request.format == :html + @title = t 'user.no_such_user.title' + @not_found_user = params[:display_name] + render :template => 'user/no_such_user', :status => :not_found end - else - @not_found_user = params[:display_name] - render :template => 'user/no_such_user', :status => :not_found end - end - - ## - # list changesets in a bbox - def list_bbox - # support 'bbox' param or alternatively 'minlon', 'minlat' etc - if params['bbox'] - bbox = params['bbox'] - elsif params['minlon'] and params['minlat'] and params['maxlon'] and params['maxlat'] - bbox = h(params['minlon']) + ',' + h(params['minlat']) + ',' + h(params['maxlon']) + ',' + h(params['maxlat']) + + if params[:bbox] + bbox = params[:bbox] + elsif params[:minlon] and params[:minlat] and params[:maxlon] and params[:maxlat] + bbox = params[:minlon] + ',' + params[:minlat] + ',' + params[:maxlon] + ',' + params[:maxlat] + end + + if bbox + conditions = cond_merge conditions, conditions_bbox(bbox) + bbox = BoundingBox.from_s(bbox) + bbox_link = "#{bbox.to_s}" + end + + @title = t 'changeset.list.title' + + if user and bbox + @description = t 'changeset.list.description_user_bbox', :user => user.display_name, :bbox => bbox_link + elsif user + @description = t 'changeset.list.description_user', :user => user.display_name + elsif bbox + @description = t 'changeset.list.description_bbox', :bbox => bbox_link else - #TODO: fix bugs in location determination for history tab (and other tabs) then uncomment this redirect - #redirect_to :action => 'list' - - # For now just render immediately, and skip the db - render - return + @description = t 'changeset.list.description' end - - conditions = conditions_bbox(bbox); - conditions = cond_merge conditions, conditions_nonempty - + @edit_pages, @edits = paginate(:changesets, :include => [:user, :changeset_tags], :conditions => conditions, :order => "changesets.created_at DESC", :per_page => 20) - - @bbox = sanitise_boundaries(bbox.split(/,/)) unless bbox==nil end - + private #------------------------------------------------------------ # utility functions below. diff --combined config/locales/de.yml index 0374fc84b,c5718bec2..2a2b167f8 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@@ -72,6 -72,10 +72,10 @@@ de description: "Beschreibung" languages: "Sprachen" pass_crypt: "Passwort" + printable_name: + with_id: "{{id}}" + with_version: "{{id}}, v{{version}}" + with_name: "{{name}} ({{id}})" map: view: Karte edit: Bearbeiten @@@ -79,7 -83,7 +83,7 @@@ browse: changeset: title: "Changeset" - changeset: "Changeset:" + changeset: "Changeset: {{id}}" download: "{{changeset_xml_link}} oder {{osmchange_xml_link}} herunterladen" changesetxml: "Changeset XML" osmchangexml: "osmChange XML" @@@ -100,17 -104,22 +104,22 @@@ version: "Version:" in_changeset: "Im Changeset:" containing_relation: - relation: "Relation {{relation_name}}" - relation_as: "(als {{relation_role}})" + entry: "Relation {{relation_name}}" + entry_role: "Relation {{relation_name}} (als {{relation_role}})" map: loading: "Laden..." deleted: "Gelöscht" - view_larger_map: "Größere Karte anzeigen" + larger: + area: "Bereich größerer Karte" + node: "Knoten auf größerer Karte" + way: "Weg auf größerer Karte" + relation: "Relation auf größerer Karte" node_details: coordinates: "Koordinaten: " part_of: "Teil von:" node_history: node_history: "Knoten-Chronik" + node_history_title: "Knoten-Chronik: {{node_name}}" download: "{{download_xml_link}} oder {{view_details_link}}" download_xml: "XML herunterladen" view_details: "Detailseite anzeigen" @@@ -137,7 -146,12 +146,12 @@@ relation_history: "Relations-Chronik" relation_history_title: "Relations-Chronik: {{relation_name}}" relation_member: - as: "des Typs" + entry: "{{type}} {{name}}" + entry_role: "{{type}} {{name}} als {{role}}" + type: + node: "Knoten" + way: "Weg" + relation: "Relation" relation: relation: "Relation" relation_title: "Relation: {{relation_name}}" @@@ -324,9 -338,15 +338,15 @@@ add_marker: "Markierung zur Karte hinzufügen" view_larger_map: "Größere Karte anzeigen" geocoder: + search: + title: + latlon: 'Suchergebnisse von Internal' + us_postcode: 'Suchergebnisse von Geocoder.us' + uk_postcode: 'Suchergebnisse von NPEMap / FreeThe Postcode' + ca_postcode: 'Suchergebnisse von Geocoder.CA' + osm_namefinder: 'Suchergebnisse von OpenStreetMap Namefinder' + geonames: 'Suchergebnisse von GeoNames' results: - results: "Suchergebnisse" - type_from_source: "{{type}} von {{source_link}}" no_results: "Keine Ergebnisse" layouts: project_name: @@@ -375,7 -395,7 +395,7 @@@ donate_link_text: Spende help_wiki: "Hilfe & Wiki" help_wiki_tooltip: "Hilfe & Wiki; Wiki des Projekts" - help_wiki_url: "http://wiki.openstreetmap.org/wiki/Hauptseite" + help_wiki_url: "http://wiki.openstreetmap.org/index.php?title=Hauptseite&uselang=de" news_blog: "News-Blog" news_blog_tooltip: "News-Blog über OpenStreetMap, freie geographische Daten, etc." shop: Shop @@@ -541,6 -561,7 +561,7 @@@ js_2: "OpenStreetMap nutzt Javascript für die Kartendarstellung." js_3: 'Solltest bei dir kein Javascript möglich sein, kannst du auf der Tiles@Home Website eine Version ohne Javascript benutzen.' permalink: Permalink + shortlink: Shortlink license: notice: "Lizenziert unter {{license_name}} Lizenz durch das {{project_name}} und seine Mitwirkenden." license_name: "Creative Commons Attribution-Share Alike 2.0" @@@ -563,7 -584,6 +584,6 @@@ search: Suchen where_am_i: "Wo bin ich?" submit_text: "Go" - searching: "Suche..." search_help: "Beispiele: 'München', 'Heinestraße, Würzburg', 'CB2 5AQ', oder 'post offices near Lünen' mehr Beispiele..." key: map_key: "Legende" @@@ -584,10 -604,18 +604,18 @@@ footway: "Fussweg" rail: "Eisenbahn" subway: "U-Bahn" - tram: "Straßenbahn, Stadtbahn" - cable: "Seilbahn" - runway: "Start-/Landebahn, Rollfeld" - apron: "Vorfeld, Flughafengebäude" + tram: + - Light rail + - tram + cable: + - Cable car + - chair lift + runway: + - Airport Runway + - taxiway + apron: + - Airport apron + - terminal admin: "Landesgrenzen, sonstige Grenzen" forest: "Forst" wood: "Naturwald" @@@ -595,12 -623,16 +623,16 @@@ park: "Park" resident: "Wohngebiet" tourist: "Touristenattraktion" - common: "Wiese, Grünfläche" + common: + - Common + - meadow retail: "Einkaufszentrum" industrial: "Industriegebiet" commercial: "Gewerbegebiet" heathland: "Heide" - lake: "See, Stausee" + lake: + - Lake + - reservoir farm: "Landwirtschaft" brownfield: "Brachland" cemetery: "Friedhof" @@@ -612,7 -644,9 +644,9 @@@ school: "Schule, Universität" building: "Besonderes Gebäude" station: "Bahnhof" - summit: "Gipfel, Bergspitze" + summit: + - Summit + - peak tunnel: "Gestrichelter Rand = Tunnel" bridge: "Dicker Rand = Brücke" private: "Privater Zugang" @@@ -671,7 -705,7 +705,7 @@@ edit: "bearbeiten" owner: "Besitzer:" description: "Beschreibung:" - tags: "Tags" + tags: "Tags:" none: "Keine" make_public: "Mache diesen Track öffentlich" edit_track: "Diesen Track bearbeiten" @@@ -703,21 -737,6 +737,21 @@@ scheduled_for_deletion: "Für Löschung vorgesehener Track" make_public: made_public: "veröffentlichter Track" + oauth: + client_application: + request_access: "Die Anwendung {{app_name}} möchte auf Deinen OpenStreetMap-Account zugreifen. Bitte entscheide, ob Du der Anwendung die folgenden Rechte gewähren möchtest. Du kannst alle oder einige der folgenden Rechte gewähren:" + allow_to: "Erlaube der Anwendung:" + allow_read_prefs: "Deine Benutzereinstellungen zu lesen" + allow_write_prefs: "Deine Benutzereinstellungen zu verändern" + allow_write_diary: "Blog-Einträge und Kommentare zu schreiben und Freunde einzutragen" + allow_write_api: "Die OSM-Datenbank zu ändern" + allow_read_gpx: "Deine privaten GPS-Tracks auszulesen" + allow_write_gpx: "GPS-Tracks hochzuladen" + token: + none: "Du hast bislang keinen Anwendungen Zugriff auf Deinen Account gewährt. Du musst jetzt nichts unternehmen, denn die Anwendungen werden Dich dazu auffordern, wenn es nötig ist. Zu einem späteren Zeitpunkt kannst Du in diesem Menü sehen, welche Anwendungen Zugriff erhalten haben, und kannst diese Erlaubnis hier auch widerrufen." + application: "Anwendung" + issued: "Zugriff gewährt" + revoke: "widerrufen" user: login: title: "Anmelden" @@@ -799,7 -818,7 +833,7 @@@ public editing: heading: "Öffentliches Bearbeiten: " enabled: "Aktiviert. Nicht anonym, bearbeiten der Kartendaten möglich." - enabled link: "http://wiki.openstreetmap.org/wiki/Disabling_anonymous_edits" + enabled link: "http://wiki.openstreetmap.org/wiki/Anonymous_edits" enabled link text: "Was ist das?" disabled: "Deaktiviert, bearbeiten von Daten nicht möglich, alle bisherigen Bearbeitungen sind anonym." disabled link text: "Warum kann ich nichts bearbeiten?" diff --combined config/locales/en.yml index 46accb8bd,5ae59e38d..95fd929d0 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -72,6 -72,10 +72,10 @@@ en description: "Description" languages: "Languages" pass_crypt: "Password" + printable_name: + with_id: "{{id}}" + with_version: "{{id}}, v{{version}}" + with_name: "{{name}} ({{id}})" map: view: View edit: Edit @@@ -79,10 -83,18 +83,18 @@@ browse: changeset: title: "Changeset" - changeset: "Changeset:" + changeset: "Changeset: {{id}}" download: "Download {{changeset_xml_link}} or {{osmchange_xml_link}}" changesetxml: "Changeset XML" osmchangexml: "osmChange XML" + changeset_navigation: + user: + name_tooltip: "View edits by {{user}}" + prev_tooltip: "Previous edit by {{user}}" + next_tooltip: "Next edit by {{user}}" + all: + prev_tooltip: "Previous changeset" + next_tooltip: "Next changeset" changeset_details: created_at: "Created at:" closed_at: "Closed at:" @@@ -91,26 -103,37 +103,37 @@@ no_bounding_box: "No bounding box has been stored for this changeset." show_area_box: "Show Area Box" box: "box" - has_nodes: "Has the following {{count}} nodes:" - has_ways: "Has the following {{count}} ways:" - has_relations: "Has the following {{count}} relations:" + has_nodes: + one: "Has the following {{count}} node:" + other: "Has the following {{count}} nodes:" + has_ways: + one: "Has the following {{count}} way:" + other: "Has the following {{count}} ways:" + has_relations: + one: "Has the following {{count}} relation:" + other: "Has the following {{count}} relations:" common_details: edited_at: "Edited at:" edited_by: "Edited by:" version: "Version:" in_changeset: "In changeset:" containing_relation: - relation: "Relation {{relation_name}}" - relation_as: "(as {{relation_role}})" + entry: "Relation {{relation_name}}" + entry_role: "Relation {{relation_name}} (as {{relation_role}})" map: loading: "Loading..." deleted: "Deleted" - view_larger_map: "View Larger Map" + larger: + area: "View area on larger map" + node: "View node on larger map" + way: "View way on larger map" + relation: "View relation on larger map" node_details: coordinates: "Coordinates: " part_of: "Part of:" node_history: node_history: "Node History" + node_history_title: "Node History: {{node_name}}" download: "{{download_xml_link}} or {{view_details_link}}" download_xml: "Download XML" view_details: "view details" @@@ -136,8 -159,16 +159,16 @@@ relation_history: relation_history: "Relation History" relation_history_title: "Relation History: {{relation_name}}" + download: "{{download_xml_link}} or {{view_details_link}}" + download_xml: "Download XML" + view_details: "view details" relation_member: - as: "as" + entry: "{{type}} {{name}}" + entry_role: "{{type}} {{name}} as {{role}}" + type: + node: "Node" + way: "Way" + relation: "Relation" relation: relation: "Relation" relation_title: "Relation: {{relation_name}}" @@@ -222,27 -253,12 +253,12 @@@ user: "User" comment: "Comment" area: "Area" - list_bbox: - history: "History" - changesets_within_the_area: "Changesets within the area:" - show_area_box: "show area box" - no_changesets: "No changesets" - all_changes_everywhere: "For all changes everywhere see {{recent_changes_link}}" - recent_changes: "Recent Changes" - no_area_specified: "No area specified" - first_use_view: "First use the {{view_tab_link}} to pan and zoom to an area of interest, then click the history tab." - view_the_map: "view the map" - view_tab: "view tab" - alternatively_view: "Alternatively, view all {{recent_changes_link}}" list: - recent_changes: "Recent Changes" - recently_edited_changesets: "Recently edited changesets:" - for_more_changesets: "For more changesets, select a user and view their edits, or see the editing 'history' of a specific area." - list_user: - edits_by_username: "Edits by {{username_link}}" - no_visible_edits_by: "No visible edits by {{name}}." - for_all_changes: "For changes by all users see {{recent_changes_link}}" - recent_changes: "Recent Changes" + title: "Changesets" + description: "Recent edits" + description_user: "Recent edits by {{user}}" + description_bbox: "Recent edits within {{bbox}}" + description_user_bbox: "Recent edits by {{user}} within {{bbox}}" diary_entry: new: title: New Diary Entry @@@ -324,10 -340,44 +340,44 @@@ add_marker: "Add a marker to the map" view_larger_map: "View Larger Map" geocoder: + search: + title: + latlon: 'Results from Internal' + us_postcode: 'Results from Geocoder.us' + uk_postcode: 'Results from NPEMap / FreeThe Postcode' + ca_postcode: 'Results from Geocoder.CA' + osm_namefinder: 'Results from OpenStreetMap Namefinder' + geonames: 'Results from GeoNames' + search_osm_namefinder: + prefix: "{{type}} " + suffix_place: ", {{distance}} {{direction}} of {{placename}}" + suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} of {{parentname}})" + suffix_suburb: "{{suffix}}, {{parentname}}" + description: + title: + osm_namefinder: '{{types}} from OpenStreetMap Namefinder' + geonames: 'Location from GeoNames' + types: + cities: Cities + towns: Towns + places: Places + description_osm_namefinder: + prefix: "{{distance}} {{direction}} of {{type}} " results: - results: "Results" - type_from_source: "{{type}} from {{source_link}}" no_results: "No results found" + distance: + zero: "less than 1km" + one: "about 1km" + other: "about {{count}}km" + direction: + south_west: "south-west" + south: "south" + south_east: "south-east" + east: "east" + north_east: "north-east" + north: "north" + north_west: "north-west" + west: "west" layouts: project_name: # in @@@ -541,6 -591,7 +591,7 @@@ js_2: "OpenStreetMap uses javascript for its slippy map." js_3: 'You may want to try the <a href="http://tah.openstreetmap.org/Browse/">Tiles@Home static tile browser</a> if you are unable to enable javascript.' permalink: Permalink + shortlink: Shortlink license: notice: "Licensed under the {{license_name}} license by the {{project_name}} and its contributors." license_name: "Creative Commons Attribution-Share Alike 2.0" @@@ -555,7 -606,7 +606,7 @@@ anon_edits_link: "http://wiki.openstreetmap.org/wiki/Disabling_anonymous_edits" anon_edits_link_text: "Find out why this is the case." flash_player_required: 'You need a Flash player to use Potlatch, the OpenStreetMap Flash editor. You can <a href="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">download Flash Player from Adobe.com</a>. <a href="http://wiki.openstreetmap.org/wiki/Editing">Several other options</a> are also available for editing OpenStreetMap.' - potlatch_unsaved_changes: "You have unsaved changes. (To save in Potlatch, you should deselect the current way or point, if editing in list mode, or click save if you have a save button.)" + potlatch_unsaved_changes: "You have unsaved changes. (To save in Potlatch, you should deselect the current way or point, if editing in live mode, or click save if you have a save button.)" sidebar: search_results: Search Results close: Close @@@ -563,7 -614,6 +614,6 @@@ search: Search where_am_i: "Where am I?" submit_text: "Go" - searching: "Searching..." search_help: "examples: 'Alkmaar', 'Regent Street, Cambridge', 'CB2 5AQ', or 'post offices near Lünen' <a href='http://wiki.openstreetmap.org/wiki/Search'>more examples...</a>" key: map_key: "Map key" @@@ -584,10 -634,18 +634,18 @@@ footway: "Footway" rail: "Railway" subway: "Subway" - tram: "Light rail; tram" - cable: "Cable car; chair lift" - runway: "Airport Runway; taxiway" - apron: "Airport apron; terminal" + tram: + - Light rail + - tram + cable: + - Cable car + - chair lift + runway: + - Airport Runway + - taxiway + apron: + - Airport apron + - terminal admin: "Administrative boundary" forest: "Forest" wood: "Wood" @@@ -595,12 -653,16 +653,16 @@@ park: "Park" resident: "Residential area" tourist: "Tourist attraction" - common: "Common; meadow" + common: + - Common + - meadow retail: "Retail area" industrial: "Industrial area" commercial: "Commercial area" heathland: "Heathland" - lake: "Lake; reservoir" + lake: + - Lake + - reservoir farm: "Farm" brownfield: "Brownfield site" cemetery: "Cemetery" @@@ -612,7 -674,9 +674,9 @@@ school: "School; university" building: "Significant building" station: "Railway station" - summit: "Summit; peak" + summit: + - Summit + - peak tunnel: "Dashed casing = tunnel" bridge: "Black casing = bridge" private: "Private access" @@@ -636,6 -700,7 +700,7 @@@ owner: "Owner:" description: "Description:" tags: "Tags:" + tags_help: "comma delimited" save_button: "Save Changes" no_such_user: title: "No such user" @@@ -645,6 -710,7 +710,7 @@@ upload_gpx: "Upload GPX File" description: "Description" tags: "Tags" + tags_help: "comma delimited" public: "Public?" public_help: "what does this mean?" public_help_url: "http://wiki.openstreetmap.org/wiki/Visibility_of_GPS_traces" @@@ -671,7 -737,7 +737,7 @@@ edit: "edit" owner: "Owner:" description: "Description:" - tags: "Tags" + tags: "Tags:" none: "None" make_public: "Make this track public permanently" edit_track: "Edit this track" @@@ -703,21 -769,6 +769,21 @@@ scheduled_for_deletion: "Track scheduled for deletion" make_public: made_public: "Track made public" + oauth: + client_application: + request_access: "The application {{app_name}} is requesting access to your account. Please check whether you would like the application to have the following capabilities. You may choose as many or as few as you like." + allow_to: "Allow the client application to:" + allow_read_prefs: "read your user preferences." + allow_write_prefs: "modify your user preferences." + allow_write_diary: "create diary entries, comments and make friends." + allow_write_api: "modify the map." + allow_read_gpx: "read your private GPS traces." + allow_write_gpx: "upload GPS traces." + token: + none: "You have not authorised any clients to act on your behalf. You do not have to do anything now to authorise them, as they will ask for authorisation when they need it. After that time you can return here to revoke those permissions if you do not want the clients to have your authorisation any more." + application: "Application" + issued: "Issued" + revoke: "Revoke!" user: login: title: "Login" @@@ -786,6 -837,7 +852,7 @@@ your friends: Your friends no friends: You have not added any friends yet. km away: "{{count}}km away" + m away: "{{count}}m away" nearby users: "Nearby users: " no nearby users: "There are no users who admit to mapping nearby yet." change your settings: change your settings @@@ -799,7 -851,7 +866,7 @@@ public editing: heading: "Public editing: " enabled: "Enabled. Not anonymous and can edit data." - enabled link: "http://wiki.openstreetmap.org/wiki/Disabling_anonymous_edits" + enabled link: "http://wiki.openstreetmap.org/wiki/Anonymous_edits" enabled link text: "what's this?" disabled: "Disabled and cannot edit data, all previous edits are anonymous." disabled link text: "why can't I edit?" @@@ -815,12 -867,6 +882,12 @@@ return to profile: Return to profile flash update success confirm needed: "User information updated successfully. Check your email for a note to confirm your new email address." flash update success: "User information updated successfully." + my apps: "My client applications" + developers: "Application Developers" + dev_intro: "Have you written an application which you would like to register to make {{link}} requests to the OpenStreetMap server?" + register_app: "Register your application" + apps_registered: "You have the following client applications registered:" + register_another_app: "Register another application" confirm: heading: Confirm a user account press confirm button: "Press the confirm button below to activate your account." diff --combined config/routes.rb index 486241fb3,f26a15032..a4e88cc99 --- a/config/routes.rb +++ b/config/routes.rb @@@ -6,9 -6,9 +6,9 @@@ ActionController::Routing::Routes.draw map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create' map.connect "api/#{API_VERSION}/changeset/:id/upload", :controller => 'changeset', :action => 'upload', :id => /\d+/ - map.connect "api/#{API_VERSION}/changeset/:id/download", :controller => 'changeset', :action => 'download', :id => /\d+/ + map.changeset_download "api/#{API_VERSION}/changeset/:id/download", :controller => 'changeset', :action => 'download', :id => /\d+/ map.connect "api/#{API_VERSION}/changeset/:id/expand_bbox", :controller => 'changeset', :action => 'expand_bbox', :id => /\d+/ - map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read', :id => /\d+/, :conditions => { :method => :get } + map.changeset_read "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read', :id => /\d+/, :conditions => { :method => :get } map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'update', :id => /\d+/, :conditions => { :method => :put } map.connect "api/#{API_VERSION}/changeset/:id/close", :controller => 'changeset', :action => 'close', :id =>/\d+/ map.connect "api/#{API_VERSION}/changesets", :controller => 'changeset', :action => 'query' @@@ -81,14 -81,16 +81,16 @@@ map.connect '/browse/node/:id/history', :controller => 'browse', :action => 'node_history', :id => /\d+/ map.connect '/browse/relation/:id', :controller => 'browse', :action => 'relation', :id => /\d+/ map.connect '/browse/relation/:id/history', :controller => 'browse', :action => 'relation_history', :id => /\d+/ - map.connect '/browse/changeset/:id', :controller => 'browse', :action => 'changeset', :id => /\d+/ + 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 # web site map.root :controller => 'site', :action => 'index' map.connect '/', :controller => 'site', :action => 'index' map.connect '/edit', :controller => 'site', :action => 'edit' - map.connect '/history', :controller => 'changeset', :action => 'list_bbox' + map.connect '/history', :controller => 'changeset', :action => 'list' + map.connect '/history/feed', :controller => 'changeset', :action => 'list', :format => :atom map.connect '/export', :controller => 'site', :action => 'export' map.connect '/login', :controller => 'user', :action => 'login' map.connect '/logout', :controller => 'user', :action => 'logout' @@@ -114,6 -116,9 +116,9 @@@ map.connect '/create-account.html', :controller => 'user', :action => 'new' map.connect '/forgot-password.html', :controller => 'user', :action => 'lost_password' + # permalink + map.connect '/go/:code', :controller => 'site', :action => 'permalink', :code => /[a-zA-Z0-9_@]+[=-]*/ + # traces map.connect '/traces', :controller => 'trace', :action => 'list' map.connect '/traces/page/:page', :controller => 'trace', :action => 'list' @@@ -143,7 -148,8 +148,8 @@@ # user pages map.connect '/user/:display_name', :controller => 'user', :action => 'view' - map.connect '/user/:display_name/edits', :controller => 'changeset', :action => 'list_user' + map.connect '/user/:display_name/edits', :controller => 'changeset', :action => 'list' + map.connect '/user/:display_name/edits/feed', :controller => 'changeset', :action => 'list', :format =>:atom map.connect '/user/:display_name/make_friend', :controller => 'user', :action => 'make_friend' map.connect '/user/:display_name/remove_friend', :controller => 'user', :action => 'remove_friend' map.connect '/user/:display_name/diary', :controller => 'diary_entry', :action => 'list' @@@ -166,13 -172,22 +172,21 @@@ # geocoder map.connect '/geocoder/search', :controller => 'geocoder', :action => 'search' + map.connect '/geocoder/search_latlon', :controller => 'geocoder', :action => 'search_latlon' + map.connect '/geocoder/search_us_postcode', :controller => 'geocoder', :action => 'search_us_postcode' + map.connect '/geocoder/search_uk_postcode', :controller => 'geocoder', :action => 'search_uk_postcode' + map.connect '/geocoder/search_ca_postcode', :controller => 'geocoder', :action => 'search_ca_postcode' + map.connect '/geocoder/search_osm_namefinder', :controller => 'geocoder', :action => 'search_osm_namefinder' + map.connect '/geocoder/search_geonames', :controller => 'geocoder', :action => 'search_geonames' map.connect '/geocoder/description', :controller => 'geocoder', :action => 'description' + map.connect '/geocoder/description_osm_namefinder', :controller => 'geocoder', :action => 'description_osm_namefinder' + map.connect '/geocoder/description_geonames', :controller => 'geocoder', :action => 'description_geonames' # export map.connect '/export/start', :controller => 'export', :action => 'start' map.connect '/export/finish', :controller => 'export', :action => 'finish' # messages - map.connect '/user/:display_name/inbox', :controller => 'message', :action => 'inbox' map.connect '/user/:display_name/outbox', :controller => 'message', :action => 'outbox' map.connect '/message/new/:display_name', :controller => 'message', :action => 'new' @@@ -180,14 -195,6 +194,14 @@@ map.connect '/message/mark/:message_id', :controller => 'message', :action => 'mark' map.connect '/message/reply/:message_id', :controller => 'message', :action => 'reply' + # oauth admin pages (i.e: for setting up new clients, etc...) + map.resources :oauth_clients + map.connect '/oauth/revoke', :controller => 'oauth', :action => 'revoke' + map.authorize '/oauth/authorize', :controller => 'oauth', :action => 'oauthorize' + map.request_token '/oauth/request_token', :controller => 'oauth', :action => 'request_token' + map.access_token '/oauth/access_token', :controller => 'oauth', :action => 'access_token' + map.test_request '/oauth/test_request', :controller => 'oauth', :action => 'test_request' + # fall through map.connect ':controller/:id/:action' map.connect ':controller/:action'