Skip to content

Commit

Permalink
Add guide link to unsupported metamodel of document template
Browse files Browse the repository at this point in the history
  • Loading branch information
janslifka committed Jan 23, 2025
1 parent 0837a3c commit 0645a9c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions engine-wizard/elm/Wizard/Common/GuideLinks.elm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module Wizard.Common.GuideLinks exposing
, documentTemplatesCreate
, documentTemplatesImport
, documentTemplatesPublish
, documentTemplatesUnsupportedMetamodel
, integrationQuestionSecrets
, kmEditorCreate
, kmEditorMigration
Expand Down Expand Up @@ -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" )
Expand Down Expand Up @@ -138,6 +140,11 @@ documentTemplatesPublish =
get "documentTemplatesPublish"


documentTemplatesUnsupportedMetamodel : GuideLinks -> String
documentTemplatesUnsupportedMetamodel =
get "documentTemplatesUnsupportedMetamodel"


integrationQuestionSecrets : GuideLinks -> String
integrationQuestionSecrets =
get "integrationQuestionSecrets"
Expand Down
10 changes: 10 additions & 0 deletions engine-wizard/elm/Wizard/DocumentTemplates/Detail/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0645a9c

Please sign in to comment.