Opened 13 years ago

Closed 13 years ago

#618 closed enhancement (fixed)

Show ISO LanguageCode as first/default option for language selection in metadata editor

Reported by: josegar74 Owned by: geonetwork-devel@…
Priority: minor Milestone: v2.6.5
Component: User interface (web) Version: v2.6.3
Keywords: Cc:

Description

For language element in ISO metadata is used gmd:LanguageCode by default, but the metadata editor when adding a new language shows as default option gco:CharacterString (see attached image).

Attached a patch to show the gmd:LanguageCode as default option.

Attachments (2)

language_selection.png (20.7 KB ) - added by josegar74 13 years ago.
Show_ISO_Language_code_as_first_option_for_language_selection_in_metadata_editor.patch (1.5 KB ) - added by josegar74 13 years ago.

Download all attachments as: .zip

Change History (4)

by josegar74, 13 years ago

Attachment: language_selection.png added

comment:1 by Fxp, 13 years ago

Maybe it's better to set what is the default substitute (in your case for gmd:language, the default one will be gmd:LanguageCode) for an element instead of only reverting the sort order according to the type of element. It will maybe not work when you have many substitutes (eg. DQ report with more than 10 substitutes). In this last case, the default could be gmd:DQ_DomainConsistency for gmd:report which could be the selected one and the list still in alpha order.

Other points, to apply it to the widget UI, you need to update metadata/layout.xsl (which is the equivalent of metadata.xsl for the previous UI)

comment:2 by josegar74, 13 years ago

Resolution: fixed
Status: newclosed

Thanks Francois for the suggestions. Modified and committed according them.

In config-gui.xml can be defined the default substitutions for each element (now only for gmd:language):

<!-- Define the default selection for metadata element substitutions in the editor -->
<editor-default-substitutions>
    <!-- Default for gmd:language from 2 alternatives: gco:CharacterString, gmd:LanguageCode -->
    <element name="gmd:language" default="gmd:LanguageCode" />
 </editor-default-substitutions>
Note: See TracTickets for help on using tickets.