From 0645a9c4a6f960e014458bda48faf3569056f9c5 Mon Sep 17 00:00:00 2001 From: Jan Slifka Date: Thu, 23 Jan 2025 15:59:25 +0100 Subject: [PATCH] Add guide link to unsupported metamodel of document template --- engine-wizard/elm/Wizard/Common/GuideLinks.elm | 7 +++++++ .../elm/Wizard/DocumentTemplates/Detail/View.elm | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/engine-wizard/elm/Wizard/Common/GuideLinks.elm b/engine-wizard/elm/Wizard/Common/GuideLinks.elm index e8d10ff9c..4bb635c97 100644 --- a/engine-wizard/elm/Wizard/Common/GuideLinks.elm +++ b/engine-wizard/elm/Wizard/Common/GuideLinks.elm @@ -6,6 +6,7 @@ module Wizard.Common.GuideLinks exposing , documentTemplatesCreate , documentTemplatesImport , documentTemplatesPublish + , documentTemplatesUnsupportedMetamodel , integrationQuestionSecrets , kmEditorCreate , kmEditorMigration @@ -62,6 +63,7 @@ default = , ( "documentTemplatesCreate", "https://guide.ds-wizard.org/en/latest/application/document-templates/editors/create.html" ) , ( "documentTemplatesImport", "https://guide.ds-wizard.org/en/latest/application/document-templates/list/import.html" ) , ( "documentTemplatesPublish", "https://guide.ds-wizard.org/en/latest/application/document-templates/editors/detail/publish.html" ) + , ( "documentTemplatesUnsupportedMetamodel", "https://guide.ds-wizard.org/en/latest/more/self-hosted-dsw/faq-notes.html#document-templates-show-unsupported-metamodel-what-should-i-do" ) , ( "integrationQuestionSecrets", "https://guide.ds-wizard.org/en/latest/more/development/integration-questions/integration-api.html#secrets-and-other-properties" ) , ( "kmEditorCreate", "https://guide.ds-wizard.org/en/latest/application/knowledge-models/editors/create.html" ) , ( "kmEditorMigration", "https://guide.ds-wizard.org/en/latest/application/knowledge-models/editors/migration.html" ) @@ -138,6 +140,11 @@ documentTemplatesPublish = get "documentTemplatesPublish" +documentTemplatesUnsupportedMetamodel : GuideLinks -> String +documentTemplatesUnsupportedMetamodel = + get "documentTemplatesUnsupportedMetamodel" + + integrationQuestionSecrets : GuideLinks -> String integrationQuestionSecrets = get "integrationQuestionSecrets" diff --git a/engine-wizard/elm/Wizard/DocumentTemplates/Detail/View.elm b/engine-wizard/elm/Wizard/DocumentTemplates/Detail/View.elm index d70103135..ac2162da2 100644 --- a/engine-wizard/elm/Wizard/DocumentTemplates/Detail/View.elm +++ b/engine-wizard/elm/Wizard/DocumentTemplates/Detail/View.elm @@ -20,6 +20,7 @@ import Version import Wizard.Common.AppState exposing (AppState) import Wizard.Common.Components.DetailPage as DetailPage import Wizard.Common.Feature as Feature +import Wizard.Common.GuideLinks as GuideLinks import Wizard.Common.Html exposing (linkTo) import Wizard.Common.Html.Attribute exposing (dataCy) import Wizard.Common.View.ItemIcon as ItemIcon @@ -181,6 +182,15 @@ unsupportedMetamodelVersionWarning appState template = else [] + ( True, _, _ ) -> + [ a + [ href (GuideLinks.documentTemplatesUnsupportedMetamodel appState.guideLinks) + , target "_blank" + , class "ms-1" + ] + [ text (gettext "Learn more in guide" appState.locale) ] + ] + _ -> [] in