Fix List pages so MyBooks sidebar + Follows btn appear
mekarpeles opened this issue · comments
Thank you @Realmbird -- can you see if you can add a "Follow" button to the List pages?
When a visitor goes to a patron's Lists page, they see a follow button.
Here's an example of all a patron's lists, that show follow btn:
https://openlibrary.org/people/mekBot/lists
This is handled by the code in:
https://github.com/internetarchive/openlibrary/blob/master/openlibrary/templates/account/view.html
However, if a visitor goes to a specific patron's list (i.e. /people/xxx), then the follow button disappears, as does the my books sidebar and we want (a) the sidebar to appear and (b) the follow button to remain.
![Screenshot 2024-05-24 at 11 17 05 AM](https://private-user-images.githubusercontent.com/978325/333693761-48acdef3-fddd-44ed-b42a-c40c5f4b0fbb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0MzAxOTEsIm5iZiI6MTcyMTQyOTg5MSwicGF0aCI6Ii85NzgzMjUvMzMzNjkzNzYxLTQ4YWNkZWYzLWZkZGQtNDRlZC1iNDJhLWM0MGM1ZjRiMGZiYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxOVQyMjU4MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00YWE1Mzg0ODM4Zjk4ODI0MzEzZjNlYjdhMGU5NTY5OGMwYTUzNmIyZGUwOWE0MjRkMGY3M2E0NTU0ZWFlMTAzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.aYnkaS-noA3fovZWhAkNO9ywGB3n99K5E92nhZe3x-U)
Here's an example of a specific list: https://openlibrary.org/people/mekBot/lists/OL104041L/Popular_Books
Note: This already does the right thing, when a patron is logged in and goes to their own List:
The template we'll need to worry about for the single list case is:
https://github.com/internetarchive/openlibrary/blob/master/openlibrary/templates/type/list/view.html#L11-L20
Instead of if
else
blocks, we always want to return https://github.com/internetarchive/openlibrary/blob/master/openlibrary/templates/type/list/view.html#L12-L17 except the value of is_owner
should be determined by the is_owner
variable rather than True
@mekarpeles Sure I can try