Question about default editing views

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about default editing views

Jo Cook
Hi Everyone,

In GeoNetwork 3.8 I have created a custom (very simple) view for
editing non-spatial records in ISO19139 and set it as the default,
with a "displayIfRecord" setting. I've also set the standard simple
view to have a displayIfRecord setting so that it's not used for these
non-spatial datasets.

Non-spatial:

<view name="nonspatial" hideTimeInCalendar="true" default="true"
displayIfRecord="contains(gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString,'NonGeographicDataset')">

Standard:

<view name="default"
displayIfRecord="not(contains(gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString,'NonGeographicDataset'))"
>

The behaviour I am seeing is that when I first open a non-spatial
record for editing I see the standard view. It's not present in the
dropdown list though. I don't want to completely disable the standard
view as I want that to be available for editing spatial records in
ISO19139. Is there a way I can ensure that my nonspatial view opens
when a non-spatial record is edited?

One other slightly unrelated question- is it possible to set the
display so that nilreasons show by default without the need to check
the "More details" box?

Thanks

Jo



--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009

--
-- 
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 

t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/
twitter:@astuntech <https://twitter.com/astuntech>



iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>

GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>





Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Question about default editing views

Jose Garcia
Hi Jo

That seem setup in the javascript code:


Not optimal, but can be implemented a function to check the metadata gmd:hierarchyLevelName to check which view to display by default for iso19139 schemas.

We implemented a json configuration file for the associated resources panel (https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/config/associated-panel/default.json), could be relevant to move this kind of stuff also to a more generic json file with the configuration of the editor that can't be handled in config-editor.xml,.

Regards,
Jose García


On Fri, Feb 14, 2020 at 11:44 AM Jo Cook <[hidden email]> wrote:
Hi Everyone,

In GeoNetwork 3.8 I have created a custom (very simple) view for
editing non-spatial records in ISO19139 and set it as the default,
with a "displayIfRecord" setting. I've also set the standard simple
view to have a displayIfRecord setting so that it's not used for these
non-spatial datasets.

Non-spatial:

<view name="nonspatial" hideTimeInCalendar="true" default="true"
displayIfRecord="contains(gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString,'NonGeographicDataset')">

Standard:

<view name="default"
displayIfRecord="not(contains(gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString,'NonGeographicDataset'))"
>

The behaviour I am seeing is that when I first open a non-spatial
record for editing I see the standard view. It's not present in the
dropdown list though. I don't want to completely disable the standard
view as I want that to be available for editing spatial records in
ISO19139. Is there a way I can ensure that my nonspatial view opens
when a non-spatial record is edited?

One other slightly unrelated question- is it possible to set the
display so that nilreasons show by default without the need to check
the "More details" box?

Thanks

Jo



--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009

--
-- 
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 

t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/
twitter:@astuntech <https://twitter.com/astuntech>



iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>

GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>





Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
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


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

Please consider the environment before printing this email.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Question about default editing views

Jo Cook
Hi Jose,

Thanks for this- I'm struggling to implement though. I've looked at a record response in chrome developer tools  (eg http://localhost:8080/geonetwork/srv/eng/q?_content_type=json&_id=438&_isTemplate=y+or+n+or+s&fast=index) and at present the sensible thing to use would be the metadata type=nonGeographicDataset. If I use that in the javascript (eg md.type.match(/nonGeographicDataset/i) then I get an error that md.type is not a function. I can get it to work with something like md.title but obviously that's not the right thing to filter on. Do I need to add hierarchyLevelName to the index to use it or is there a way I can use md.type without it causing a javascript error?

Thanks again

Jo

On Fri, Feb 14, 2020 at 12:24 PM Jose Garcia <[hidden email]> wrote:
Hi Jo

That seem setup in the javascript code:


Not optimal, but can be implemented a function to check the metadata gmd:hierarchyLevelName to check which view to display by default for iso19139 schemas.

We implemented a json configuration file for the associated resources panel (https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/config/associated-panel/default.json), could be relevant to move this kind of stuff also to a more generic json file with the configuration of the editor that can't be handled in config-editor.xml,.

Regards,
Jose García


On Fri, Feb 14, 2020 at 11:44 AM Jo Cook <[hidden email]> wrote:
Hi Everyone,

In GeoNetwork 3.8 I have created a custom (very simple) view for
editing non-spatial records in ISO19139 and set it as the default,
with a "displayIfRecord" setting. I've also set the standard simple
view to have a displayIfRecord setting so that it's not used for these
non-spatial datasets.

Non-spatial:

<view name="nonspatial" hideTimeInCalendar="true" default="true"
displayIfRecord="contains(gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString,'NonGeographicDataset')">

Standard:

<view name="default"
displayIfRecord="not(contains(gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString,'NonGeographicDataset'))"
>

The behaviour I am seeing is that when I first open a non-spatial
record for editing I see the standard view. It's not present in the
dropdown list though. I don't want to completely disable the standard
view as I want that to be available for editing spatial records in
ISO19139. Is there a way I can ensure that my nonspatial view opens
when a non-spatial record is edited?

One other slightly unrelated question- is it possible to set the
display so that nilreasons show by default without the need to check
the "More details" box?

Thanks

Jo



--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009

--
-- 
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 

t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/
twitter:@astuntech <https://twitter.com/astuntech>



iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>

GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>





Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
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


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

Please consider the environment before printing this email.


--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For urgent responses at that time, please visit support.astuntechnology.com or phone our office on 01372 744009


-- 
Sign up to our mailing list for updates on news, products, conferences, events and training

Astun Technology Ltd, Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 
t:+44 1372 744 009 w: astuntechnology.com twitter:@astuntech

Company registration no. 5410695. Registered in England and Wales. Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Question about default editing views

Jose Garcia
Hi Jo


But I see it's not defined below in the Metadata prototype: https://github.com/geonetwork/core-geonetwork/blob/9b91d45f7e4965679142939b6106220ef50f62a6/web-ui/src/main/resources/catalog/components/catalog/CatalogService.js#L630, although I think should not be not required to define it there as that seem to retrieve properties in the geonet:info section, other properties should be available by default. I'll do some testing to check this.

Regards,
Jose GArcía 


On Mon, Feb 17, 2020 at 6:28 PM Jo Cook <[hidden email]> wrote:
Hi Jose,

Thanks for this- I'm struggling to implement though. I've looked at a record response in chrome developer tools  (eg http://localhost:8080/geonetwork/srv/eng/q?_content_type=json&_id=438&_isTemplate=y+or+n+or+s&fast=index) and at present the sensible thing to use would be the metadata type=nonGeographicDataset. If I use that in the javascript (eg md.type.match(/nonGeographicDataset/i) then I get an error that md.type is not a function. I can get it to work with something like md.title but obviously that's not the right thing to filter on. Do I need to add hierarchyLevelName to the index to use it or is there a way I can use md.type without it causing a javascript error?

Thanks again

Jo

On Fri, Feb 14, 2020 at 12:24 PM Jose Garcia <[hidden email]> wrote:
Hi Jo

That seem setup in the javascript code:


Not optimal, but can be implemented a function to check the metadata gmd:hierarchyLevelName to check which view to display by default for iso19139 schemas.

We implemented a json configuration file for the associated resources panel (https://github.com/geonetwork/core-geonetwork/blob/master/schemas/iso19139/src/main/plugin/iso19139/config/associated-panel/default.json), could be relevant to move this kind of stuff also to a more generic json file with the configuration of the editor that can't be handled in config-editor.xml,.

Regards,
Jose García


On Fri, Feb 14, 2020 at 11:44 AM Jo Cook <[hidden email]> wrote:
Hi Everyone,

In GeoNetwork 3.8 I have created a custom (very simple) view for
editing non-spatial records in ISO19139 and set it as the default,
with a "displayIfRecord" setting. I've also set the standard simple
view to have a displayIfRecord setting so that it's not used for these
non-spatial datasets.

Non-spatial:

<view name="nonspatial" hideTimeInCalendar="true" default="true"
displayIfRecord="contains(gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString,'NonGeographicDataset')">

Standard:

<view name="default"
displayIfRecord="not(contains(gmd:MD_Metadata/gmd:hierarchyLevelName/gco:CharacterString,'NonGeographicDataset'))"
>

The behaviour I am seeing is that when I first open a non-spatial
record for editing I see the standard view. It's not present in the
dropdown list though. I don't want to completely disable the standard
view as I want that to be available for editing spatial records in
ISO19139. Is there a way I can ensure that my nonspatial view opens
when a non-spatial record is edited?

One other slightly unrelated question- is it possible to set the
display so that nilreasons show by default without the need to check
the "More details" box?

Thanks

Jo



--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009

--
-- 
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*

Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 

t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/
twitter:@astuntech <https://twitter.com/astuntech>



iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>

GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>





Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
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


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

Please consider the environment before printing this email.


--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For urgent responses at that time, please visit support.astuntechnology.com or phone our office on 01372 744009


-- 
Sign up to our mailing list for updates on news, products, conferences, events and training

Astun Technology Ltd, Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK 
t:+44 1372 744 009 w: astuntechnology.com twitter:@astuntech

Company registration no. 5410695. Registered in England and Wales. Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no. 864201149.


--
Vriendelijke groeten / Kind regards,

Jose García


Veenderweg 13
6721 WD Bennekom
The Netherlands
T: <a href="tel:+31318416664" style="font-family:Helvetica,Arial,sans-serif" target="_blank">+31 (0)318 416664

Please consider the environment before printing this email.


_______________________________________________
GeoNetwork-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork