Allow user to select how many studies are shown on each filtered.html page

Issue #543 resolved
David Platten created an issue

At the moment this is hard-coded in the filtered.html pages:

{% autopaginate filter.qs 25 as filter_list %}

We could easily add a user profile field that offers a choice of something like 10, 25, 50 or 100 studies per page, and read in their current choice to paginate the filtered.html pages.

We can also add a drop-down list on each filtered page to enable this to be changed.

Comments (14)

  1. Ed McDonagh

    User profile setting would be easy. What were you thinking of @dplatten for the drop down - would it just set the database profile setting for the next reload, or AJAX to dynamically respond?

  2. Ed McDonagh

    I was wanting to check - I think we are using a library for the pagination, whereas it is a built in function for Django now. Might be an opportunity to drop the dependency.

  3. David Platten reporter

    Added new user profile field for items per page on filtered views. Can be changed in the user profile. Need to plumb in to the filtered pages themselves. References issue #543

    → <<cset f01deaac0bc4>>

  4. David Platten reporter

    Added a drop-down box to choose the number of studies displayed per page on the filtered html pages. I tried to implement Django's built-in pagination but couldn't make it work with the filters. References issue #543

    → <<cset 365b70ea0ba0>>

  5. Ed McDonagh

    Hi @dplatten I've had a look on testing and it isn't very elegant, but it is more than good enough. It needs adding to the interface docs and changes, and then I'm happy to merge it in. Thank you.

  6. Ed McDonagh

    I wouldn't worry about it, it's fine as it is.

    By elegant I was thinking more of a selection at the top (above the delete column) that responded as you selected. But we'd already agreed that it wasn't worth the effort at this stage so what you have done is fine.

  7. Log in to comment