mikespub-org / seblucas-cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
55 stars 7 forks source link

Fix for marooning in filters page for bootstrap5 #50

Closed dunxd closed 9 months ago

dunxd commented 9 months ago

I think I've resolved the issue discussed with PR #47. Please check as I think you have a better understanding of the filter function than me.

mikespub commented 9 months ago

Not quite there yet. I changed filter.navlink to include the filter=1 part now, as it may be rewritten if you use route urls - so there's no need to add it in the template anymore.

Also there's probably no need to check for isFilterPage if you change the logic a bit - at least as long as you stick to doT-style templates. The main reason I added that variable was for the twigged template, so that I could load a different template altogether.

In the bootstrap2 template, the logic is:

Does that help?

mikespub commented 9 months ago

And please have a look at https://stackoverflow.com/questions/10176875/add-gitignore-to-gitignore and others like it to ignore your .gitignore changes locally, and not send them over with every PR again ;-)

dunxd commented 9 months ago

I think I have the gitignore thing working now - I've added the stuff specific to me to .git/info/exclude and will try to remember to do that if I add anything else in future that shouldn't be copied into the repo.

Regarding the logic - I have the filter buttons in the same navbar as the sort controls, so I do need logic to determine whether to show the whole navbar or not. Later logic determines whether to show the filter buttons. Without isFilterPage the navbar is missing on the page listing filter choices.