-
-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor / Add custom element in distribution and associated record directive #7997
Conversation
…ective Add the possibility to add custom elements in the panel of `data-gn-distribution-resources-panel` or `data-gn-associated-resources-panel`. Common use case is to add explanatory text or add action for shortcuts eg. ```xml <directive data-gn-distribution-resources-panel="gnCurrentEdit.metadata" data-mode="viewConfig.distributionConfig.layout || ''" data-editor-config="default" ... > <section> <text> <div class="alert alert-info">A specific representation of a dataset. A dataset might be available in multiple serializations that may differ in various ways, including natural language, media-type or format, schematic organization, temporal and spatial resolution, level of detail or profiles (which might specify any or all of the above).</div> </text> <action type="add" name=" " btnLabel="mw-addAtomFeed" or="onLine" in="/mdb:MD_Metadata/mdb:distributionInfo/*/mrd:transferOptions/*" if="count(mdb:MD_Metadata/mdb:distributionInfo/*/mrd:transferOptions/*/mrd:onLine[*/cit:protocol/*/text() = 'atom:feed']) = 0"> <template> <snippet> <mrd:onLine> <cit:CI_OnlineResource> <cit:linkage> <gco:CharacterString>https://geoservices.wallonie.be/geotraitement/spwdatadownload/get/${uuid}/atom_service.xml</gco:CharacterString> </cit:linkage> <cit:protocol> <gco:CharacterString>atom:feed</gco:CharacterString> </cit:protocol> <cit:name> <gco:CharacterString>Service de téléchargement ATOM Feed</gco:CharacterString> </cit:name> <cit:description> <gco:CharacterString>Ce service de téléchargement ATOM Feed permet de télécharger la série de couches de données</gco:CharacterString> </cit:description> <cit:function> <cit:CI_OnLineFunctionCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#CI_OnLineFunctionCode" codeListValue="download"/> </cit:function> </cit:CI_OnlineResource> </mrd:onLine> </snippet> </template> </action> ``` Also add support for `${uuid}` placeholder in snippet to dynamically create snippet for current record.
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fxprunayre code changes look fine, but using your example I don't get the button to add the ATOM feed.
I guess it is due to not being defined mrd:transferOptions
so probably that causes these attributes to not being evaluated? Can you confirm this?
in="/mdb:MD_Metadata/mdb:distributionInfo/*/mrd:transferOptions/*"
if="count(mdb:MD_Metadata/mdb:distributionInfo/*/mrd:transferOptions/*/mrd:onLine[*/cit:protocol/*/text() = 'atom:feed']) = 0">
Indeed if there is no
evaluates to false. Same would happen in the editor. As it is now, we can't really avoid this. |
Add the possibility to add custom elements in the panel of
data-gn-distribution-resources-panel
ordata-gn-associated-resources-panel
.Common use case is to add explanatory text or add action for shortcuts
eg.
Also add support for
${uuid}
placeholder in snippet to dynamicallycreate snippet for current record.
Checklist
main
branch, backports managed with labelREADME.md
filespom.xml
dependency management. Update build documentation with intended library use and library tutorials or documentationFunded by Service Public de Wallonie (SPW)