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 601: Keep search parameters in resource module #621

Conversation

veggiematts
Copy link
Contributor

Background, see Issue #601

This patch fixes the previously existing behavior that was broken:

When going back from a resource detail to the index page using the Home menu
link or using the back button of the browser, the search parameters and results
are kept.

This patch is not very pretty code-wise, so if anyone has a better solution, they're welcome to make another patch.
If not, this can be a quickfix for the time being.

 This patch fixes the previously existing behavior that was broken:

 When going back from a resource detail to the index page using the Home menu
 link or using the back button of the browser, the search parameters and results
 are kept.
@veggiematts veggiematts added the bug This is a bug (not an enhancement) label Jan 14, 2020
@sbouis
Copy link

sbouis commented Jan 30, 2020

I have just tested it on Chrome. It works for almost all the search exept for "fund" and "relationship".
For those two, when you click on "home" or use the back button, you retrieve all the resources.

veggiematts and others added 8 commits January 30, 2020 16:47
Fix the Get Statistics button on a resource page using an absolute URL (/reports/report.php) instead of a relative URL (../reports/report.php) which assumes that coral is installed in the root directory.
 - Use subscriptionEndDate
In common/configuration.ini:

[settings]
open_new_windows = Y/N

By default, the links are opened in a new window/tab.
Currently, resources can be filtered with the following relationship criteria:

 - All: all resources are displayed (child, parent, or no relationship)
 - Parent: only parent resources are displayed
 - Child: only child resources are displayed

This patch adds the following criteria:

 - None: only resources that are neither parent nor child are displayed
   (ie: only resources with no relationship)

Test plan:
 - Perform a search on the resources index page, with 'None' in the Relationship
   dropdown list.
 - Check that only the resources with no relationship are displayed.
@veggiematts
Copy link
Contributor Author

veggiematts commented Jan 30, 2020

Thanks for the feedback @sbouis !
The branch has been rebased to avoid conflicts, and both fund and relationship filters are now kept.

@veggiematts
Copy link
Contributor Author

I'm merging this.

@veggiematts veggiematts merged commit 6cc256b into coral-erm:development Jan 30, 2020
@poacherone
Copy link
Collaborator

Tested after the rebase, on both Chrome and Firefox, and works as intended! Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug (not an enhancement)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants