From: Andy Allan Date: Sat, 15 Feb 2025 14:03:55 +0000 (+0000) Subject: Merge pull request #5514 from AntonKhorev/pd-declaration X-Git-Tag: live~161 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/aebacc88de18c24c583a12b589eb98cf0b826627?hp=-c Merge pull request #5514 from AntonKhorev/pd-declaration Remove public domain checkbox from signup and terms pages --- aebacc88de18c24c583a12b589eb98cf0b826627 diff --combined app/abilities/ability.rb index 3116bc5cd,f46131454..adedce543 --- a/app/abilities/ability.rb +++ b/app/abilities/ability.rb @@@ -22,28 -22,29 +22,29 @@@ class Abilit can [:create, :update], :password can :read, Redaction can [:create, :destroy], :session - can [:read, :data, :georss], Trace + can [:read, :data], Trace can [:read, :create, :suspended, :auth_success, :auth_failure], User can :read, UserBlock end if user&.active? can :welcome, :site - can :read, [:deletion, :account_terms] + can :read, [:deletion, :account_terms, :account_pd_declaration] if Settings.status != "database_offline" - can [:subscribe, :unsubscribe], Changeset + can [:read, :create, :destroy], :changeset_subscription can [:read, :create, :update, :destroy], :oauth2_application can [:read, :destroy], :oauth2_authorized_application can [:read, :create, :destroy], :oauth2_authorization can [:update, :destroy], :account can :update, :account_terms + can :create, :account_pd_declaration can :read, :dashboard can [:create, :subscribe, :unsubscribe], DiaryEntry can :update, DiaryEntry, :user => user can [:create], DiaryComment can [:show, :create, :destroy], Follow - can [:read, :create, :mark, :unmute, :destroy], Message + can [:read, :create, :destroy], Message can [:close, :reopen], Note can [:read, :update], :preference can :update, :profile diff --combined app/controllers/accounts/terms_controller.rb index 13e9de890,704532988..03007a532 --- a/app/controllers/accounts/terms_controller.rb +++ b/app/controllers/accounts/terms_controller.rb @@@ -4,7 -4,8 +4,7 @@@ module Account layout "site" - before_action :disable_terms_redirect - before_action :authorize_web + before_action -> { authorize_web(:skip_terms => true) } before_action :set_locale before_action :check_database_readable @@@ -33,7 -34,6 +33,6 @@@ flash[:notice] = { :partial => "accounts/terms/terms_declined_flash" } if current_user.save else unless current_user.terms_agreed? - current_user.consider_pd = params[:user][:consider_pd] current_user.tou_agreed = Time.now.utc current_user.terms_agreed = Time.now.utc current_user.terms_seen = true diff --combined config/locales/en.yml index 5571a4232,55b15fc8b..eaf0fdf15 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -87,13 -87,12 +87,13 @@@ en url: Main Application URL (Required) callback_url: Callback URL support_url: Support URL - allow_read_prefs: read their user preferences + allow_read_prefs: read their user preferences allow_write_prefs: modify their user preferences allow_write_diary: create diary entries and comments - allow_write_api: modify the map - allow_read_gpx: read their private GPS traces - allow_write_gpx: upload GPS traces + allow_write_api: modify the map + allow_write_changeset_comments: comment on changesets + allow_read_gpx: read their private GPS traces + allow_write_gpx: upload GPS traces allow_write_notes: modify notes diary_comment: body: "Body" @@@ -260,6 -259,8 +260,8 @@@ agreed_with_pd: "You have also declared that you consider your edits to be in the Public Domain." link: "https://osmfoundation.org/wiki/Licence/Contributor_Terms" link text: "what is this?" + not_agreed_with_pd: "You haven't declared that you consider your edits to be in the Public Domain." + pd_link_text: "declare" save changes button: Save Changes delete_account: Delete Account... go_public: @@@ -305,9 -306,6 +307,6 @@@ read_ct: "I have read and agree to the above contributor terms" tou_explain_html: "These %{tou_link} govern the use of the website and other infrastructure provided by the OSMF. Please click on the link, read and agree to the text." read_tou: "I have read and agree to the Terms of Use" - consider_pd: "In addition to the above, I consider my contributions to be in the Public Domain" - consider_pd_why: "what's this?" - consider_pd_why_url: https://osmfoundation.org/wiki/Licence_and_Legal_FAQ/Why_would_I_want_my_contributions_to_be_public_domain guidance_info_html: "Information to help understand these terms: a %{readable_summary_link} and some %{informal_translations_link}" readable_summary: human readable summary informal_translations: informal translations @@@ -325,6 -323,17 +324,17 @@@ terms_declined_html: We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see %{terms_declined_link}. terms_declined_link: this wiki page terms_declined_url: https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined + pd_declarations: + show: + title: Consider my contributions to be in the Public Domain + consider_pd: "I consider my contributions to be in the Public Domain" + consider_pd_why: "Why would I want my contributions to be Public Domain?" + consider_pd_why_url: https://osmfoundation.org/wiki/Licence_and_Legal_FAQ/Why_would_I_want_my_contributions_to_be_public_domain + confirm: Confirm + create: + successfully_declared: "You have successfully declared that you consider your edits to be in the Public Domain." + already_declared: "You have already declared that you consider your edits to be in the Public Domain." + did_not_confirm: "You didn't confirm that you consider your edits to be in the Public Domain." browse: deleted_ago_by_html: "Deleted %{time_ago} by %{user}" edited_ago_by_html: "Edited %{time_ago} by %{user}" @@@ -393,7 -402,6 +403,7 @@@ relation: "relation" start_rjs: feature_warning: "Loading %{num_features} features, which may make your browser slow or unresponsive. Are you sure you want to display this data?" + feature_error: "Features could not be loaded: %{message}" load_data: "Load Data" loading: "Loading..." tag_details: @@@ -486,6 -494,18 +496,6 @@@ created: "Created" closed: "Closed" belongs_to: "Author" - subscribe: - heading: Subscribe to the following changeset discussion? - button: Subscribe to discussion - unsubscribe: - heading: Unsubscribe from the following changeset discussion? - button: Unsubscribe from discussion - heading: - title: "Changeset %{id}" - created_by_html: "Created by %{link_user} on %{created}." - no_such_entry: - heading: "No entry with the id: %{id}" - body: "Sorry, there is no changeset with the id %{id}. Please check your spelling, or maybe the link you clicked is wrong." show: title: "Changeset: %{id}" created: "Created: %{when}" @@@ -517,20 -537,6 +527,20 @@@ sorry: "Sorry, changeset #%{id} could not be found." timeout: sorry: "Sorry, the list of changesets you requested took too long to retrieve." + changeset_subscriptions: + show: + subscribe: + heading: Subscribe to the following changeset discussion? + button: Subscribe to discussion + unsubscribe: + heading: Unsubscribe from the following changeset discussion? + button: Unsubscribe from discussion + heading: + title: "Changeset %{id}" + created_by_html: "Created by %{link_user} on %{created}." + no_such_entry: + heading: "No entry with the id: %{id}" + body: "Sorry, there is no changeset with the id %{id}. Please check your spelling, or maybe the link you clicked is wrong." dashboards: contact: km away: "%{count}km away" @@@ -626,6 -632,15 +636,6 @@@ heading: Unsubscribe from the following diary entry discussion? button: Unsubscribe from discussion diary_comments: - index: - title: "Diary Comments added by %{user}" - heading: "%{user}'s Diary Comments" - subheading_html: "Diary Comments added by %{user}" - no_comments: "No diary comments" - page: - post: Post - when: When - comment: Comment new: heading: Add a comment to the following diary entry discussion? doorkeeper: @@@ -837,7 -852,7 +847,7 @@@ census: "Census Boundary" national_park: "National Park" political: "Electoral Boundary" - protected_area : "Protected Area" + protected_area: "Protected Area" "yes": "Boundary" bridge: aqueduct: "Aqueduct" @@@ -943,7 -958,6 +953,7 @@@ bridleway: "Bridleway" bus_guideway: "Guided Bus Lane" bus_stop: "Bus Stop" + busway: "Busway" construction: "Highway under Construction" corridor: "Corridor" crossing: "Crossing" @@@ -989,7 -1003,7 +999,7 @@@ turning_circle: "Turning Circle" turning_loop: "Turning Loop" unclassified: "Unclassified Road" - "yes" : "Road" + "yes": "Road" historic: aircraft: "Historic Aircraft" archaeological_site: "Archaeological Site" @@@ -1169,7 -1183,7 +1179,7 @@@ trench: "Trench" "yes": "Military" mountain_pass: - "yes" : "Mountain Pass" + "yes": "Mountain Pass" natural: atoll: "Atoll" bare_rock: "Bare Rock" @@@ -1514,11 -1528,9 +1524,11 @@@ reports: Reports last_updated: Last Updated last_updated_time_ago_user_html: "%{time_ago} by %{user}" + reporting_users: Reporting Users reports_count: one: "%{count} Report" other: "%{count} Reports" + more_reporters: "and %{count} more" reported_item: Reported Item states: ignored: Ignored @@@ -1553,8 -1565,7 +1563,8 @@@ reopened: Issue status has been set to 'Open' comments: comment_from_html: "Comment from %{user_link} on %{comment_created_at}" - reassign_param: Reassign Issue? + reassign_to_moderators: Reassign Issue to Moderators + reassign_to_administrators: Reassign Issue to Administrators reports: reported_by_html: "Reported as %{category} by %{user} on %{updated_at}" helper: @@@ -1626,6 -1637,8 +1636,6 @@@ partners_corpmembers: "OSMF corporate members" partners_partners: "partners" tou: "Terms of Use" - osm_offline: "The OpenStreetMap database is currently offline while essential database maintenance work is carried out." - osm_read_only: "The OpenStreetMap database is currently in read-only mode while essential database maintenance work is carried out." nothing_to_preview: "Nothing to preview." help: Help about: About @@@ -1633,11 -1646,6 +1643,11 @@@ communities: Communities learn_more: "Learn More" more: More + offline_flash: + osm_offline: "The OpenStreetMap database is currently offline while essential maintenance work is carried out." + osm_read_only: "The OpenStreetMap database is currently in read-only mode while essential maintenance work is carried out." + expected_restore_html: "Services are expected to be restored in %{time}." + announcement: "You can read the announcement here." user_mailer: diary_comment_notification: description: "OpenStreetMap Diary Entry #%{id}" @@@ -1791,17 -1799,14 +1801,17 @@@ destroy_button: "Delete" back: "Back" wrong_user: "You are logged in as '%{user}' but the message you have asked to read was not sent by or to that user. Please log in as the correct user in order to read it." - mark: - as_read: "Message marked as read" - as_unread: "Message marked as unread" - unmute: - notice: "Message has been moved to Inbox" - error: "The message could not be moved to the Inbox." destroy: destroyed: "Message deleted" + read_marks: + create: + notice: "Message marked as read" + destroy: + notice: "Message marked as unread" + mutes: + destroy: + notice: "Message has been moved to Inbox" + error: "The message could not be moved to the Inbox." mailboxes: heading: my_inbox: "My Inbox" @@@ -1953,9 -1958,6 +1963,9 @@@ preview: Preview help: Help pagination: + changeset_comments: + older: Older Comments + newer: Newer Comments diary_comments: older: Older Comments newer: Newer Comments @@@ -2254,14 -2256,13 +2264,14 @@@ license_url: "https://openstreetmap.org/copyright" project_url: "https://openstreetmap.org" remote_failed: "Editing failed - make sure JOSM or Merkaartor is loaded and the remote control option is enabled" - edit: + not_public_flash: not_public: "You have not set your edits to be public." not_public_description_html: "You can no longer edit the map unless you do so. You can set your edits as public from your %{user_page}." user_page_link: user page anon_edits_html: "(%{link})" anon_edits_link: "https://wiki.openstreetmap.org/wiki/Disabling_anonymous_edits" anon_edits_link_text: "Find out why this is the case." + edit: id_not_configured: "iD has not been configured" export: title: "Export" @@@ -2625,14 -2626,13 +2635,14 @@@ offline: heading: "GPX Storage Offline" message: "The GPX file storage and upload system is currently unavailable." - georss: - title: "OpenStreetMap GPS Traces" - description: - description_with_count: - one: "GPX file with %{count} point from %{user}" - other: "GPX file with %{count} points from %{user}" - description_without_count: "GPX file from %{user}" + feeds: + show: + title: "OpenStreetMap GPS Traces" + description: + description_with_count: + one: "GPX file with %{count} point from %{user}" + other: "GPX file with %{count} points from %{user}" + description_without_count: "GPX file from %{user}" application: permission_denied: You do not have permission to access that action require_cookies: @@@ -2698,7 -2698,6 +2708,7 @@@ write_prefs: Modify user preferences write_diary: Create diary entries and comments write_api: Modify the map + write_changeset_comments: Comment on changesets read_gpx: Read private GPS traces write_gpx: Upload GPS traces write_notes: Modify notes @@@ -2785,9 -2784,6 +2795,6 @@@ privacy_policy_url: https://osmfoundation.org/wiki/Privacy_Policy privacy_policy_title: OSMF privacy policy including section on email addresses html: 'Your address is not displayed publicly, see our %{privacy_policy_link} for more information.' - consider_pd_html: "I consider my contributions to be in the %{consider_pd_link}." - consider_pd: "public domain" - consider_pd_url: https://osmfoundation.org/wiki/Licence_and_Legal_FAQ/Why_would_I_want_my_contributions_to_be_public_domain or: "or" use external auth: "or sign up with a third party" no_such_user: @@@ -2892,26 -2888,6 +2899,26 @@@ user: summary_html: "%{name} created from %{ip_address} on %{date}" summary_no_ip_html: "%{name} created on %{date}" + comments: + index: + heading_html: "%{user}'s Comments" + changesets: "Changesets" + diary_entries: "Diary entries" + no_comments: "No comments" + changeset_comments: + index: + title: "Changeset Comments added by %{user}" + page: + changeset: Changeset + when: When + comment: Comment + diary_comments: + index: + title: "Diary Comments added by %{user}" + page: + post: Post + when: When + comment: Comment suspended: title: Account Suspended heading: Account Suspended @@@ -3077,7 -3053,6 +3084,7 @@@ open_title: "Unresolved note #%{note_name}" closed_title: "Resolved note #%{note_name}" hidden_title: "Hidden note #%{note_name}" + description_when_author_is_deleted: "deleted" event_opened_by_html: "Created by %{user} %{time_ago}" event_opened_by_anonymous_html: "Created by anonymous %{time_ago}" event_commented_by_html: "Comment from %{user} %{time_ago}" diff --combined config/routes.rb index 45fc19f2c,aa2ae815b..3971494aa --- a/config/routes.rb +++ b/config/routes.rb @@@ -30,55 -30,45 +30,55 @@@ OpenStreetMap::Application.routes.draw post "changeset/comment/:id/hide" => "changeset_comments#destroy", :as => :changeset_comment_hide, :id => /\d+/ post "changeset/comment/:id/unhide" => "changeset_comments#restore", :as => :changeset_comment_unhide, :id => /\d+/ - put "node/create" => "nodes#create" - get "node/:id/ways" => "ways#ways_for_node", :as => :node_ways, :id => /\d+/ - get "node/:id/relations" => "relations#relations_for_node", :as => :node_relations, :id => /\d+/ - get "node/:id/history" => "old_nodes#history", :as => :api_node_history, :id => /\d+/ - post "node/:id/:version/redact" => "old_nodes#redact", :as => :node_version_redact, :version => /\d+/, :id => /\d+/ - get "node/:id/:version" => "old_nodes#show", :as => :api_old_node, :id => /\d+/, :version => /\d+/ - get "node/:id" => "nodes#show", :as => :api_node, :id => /\d+/ - put "node/:id" => "nodes#update", :id => /\d+/ - delete "node/:id" => "nodes#delete", :id => /\d+/ - get "nodes" => "nodes#index" - - put "way/create" => "ways#create" - get "way/:id/history" => "old_ways#history", :as => :api_way_history, :id => /\d+/ - get "way/:id/full" => "ways#full", :as => :way_full, :id => /\d+/ - get "way/:id/relations" => "relations#relations_for_way", :as => :way_relations, :id => /\d+/ - post "way/:id/:version/redact" => "old_ways#redact", :as => :way_version_redact, :version => /\d+/, :id => /\d+/ - get "way/:id/:version" => "old_ways#show", :as => :api_old_way, :id => /\d+/, :version => /\d+/ - get "way/:id" => "ways#show", :as => :api_way, :id => /\d+/ - put "way/:id" => "ways#update", :id => /\d+/ - delete "way/:id" => "ways#delete", :id => /\d+/ - get "ways" => "ways#index" - - put "relation/create" => "relations#create" - get "relation/:id/relations" => "relations#relations_for_relation", :as => :relation_relations, :id => /\d+/ - get "relation/:id/history" => "old_relations#history", :as => :api_relation_history, :id => /\d+/ - get "relation/:id/full" => "relations#full", :as => :relation_full, :id => /\d+/ - post "relation/:id/:version/redact" => "old_relations#redact", :as => :relation_version_redact, :version => /\d+/, :id => /\d+/ - get "relation/:id/:version" => "old_relations#show", :as => :api_old_relation, :id => /\d+/, :version => /\d+/ - get "relation/:id" => "relations#show", :as => :api_relation, :id => /\d+/ - put "relation/:id" => "relations#update", :id => /\d+/ - delete "relation/:id" => "relations#delete", :id => /\d+/ - get "relations" => "relations#index" - - get "map" => "map#index" - - get "trackpoints" => "tracepoints#index" + post "node/:node_id/:version/redact" => "old_nodes#redact", :as => :node_version_redact, :version => /\d+/, :node_id => /\d+/ + + post "way/:way_id/:version/redact" => "old_ways#redact", :as => :way_version_redact, :version => /\d+/, :id => /\d+/ + + post "relation/:relation_id/:version/redact" => "old_relations#redact", :as => :relation_version_redact, :version => /\d+/, :id => /\d+/ end namespace :api, :path => "api/0.6" do + resources :nodes, :only => [:index, :create] + resources :nodes, :path => "node", :id => /\d+/, :only => [:show, :update, :destroy] do + scope :module => :nodes do + resources :ways, :only => :index + resources :relations, :only => :index + end + resources :versions, :path => "history", :controller => :old_nodes, :only => :index + resources :versions, :path => "", :version => /\d+/, :param => :version, :controller => :old_nodes, :only => :show + end + put "node/create" => "nodes#create", :as => nil + + resources :ways, :only => [:index, :create] + resources :ways, :path => "way", :id => /\d+/, :only => [:show, :update, :destroy] do + member do + get :full, :action => :show, :full => true, :as => nil + end + scope :module => :ways do + resources :relations, :only => :index + end + resources :versions, :path => "history", :controller => :old_ways, :only => :index + resources :versions, :path => "", :version => /\d+/, :param => :version, :controller => :old_ways, :only => :show + end + put "way/create" => "ways#create", :as => nil + + resources :relations, :only => [:index, :create] + resources :relations, :path => "relation", :id => /\d+/, :only => [:show, :update, :destroy] do + member do + get :full, :action => :show, :full => true, :as => nil + end + scope :module => :relations do + resources :relations, :only => :index + end + resources :versions, :path => "history", :controller => :old_relations, :only => :index + resources :versions, :path => "", :version => /\d+/, :param => :version, :controller => :old_relations, :only => :show + end + put "relation/create" => "relations#create", :as => nil + + resource :map, :only => :show + + resources :tracepoints, :path => "trackpoints", :only => :index + resources :users, :only => :index resources :users, :path => "user", :id => /\d+/, :only => :show resources :user_traces, :path => "user/gpx_files", :module => :users, :controller => :traces, :only => :index @@@ -122,9 -112,6 +122,9 @@@ end resources :user_blocks, :only => :show, :id => /\d+/, :controller => "user_blocks" + namespace :user_blocks, :path => "user/blocks" do + resource :active_list, :path => "active", :only => :show + end end # Data browsing @@@ -137,16 -124,14 +137,16 @@@ get "/relation/:id" => "relations#show", :id => /\d+/, :as => :relation get "/relation/:id/history" => "old_relations#index", :id => /\d+/, :as => :relation_history 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, :on => :member, :via => [:get, :post] - match :unsubscribe, :on => :member, :via => [:get, :post] + resources :changesets, :path => "changeset", :id => /\d+/, :only => :show do + resource :subscription, :controller => :changeset_subscriptions, :only => [:show, :create, :destroy] namespace :changeset_comments, :as => :comments, :path => :comments do resource :feed, :only => :show, :defaults => { :format => "rss" } end end + get "/changeset/:id/subscribe", :id => /\d+/, :to => redirect(:path => "/changeset/%{id}/subscription") + get "/changeset/:id/unsubscribe", :id => /\d+/, :to => redirect(:path => "/changeset/%{id}/subscription") + resources :notes, :path => "note", :id => /\d+/, :only => [:show, :new] get "/user/:display_name/history" => "changesets#index" @@@ -226,33 -211,30 +226,33 @@@ post "/preview/:type" => "site#preview", :as => :preview # traces - resources :traces, :except => [:show] + resources :traces, :id => /\d+/, :except => [:show] do + resource :data, :module => :traces, :only => :show + end get "/user/:display_name/traces/tag/:tag/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/traces/tag/%{tag}") get "/user/:display_name/traces/tag/:tag" => "traces#index" get "/user/:display_name/traces/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/traces") get "/user/:display_name/traces" => "traces#index" - get "/user/:display_name/traces/tag/:tag/rss" => "traces#georss", :defaults => { :format => :rss } - get "/user/:display_name/traces/rss" => "traces#georss", :defaults => { :format => :rss } - get "/user/:display_name/traces/:id" => "traces#show", :as => "show_trace" - scope "/user/:display_name/traces/:trace_id", :module => :traces do + get "/user/:display_name/traces/:id" => "traces#show", :id => /\d+/, :as => "show_trace" + scope "/user/:display_name/traces/:trace_id", :module => :traces, :trace_id => /\d+/ do get "picture" => "pictures#show", :as => "trace_picture" get "icon" => "icons#show", :as => "trace_icon" end get "/traces/tag/:tag/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces/tag/%{tag}") get "/traces/tag/:tag" => "traces#index" get "/traces/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces") - get "/traces/tag/:tag/rss" => "traces#georss", :defaults => { :format => :rss } - get "/traces/rss" => "traces#georss", :defaults => { :format => :rss } get "/traces/mine/tag/:tag/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces/mine/tag/%{tag}") get "/traces/mine/tag/:tag" => "traces#mine" get "/traces/mine/page/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/traces/mine") get "/traces/mine" => "traces#mine" get "/trace/create", :to => redirect(:path => "/traces/new") - get "/trace/:id/data" => "traces#data", :id => /\d+/, :as => "trace_data" - get "/trace/:id/edit", :to => redirect(:path => "/traces/%{id}/edit") + get "/trace/:id/data", :format => false, :id => /\d+/, :to => redirect(:path => "/traces/%{id}/data") + get "/trace/:id/data.:format", :id => /\d+/, :to => redirect(:path => "/traces/%{id}/data.%{format}") + get "/trace/:id/edit", :id => /\d+/, :to => redirect(:path => "/traces/%{id}/edit") + + namespace :traces, :path => "" do + resource :feed, :path => "(/user/:display_name)/traces(/tag/:tag)/rss", :only => :show, :defaults => { :format => :rss } + end # diary pages resources :diary_entries, :path => "diary", :only => [:new, :create, :index] do @@@ -264,6 -246,8 +264,6 @@@ get "/user/:display_name/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss } get "/diary/:language/rss" => "diary_entries#rss", :defaults => { :format => :rss } get "/diary/rss" => "diary_entries#rss", :defaults => { :format => :rss } - get "/user/:display_name/diary/comments/:page", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/diary/comments") - get "/user/:display_name/diary/comments" => "diary_comments#index", :as => :diary_comments get "/user/:display_name/diary" => "diary_entries#index" get "/diary/:language" => "diary_entries#index" scope "/user/:display_name" do @@@ -285,19 -269,17 +285,20 @@@ resources :users, :path => "user", :param => :display_name, :only => [:new, :create, :show] do resource :role, :controller => "user_roles", :path => "roles/:role", :only => [:create, :destroy] scope :module => :users do + resources :diary_comments, :only => :index + resources :changeset_comments, :only => :index resource :issued_blocks, :path => "blocks_by", :only => :show resource :received_blocks, :path => "blocks", :only => [:show, :edit, :destroy] resource :status, :only => :update end end get "/user/:display_name/account", :to => redirect(:path => "/account/edit") + get "/user/:display_name/diary/comments(/:page)", :page => /[1-9][0-9]*/, :to => redirect(:path => "/user/%{display_name}/diary_comments") resource :account, :only => [:edit, :update, :destroy] do scope :module => :accounts do resource :terms, :only => [:show, :update] + resource :pd_declaration, :only => [:show, :create] resource :deletion, :only => :show end end @@@ -335,11 -317,10 +336,11 @@@ # messages resources :messages, :path_names => { :new => "new/:display_name" }, :id => /\d+/, :only => [:new, :create, :show, :destroy] do - post :mark - patch :unmute - - resource :reply, :module => :messages, :path_names => { :new => "new" }, :only => :new + scope :module => :messages do + resource :reply, :path_names => { :new => "new" }, :only => :new + resource :read_mark, :only => [:create, :destroy] + resource :mute, :only => :destroy + end end namespace :messages, :path => "/messages" do resource :inbox, :only => :show