Allow user to select how many studies are shown on each filtered.html page
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)
-
-
reporter It would be best if it worked using AJAX I think.
-
reporter Second thoughts: I can probably do this with q little bit of JavaScript.
-
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.
-
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>>
-
Just had a quick look, and we are currently using django-pagination which was last updated in 2010. It would be good to move to the in-built version if it isn't too much hassle and drop the old one.
-
reporter I'll try and update to the built-in version.
-
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>>
-
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.
-
reporter I'll look at making the submit button smaller (http://www.w3schools.com/bootstrap/bootstrap_buttons.asp) and putting it on the same line as the drop-down list. This may help improve the elegance...
-
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.
-
reporter Need to add this to the documentation and update the changes files.
-
reporter - changed status to resolved
Updated documentation to reflect new option to choose how many studies are shown on each filtered page. Also updated changes files. Fixes issue
#543→ <<cset 0853b1c9bd32>>
-
Merged in issue543itemsPerPage (pull request #135)
Issue543itemsPerPage
Fixes
#543→ <<cset f8af48aa9e4a>>
- Log in to comment
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?