diff --git a/app/models/search-result.ts b/app/models/search-result.ts index 525c4e9872..cad126957f 100644 --- a/app/models/search-result.ts +++ b/app/models/search-result.ts @@ -204,6 +204,10 @@ export default class SearchResultModel extends Model { get hasSupplementalResource() { return this.resourceMetadata.hasSupplementalResource; } + + get registrationTemplate() { + return this.resourceMetadata['https://osf.io/vocab/2022/registration_type']?.[0]?.['@value']; + } } declare module 'ember-data/types/registries/model' { 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 e5114a25e9..85d1880185 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 @@ -11,9 +11,11 @@ {{/if}} -
- {{t 'osf-components.search-result-card.registration_template'}}: -
+{{#if @result.registrationTemplate}} +
+ {{t 'osf-components.search-result-card.registration_template'}}: {{@result.registrationTemplate}} +
+{{/if}} {{#if @result.license}}
{{t 'osf-components.search-result-card.license'}}: {{@result.license.name}}