This PR adds `/account/blocks` page that does the following:
- if there are needs_view blocks, redirects to the earliest one of them
- if there are any active blocks, redirects to the earliest one of them
- if there are no active blocks, displays a message that there aren't any 
blocks, possibly with a link to `/user/:username/blocks` for reviewing past 
blocks

![image](https://github.com/user-attachments/assets/a7b0ab84-b1fe-4351-85d9-ea4b106f331c)

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5524

-- Commit Summary --

  * Add empty account blocks page
  * Add redirect from accounts block page to needs_view block
  * Add redirect from accounts block page to active block
  * Display 'no active blocks' on accounts block page
  * Display past blocks button on accounts block page

-- File Changes --

    M app/abilities/ability.rb (1)
    A app/controllers/accounts/blocks_controller.rb (20)
    A app/views/accounts/blocks/index.html.erb (11)
    M config/locales/en.yml (5)
    M config/routes.rb (1)
    A test/controllers/accounts/blocks_controller_test.rb (92)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5524.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5524.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5524
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to