From: Andy Allan Date: Wed, 28 Aug 2024 17:30:11 +0000 (+0100) Subject: Merge pull request #4587 from AntonKhorev/changeset-comment-routes X-Git-Tag: live~700 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/a948f2bc24be0679a42bbd1329d132d9ea20f866?hp=-c Merge pull request #4587 from AntonKhorev/changeset-comment-routes Move changeset comments feed to resourceful routes --- a948f2bc24be0679a42bbd1329d132d9ea20f866 diff --combined config/locales/en.yml index a544fe307,a6bde26a1..6b37d6761 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -246,6 -246,18 +246,18 @@@ en entry: comment: Comment full: Full note + feeds: + changeset_comments: + comment: + comment: "New comment on changeset #%{changeset_id} by %{author}" + commented_at_by_html: "Updated %{when} by %{user}" + comments: + comment: "New comment on changeset #%{changeset_id} by %{author}" + index: + title_all: OpenStreetMap changeset discussion + title_particular: "OpenStreetMap changeset #%{changeset_id} discussion" + timeout: + sorry: "Sorry, the list of changeset comments you requested took too long to retrieve." account: deletions: show: @@@ -490,17 -502,6 +502,6 @@@ relations_paginated: "Relations (%{x}-%{y} of %{count})" timeout: sorry: "Sorry, the list of changesets you requested took too long to retrieve." - changeset_comments: - comment: - comment: "New comment on changeset #%{changeset_id} by %{author}" - commented_at_by_html: "Updated %{when} by %{user}" - comments: - comment: "New comment on changeset #%{changeset_id} by %{author}" - index: - title_all: OpenStreetMap changeset discussion - title_particular: "OpenStreetMap changeset #%{changeset_id} discussion" - timeout: - sorry: "Sorry, the list of changeset comments you requested took too long to retrieve." dashboards: contact: km away: "%{count}km away" @@@ -1469,17 -1470,11 +1470,17 @@@ search_guidance: "Search Issues:" user_not_found: User does not exist issues_not_found: No such issues found + link_to_reports: View Reports + states: + ignored: Ignored + open: Open + resolved: Resolved + page: + reported_user: Reported User status: Status reports: Reports last_updated: Last Updated last_updated_time_ago_user_html: "%{time_ago} by %{user}" - link_to_reports: View Reports reports_count: one: "%{count} Report" other: "%{count} Reports" @@@ -1488,8 -1483,6 +1489,8 @@@ ignored: Ignored open: Open resolved: Resolved + older_issues: Older Issues + newer_issues: Newer Issues show: title: "%{status} Issue #%{issue_id}" reports: @@@ -2966,6 -2959,14 +2967,6 @@@ title: "User blocks" heading: "List of user blocks" empty: "No blocks have been made yet." - revoke: - title: "Revoking block on %{block_on}" - heading_html: "Revoking block on %{block_on} by %{block_by}" - time_future_html: "This block will end in %{time}." - past_html: "This block ended %{time} and cannot be revoked now." - confirm: "Are you sure you wish to revoke this block?" - revoke: "Revoke!" - flash: "This block has been revoked." revoke_all: title: "Revoking all blocks on %{block_on}" heading_html: "Revoking all blocks on %{block_on}" @@@ -3013,6 -3014,7 +3014,6 @@@ status: "Status:" show: "Show" edit: "Edit" - revoke: "Revoke!" confirm: "Are you sure?" reason: "Reason for block:" revoker: "Revoker:" @@@ -3021,6 -3023,7 +3022,6 @@@ not_revoked: "(not revoked)" show: "Show" edit: "Edit" - revoke: "Revoke!" blocks: display_name: "Blocked User" creator_name: "Creator" diff --combined config/routes.rb index e2fd2871b,119253037..817202486 --- a/config/routes.rb +++ b/config/routes.rb @@@ -125,8 -125,11 +125,11 @@@ OpenStreetMap::Application.routes.draw resources :old_relations, :path => "/relation/:id/history", :id => /\d+/, :version => /\d+/, :param => :version, :only => :show resources :changesets, :path => "changeset", :id => /\d+/, :only => :show do match :subscribe, :unsubscribe, :on => :member, :via => [:get, :post] + + namespace :feeds, :path => "" do + resources :changeset_comments, :path => "comments/feed", :only => :index, :defaults => { :format => "rss" } + end end - get "/changeset/:id/comments/feed" => "changeset_comments#index", :as => :changeset_comments_feed, :id => /\d*/, :defaults => { :format => "rss" } resources :notes, :path => "note", :id => /\d+/, :only => [:show, :new] get "/user/:display_name/history" => "changesets#index" @@@ -164,7 -167,9 +167,9 @@@ get "/communities" => "site#communities" get "/history" => "changesets#index" get "/history/feed" => "changesets#feed", :defaults => { :format => :atom } - get "/history/comments/feed" => "changeset_comments#index", :as => :changesets_comments_feed, :defaults => { :format => "rss" } + namespace :feeds, :path => "" do + resources :changeset_comments, :path => "/history/comments/feed", :only => :index, :defaults => { :format => "rss" } + end get "/export" => "site#export" get "/login" => "sessions#new" post "/login" => "sessions#create" @@@ -255,8 -260,8 +260,8 @@@ match "/user/:display_name/diary/:id/subscribe" => "diary_entries#subscribe", :via => [:get, :post], :as => :diary_entry_subscribe, :id => /\d+/ match "/user/:display_name/diary/:id/unsubscribe" => "diary_entries#unsubscribe", :via => [:get, :post], :as => :diary_entry_unsubscribe, :id => /\d+/ post "/user/:display_name/diary/:id/comments" => "diary_comments#create", :id => /\d+/, :as => :comment_diary_entry - post "/user/:display_name/diary/:id/comments/:comment/hide" => "diary_comments#hide", :id => /\d+/, :comment => /\d+/, :as => :hide_diary_comment - post "/user/:display_name/diary/:id/comments/:comment/unhide" => "diary_comments#unhide", :id => /\d+/, :comment => /\d+/, :as => :unhide_diary_comment + post "/diary_comments/:comment/hide" => "diary_comments#hide", :comment => /\d+/, :as => :hide_diary_comment + post "/diary_comments/:comment/unhide" => "diary_comments#unhide", :comment => /\d+/, :as => :unhide_diary_comment # user pages resources :users, :path => "user", :param => :display_name, :only => [:show, :destroy] @@@ -334,6 -339,7 +339,6 @@@ get "/user/:display_name/blocks_by" => "user_blocks#blocks_by", :as => "user_blocks_by" get "/blocks/new/:display_name" => "user_blocks#new", :as => "new_user_block" resources :user_blocks, :except => :new - match "/blocks/:id/revoke" => "user_blocks#revoke", :via => [:get, :post], :as => "revoke_user_block" match "/user/:display_name/blocks/revoke_all" => "user_blocks#revoke_all", :via => [:get, :post], :as => "revoke_all_user_blocks" # issues and reports