diff --git a/app/models/search-result.ts b/app/models/search-result.ts index 04e4300a08..8307ea218e 100644 --- a/app/models/search-result.ts +++ b/app/models/search-result.ts @@ -247,7 +247,7 @@ export default class SearchResultModel extends Model { } get registrationTemplate() { - return this.resourceMetadata['https://osf.io/vocab/2022/registration_type']?.[0]?.['@value']; + return this.resourceMetadata.conformsTo?.[0]?.title?.[0]?.['@value']; } } diff --git a/lib/osf-components/addon/components/search-result-card/file-secondary-metadata/template.hbs b/lib/osf-components/addon/components/search-result-card/file-secondary-metadata/template.hbs index 2e1a90ebbf..f9c0ea9529 100644 --- a/lib/osf-components/addon/components/search-result-card/file-secondary-metadata/template.hbs +++ b/lib/osf-components/addon/components/search-result-card/file-secondary-metadata/template.hbs @@ -24,6 +24,19 @@ {{/if}} + {{#if @result.doi}} +
{{t 'osf-components.search-result-card.doi'}}
+
+ + {{list.item}} + +
+ {{/if}} {{#if @result.nodeLicense}}
{{t 'osf-components.search-result-card.license'}}
{{@result.nodeLicense.name}}
diff --git a/lib/osf-components/addon/components/search-result-card/preprint-secondary-metadata/template.hbs b/lib/osf-components/addon/components/search-result-card/preprint-secondary-metadata/template.hbs index 2682132e09..eced25835c 100644 --- a/lib/osf-components/addon/components/search-result-card/preprint-secondary-metadata/template.hbs +++ b/lib/osf-components/addon/components/search-result-card/preprint-secondary-metadata/template.hbs @@ -1,15 +1,21 @@
{{!-- Description --}} -
{{t 'osf-components.search-result-card.description'}}:
-
{{@result.description}}
+ {{#if @result.description}} +
{{t 'osf-components.search-result-card.description'}}:
+
{{@result.description}}
+ {{/if}} {{!-- Preprint Provider --}} -
{{t 'osf-components.search-result-card.preprint_provider'}}
-
{{@result.provider.name}}
+ {{#if @result.provider}} +
{{t 'osf-components.search-result-card.preprint_provider'}}
+
{{@result.provider.name}}
+ {{/if}} {{!-- License --}} -
{{t 'osf-components.search-result-card.license'}}
-
{{@result.license.name}}
+ {{#if @result.license}} +
{{t 'osf-components.search-result-card.license'}}
+
{{@result.license.name}}
+ {{/if}} {{!-- DOI --}} {{#if @result.doi}} diff --git a/lib/osf-components/addon/components/search-result-card/project-secondary-metadata/template.hbs b/lib/osf-components/addon/components/search-result-card/project-secondary-metadata/template.hbs index 856ab6c52a..bc05f2af7d 100644 --- a/lib/osf-components/addon/components/search-result-card/project-secondary-metadata/template.hbs +++ b/lib/osf-components/addon/components/search-result-card/project-secondary-metadata/template.hbs @@ -20,6 +20,10 @@
{{t 'osf-components.search-result-card.collection'}}
{{@result.isPartOfCollection.title}}
{{/if}} + {{#if @result.resourceNature}} +
{{t 'osf-components.search-result-card.resource_nature'}}
+
{{@result.resourceNature}}
+ {{/if}} {{#if @resource.language}}
{{t 'osf-components.search-result-card.language'}}
{{@resource.language}}
diff --git a/lib/osf-components/addon/components/search-result-card/registration-secondary-metadata/template.hbs b/lib/osf-components/addon/components/search-result-card/registration-secondary-metadata/template.hbs index 26658ef7f5..17a8858d72 100644 --- a/lib/osf-components/addon/components/search-result-card/registration-secondary-metadata/template.hbs +++ b/lib/osf-components/addon/components/search-result-card/registration-secondary-metadata/template.hbs @@ -1,5 +1,13 @@
- {{#if @result.funder}} + {{#if @result.description}} +
{{t 'osf-components.search-result-card.description'}}
+
{{@result.description}}
+ {{/if}} + {{#if @result.provider}} +
{{t 'osf-components.search-result-card.preprint_provider'}}
+
{{@result.provider.name}}
+ {{/if}} + {{#if @result.funders}}
{{t 'osf-components.search-result-card.funder'}}