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

Post sort updates #47

Closed dunxd closed 9 months ago

dunxd commented 9 months ago

It is useful to see values that are sorted on in the results so I added rating and pubdate to the result page, if those are enabled. I also added rating to the bookdetail page as this was missing.

dunxd commented 9 months ago

I also moved the footer into footer.html and changed its position by changing page.html - header.html is too crowded now!

dunxd commented 9 months ago

I did notice that timestamp, which can be sorted on is not available in the books object. I'm not sure this really matters, but wondered if it is available somewhere and I hadn't found it.

Also, I have hardcoded the sort labels into the template. I'd prefer to do it through the translations but a few of the words are missing. Do I need to add any new ones to every Localization file? And then to the i18n array in JSON_renderer.php right?

horus68 commented 9 months ago

Also, I have hardcoded the sort labels into the template. I'd prefer to do it through the translations but a few of the words are missing. Do I need to add any new ones to every Localization file?

1- Update the english file Localization_en.json with your PR. 2- PR is merged 3- I will upload the new English file to the Transifex project to be translated. 4- New translations will end up here after a PR that will include all new translations (non-translated strings are added in english for each lang file)! Wiki https://github.com/seblucas/cops/wiki/Update-translations

dunxd commented 9 months ago

Ok - I've added all the strings I used in bootstrap5.

Apart from "Explore" which I have used as a header for the filter and links buttons which I don't fully understand and may not have implemented that well. Would you mind trying out Bootstrap5 and going to a page which shows the links for {{? it.filterurl }} and let me know if it makes sense or I have got the wrong end of the stick.

mikespub commented 9 months ago

I did notice that timestamp, which can be sorted on is not available in the books object. I'm not sure this really matters, but wondered if it is available somewhere and I hadn't found it.

Yes, there are more fields in the Calibre database for books, but I guess nobody ever expressed any interest in showing them in templates ;-) And no, it doesn't really matter if those fields are passed to the templates or not, because if you want to sort on them the processing is done on the server anyway, whether you use client-side rendering or not...

mikespub commented 9 months ago

Apart from "Explore" which I have used as a header for the filter and links buttons which I don't fully understand and may not have implemented that well. Would you mind trying out Bootstrap5 and going to a page which shows the links for {{? it.filterurl }} and let me know if it makes sense or I have got the wrong end of the stick.

Seems to be working fine, except that you can't go back to Books once you've clicked on Links. Try it out in bootstrap2 or twigged to see what I mean:

  1. from the main page, navigate to Authors > C > Carroll, Lewis
  2. on the Authors > Lewis Carroll page, click on Links to choose some extra filter besides the author, e.g. only the books with 2 stars - or decide not to filter
  3. either way, you're now stuck and can't go back to the Authors > Lewis Carroll page :-(

In bootstrap2 or twigged, on that filter links page, you have a link back to Books, so you could continue your journey as follows:

  1. if you filtered on 2 stars, you're now on a page for Rating > 2 stars with a Filter on Authors > Carroll, Lewis
  2. you could click on that Filter to return to the filter Links, and from there
  3. return to the Books of our dear friend Lewis

And all that without needing to press the dreaded Back button on your browser...

dunxd commented 9 months ago

I guess I don't fully understand the filters/links functionality. I'll play around with it in bootstrap2 and default.

Note in Bootstrap 2 the link to Authors > Carroll, Lewis at top left takes me to the alphabetical list of Author initials, not a list with Alice's adventures in it.

dunxd commented 9 months ago

Ok - you mean the list icon. I think I've got it now.

mikespub commented 9 months ago

BTW I got rid of the confusing title change for authors - now it's using "name" consistently instead of "sort"