[openstreetmap/openstreetmap-website] Move edit/revoke block buttons to the bottom of the block page (PR #4643)

Anton Khorev notifications at github.com
Tue Apr 2 15:56:05 UTC 2024


Currently it's difficult to go between all blocks, blocks on, blocks by pages. For example, it's not obvious where's the link to the *all blocks* page. I want to make some kind of navigation for it. Something like tabs similar to how they are used on gpx traces pages will probably do:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/e37fb173-8bb2-406a-b239-81cdd2604710)

But first I need to make room for tabs. Block pages have *Edit* and *Revoke* links in the heading where the tabs are supposed to be:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/cd532402-c50d-42ef-a7c7-5207f012c547)

But why these links are there? If they are supposed to work on a currently shown block, they should be below the block, again similar to how *Edit*/*Delete* buttons are located on traces pages.

This PR moves the links and styles them similarly to traces buttons:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/5e5711d0-8617-43c6-8ded-22eb93ceb3d9)

Later I'll turn *View all blocks* into a tab and add other tabs.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Move edit/revoke block buttons to the bottom
  * Change revoke block buttons to danger style

-- File Changes --

    M app/views/user_blocks/revoke.html.erb (2)
    M app/views/user_blocks/revoke_all.html.erb (2)
    M app/views/user_blocks/show.html.erb (20)

-- Patch Links --

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

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

Message ID: <openstreetmap/openstreetmap-website/pull/4643 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240402/3c54fd7a/attachment-0001.htm>


More information about the rails-dev mailing list