-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
Record view / Use location when setting a formatter #3909
Record view / Use location when setting a formatter #3909
Conversation
When embedding the JS client in a third party app. User may not want to use the Angular view as default. * Add formatter in location path eg. #/metadata/da165110-88fd-11da-a88f-000d939bc5d8/formatters/xsl-view?root=div&view=advanced. We can now have permalink to a specific formatter * Add Angular view as a default view with no formatter option (used as default)
* Add same URL pattern for both catalog.search and display pages * Fix missing translation on formatter load error.
* Fix back to home label * Cleaning * Add click event for non a element
I'm not really sure how to test/review this. Do I have to add the parameters myself? Or is this done automatically? |
When you open a record with a formatter view (eg. advanced view) then it sets it in the URL. So copy/paste in a new tab will restore the proper view. |
Could you check or reset your UI config ? The menu is built from formatter.list config https://github.com/geonetwork/core-geonetwork/pull/3909/files#diff-f352dd8a7c36d320206f126614de6453R151 |
Fixed. |
Yes, that did the trick. The menu is correct again. |
What do I need to do to get this working? |
Should work - clear Wro4j cache is needed. At least it works for me now. |
I've cleared the cache, but when I copy paste the URL of the advanced view in a new browser or incognito window it's still not showing the content. Sorry. |
It works for me. And @josegar74 is seeing that it works ;) So I let him decide to merge or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's just me not being able to copy/paste it's ok by me
* Record view / Add support for having a formatter as default view. When embedding the JS client in a third party app. User may not want to use the Angular view as default. * Add formatter in location path eg. #/metadata/da165110-88fd-11da-a88f-000d939bc5d8/formatters/xsl-view?root=div&view=advanced. We can now have permalink to a specific formatter * Add Angular view as a default view with no formatter option (used as default) * Record view / Add support for having a formatter as default view. * Add same URL pattern for both catalog.search and display pages * Fix missing translation on formatter load error. * Record view / Add support for having a formatter as default view. * Fix back to home label * Cleaning * Add click event for non a element * Record view / Add support for having a formatter as default view. Fix on page load.
The main idea here is to set the formatter (and params) in the location path in order to:
Changes:
#/metadata/da165110-88fd-11da-a88f-000d939bc5d8/formatters/xsl-view?root=div&view=advanced
. We can now have permalink to a specific formattercatalog.search
anddisplay
pages eg.http://localhost:8080/geonetwork/srv/eng/display#/metadata/26e4f7057927fc2e625f1ad57fdf3fb7ab7dbc08