diff --git a/templates/repo/competences/list.tmpl b/templates/repo/competences/list.tmpl index 88f7100933..40366e7209 100644 --- a/templates/repo/competences/list.tmpl +++ b/templates/repo/competences/list.tmpl @@ -3,7 +3,7 @@ {{template "repo/header" .}}

{{.i18n.Tr "repo.competences"}}

-
+
{{$.RenderedCompetences | Str2html}}
{{$.TransformedTrustProps}}
diff --git a/templates/repo/resources/list.tmpl b/templates/repo/resources/list.tmpl index 6ab050f0af..6e827ece27 100644 --- a/templates/repo/resources/list.tmpl +++ b/templates/repo/resources/list.tmpl @@ -3,7 +3,7 @@ {{template "repo/header" .}}

{{.i18n.Tr "repo.resources"}}

-
+
{{$.RenderedResources | Str2html}}
{{$.TransformedTrustProps}}
diff --git a/web_src/js/markup/trust_props.js b/web_src/js/markup/trust_props.js index eb5169e205..7be7c22bfa 100644 --- a/web_src/js/markup/trust_props.js +++ b/web_src/js/markup/trust_props.js @@ -1,7 +1,7 @@ export function initMarkupTrustProps() { - const renderSearchLink = (trustPropName) => { + const renderSearchLink = (trustPropName, trustPropType) => { const safeName = trustPropName.replace(' ', '+'); - return` найти`; + return` найти`; } $('.trust-props input[type="checkbox"]').click((e) => { @@ -9,7 +9,9 @@ export function initMarkupTrustProps() { $(e.target).parent().find('a').remove(); } else { const $parent = $(e.target).parent(); - const renderedSearchLink = renderSearchLink($parent.text()); + const $listContainer = $parent.parents("div.render-content"); + const trustPropType = $listContainer.attr("data-trust-prop-type"); + const renderedSearchLink = renderSearchLink($parent.text(), trustPropType); $parent.append(renderedSearchLink); } });