geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
412 stars 487 forks source link

in config-editor.xml configure which fields to show in onlineresourcepanel #3152

Open pvgenuchten opened 5 years ago

pvgenuchten commented 5 years ago

currently the online resource panel shows quite a lot of fields, not all of them are generally used suggested is to create a configuration option which allows to hide some of the fields (function, application profile)

image

fxprunayre commented 5 years ago

The configuration exists but is JS based https://github.com/geonetwork/core-geonetwork/blob/master/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js#L230. It allows to hide or populate default values.

pvgenuchten commented 5 years ago

Francois, thank you for sharing, to me that does not look like a configuration option I would expect configurations to be in config.js, settings table or config-editor.xml (can i override the schemaConfig object from config.js?)

fxprunayre commented 5 years ago

As discussed somewhere else (don't remember where) we should indeed move that to config-editor.xml probably. Rename the ticket to handle that maybe ?

PascalLike commented 5 years ago

Is this something schema dependent? What is the impact of moving this configuration to the schema in terms of compatibility between schema versions and Geonetwork? I would suggest associating these fields with a CSS id, so is easier to hide them from view by changing the style when required. Is it a feasible solution?

fxprunayre commented 5 years ago

Is this something schema dependent?

Yes it is. I think it may even be "editor view dependent". So this could be a property of the panel directive https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/layout/config-editor.xml#L455

CSS

I think it is much more than only dealing with show/hide of fields. The current config (https://github.com/geonetwork/core-geonetwork/blob/master/web-ui/src/main/resources/catalog/components/edit/onlinesrc/OnlineSrcDirective.js#L230) deals with: