Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue archive page pagination is not disabled when items per page number doesn't exceed the limit #3652

Closed
Vitaliy-1 opened this issue Apr 30, 2018 · 1 comment
Assignees

Comments

@Vitaliy-1
Copy link
Collaborator

Vitaliy-1 commented Apr 30, 2018

Pagination doesn't work as expected because $prevUrl and $nextUrl are always not empty due to whitespaces. For example, it can be tracked in this line: https://github.com/pkp/healthSciences/blob/master/templates/frontend/components/pagination.tpl#L20
Think, the easiest way is just to trim these variables on assigning: pkp/ojs#1942
Although, there can be more variables that should be treated like this.

The adjustment should be made for all themes using this code, including default, bootstrap3, healthSciences; already applied the fix to the latter, although it can be not full.
Tagging @NateWr

@NateWr
Copy link
Contributor

NateWr commented May 1, 2018

Ok, it looks like this change isn't necessary for the default templates. At the moment, we use {url|assign... which doesn't introduce white space. And when Smarty v3 comes in, it looks like Alec handled it without introducing whitespace: https://github.com/pkp/ojs/pull/1782/files#diff-a1ed6d61c23c3df405232fd4b17b91aeR45

So I've flagged up the issue in the Bootstrap3 theme (we'll have other adjustments to make to fit the Smarty v3 syntax). Otherwise we should be good to go.

Nice find here @Vitaliy-1. I'll close the OJS PR but let me know if you think I'm wrong.

@NateWr NateWr closed this as completed May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants