Multiple issues with Contacts in Default (and List) metadata view
Describe the bug The default metadata view "Contacts for Resource" and "Metadata information - Point of Contact" section have several related bugs (ISO 19115-3 metadata) -
- When the contact is a
CI_Individualrather than aCI_Organisation, no information is displayed. The circle is empty, but the popup shows information. - Clicking on the filter option in the contact popup returns no results
- We have been asked that the placement of the Initial for the Contact in the circle be centred.
To Reproduce Steps to reproduce the behaviour:
- In GeoNetwork 4.2.x search for a ISO19115-3 metadata record containing
CI_Individualcontact information - Click on this record to view in "Default" mode
- Scroll down to "Contact for the resource"
- Click on a contact and and select "Focus on resources from (contact)"
Expected behavior
The desired "Default" metadata view would look like this -
When selecting "Focus on resources from (contact)", the resulting search should return something like this -
Desktop (please complete the following information):
- Browser - firefox, chrome, safari
- GeoNetwork Version 4.2.5
- Server Application - Tomcat 9 with Java 8
Additional context We have applied the following fixes for your consideration -
- To fix the lack of
CI_Individualcontact information displayed, we changed line 1287 in the schema pluginiso19115-3.2018/index-fields/index.xslas follows -
<xsl:variable name="organisationName"
select="(.//cit:CI_Organisation/cit:name)[1]"
to
<xsl:variable name="organisationName"
select="(.//*/cit:name)[1]"
As a result, both options (CI_Individual and CI_Organisation) allow the name field to be indexed.
This also fixed the same issue in List display
-
We fixed the search filter problem by altering 3 lines in
src/main/resources/catalog/components/search/mdview/partials/contact.html'. Occurrences ofdata-gn-search-filter-link="OrgForResource"were changed todata-gn-search-filter-link="OrgForResourceObject.default" -
To fix the placement of the initial for the Contact in the circle, in line 1350 of
src/main/resources/catalog/components/utility/UtilityDirective.jswe addeddominant-baseline="middle"with the result beingtext-anchor="middle" dominant-baseline="middle" alignment-baseline="central"' +