From: Jose G. <jos...@ge...> - 2018-02-01 12:22:03
|
Hi Amaya Afaik, in GN 3.x+ the file metadata-edit.xsl inside the metadata schemas is not used. This page has documentation about metadata schemas that can be useful: https://geonetwork-opensource.org/manuals/3.4.x/en/customizing-application/implementing-a-schema-plugin.html The change you require, for now requires to do some xslt development. In GN 3.x+, the metadata editor views and other settings can be customised in this file https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/config-editor.xml, but not for which elements should be readonly (that can be a nice extension to add in the future). For now it requires some xslt development, you could add the list of elements in this template in the match section, but be aware that would not be just for example to add gmd:title, as otherwise all gmd:title will be set as readonly, requires to add the element with some condition to check the parent: https://github.com/geonetwork/core-geonetwork/blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/layout/layout-custom-fields.xsl#L43-L44 Regards, Jose García On Thu, Feb 1, 2018 at 12:47 PM, Amaya Martínez Echeverría < ama...@tr...> wrote: > Hi Jose, > > > > First of all, thanks for the quick answer. I don’t know Geonetwork as I’ve > been analyzing only which could we adapt or not with ‘simple > customizations’ (not involving code modifying or similar). > > > > The first solution is not valid because we need the fields to be shown. So > I would like to try the second one, but I’m lost… the Geonetwork’s online > documentation doesn’t talk about this kind of extension. How could I extend > that template? Or should I have to edit the “metadata-edit.xsl” file? > > > > Thanks in advance, > > > > Best regards, > > > > Amaia Martínez. > > > > > > *De:* Jose Garcia [mailto:jos...@ge...] > *Enviado el:* jueves, 01 de febrero de 2018 12:28 > *Para:* Amaya Martínez Echeverría <ama...@tr...> > *CC:* geo...@li... > *Asunto:* Re: [GeoNetwork-devel] Custom editor view - Set field no > editable (readonly) > > > > Hi Amaya > > > > I see 2 solutions: > > > > 1) Add a xslt template that match the gmd:DQ_DomainConsistency to don't > display it in the editor (if it's required to be displayed in the editor, > this solution is not > > > > <xsl:template mode="mode-iso19139" priority="5000" match="gmd:DQ_ > DomainConsistency" /> > > > > You can add it to this file https://github.com/geonetwork/core-geonetwork/ > blob/3.4.x/schemas/iso19139/src/main/plugin/iso19139/ > layout/layout-custom-fields.xsl > > > > > > 2) Make child elements inside gmd:DQ_DomainConsistency to be readonly, > like in this template: > > > > https://github.com/geonetwork/core-geonetwork/blob/3.4.x/ > schemas/iso19139/src/main/plugin/iso19139/layout/layout- > custom-fields.xsl#L43-L44 > > > > <!-- Readonly elements --> > > <xsl:template mode="mode-iso19139" priority="2100" > match="gmd:fileIdentifier|gmd:dateStamp"> > > > > > > You need to extend that template or add a similar one for the elements > inside gmd:DQ_DomainConsistency that you need as readonly. > > > Regards, > > Jose García > > > > On Thu, Feb 1, 2018 at 12:06 PM, Amaya Martínez Echeverría < > ama...@tr...> wrote: > > Hello there, > > > > Anyone could help me with my custom editor view? I don’t know how to set a > field ‘no editable’. > > > > How could I make the fields under ‘gmd:DQ_DomainConsistency’ elements to > be readonly fields? For example, the “Title” element > (gmd:DQ_ConformanceResult/gmd:specification/gmd:CI_Citation/gmd:title). > > > > > > Any kind of help would be appreciate. > > > > > > Best regards, > > Amaia Martínez > > > > > ------------------------------ > > > AVISO SOBRE CONFIDENCIALIDAD: La información incluida en este mensaje es > CONFIDENCIAL y de uso EXCLUSIVO a su FINALIDAD. Su posterior divulgación > será responsabilidad de quien la realice > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > GeoNetwork-devel mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geonetwork-devel > GeoNetwork OpenSource is maintained at http://sourceforge.net/ > projects/geonetwork > > > > > > -- > > Vriendelijke groeten / Kind regards, > > Jose García > > <http://www.geocat.net/> > Veenderweg 13 > <https://maps.google.com/?q=Veenderweg+13+%0D+6721+WD+Bennekom+%0D+The+Netherlands&entry=gmail&source=g> > 6721 WD Bennekom > The Netherlands > T: +31 (0)318 416664 <+31318416664> > > <https://www.facebook.com/geocatbv> <https://twitter.com/geocat_bv> > <https://plus.google.com/u/1/+GeocatNetbv/posts> > > Please consider the environment before printing this email. > > ------------------------------ > > AVISO SOBRE CONFIDENCIALIDAD: La información incluida en este mensaje es > CONFIDENCIAL y de uso EXCLUSIVO a su FINALIDAD. Su posterior divulgación > será responsabilidad de quien la realice > -- *Vriendelijke groeten / Kind regards,Jose García <http://www.geocat.net/>Veenderweg 136721 WD BennekomThe NetherlandsT: +31 (0)318 416664 <+31318416664> <https://www.facebook.com/geocatbv> <https://twitter.com/geocat_bv> <https://plus.google.com/u/1/+GeocatNetbv/posts>Please consider the environment before printing this email.* |