62741: Grid template field changes

This commit is contained in:
Kristof De Langhe
2019-08-12 11:05:45 +02:00
parent 2db0bf44f3
commit 1be7f4e550
12 changed files with 41 additions and 37 deletions

View File

@@ -11,9 +11,9 @@
<ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4"> <ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4">
<h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4> <h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4>
</ds-truncatable-part> </ds-truncatable-part>
<p *ngIf="dso.hasMetadata('journalissue.issuedate')" class="item-date card-text text-muted"> <p *ngIf="dso.hasMetadata('creativework.datePublished')" class="item-date card-text text-muted">
<ds-truncatable-part [id]="dso.id" [minLines]="1"> <ds-truncatable-part [id]="dso.id" [minLines]="1">
<span [innerHTML]="firstMetadataValue('journalissue.issuedate')"></span> <span [innerHTML]="firstMetadataValue('creativework.datePublished')"></span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<p *ngIf="dso.hasMetadata('journal.title')" class="item-journal-title card-text"> <p *ngIf="dso.hasMetadata('journal.title')" class="item-journal-title card-text">

View File

@@ -15,7 +15,7 @@ mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
value: 'This is just another title' value: 'This is just another title'
} }
], ],
'journalissue.issuedate': [ 'creativework.datePublished': [
{ {
language: null, language: null,
value: '2015-06-26' value: '2015-06-26'

View File

@@ -11,14 +11,14 @@
<ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4"> <ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4">
<h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4> <h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4>
</ds-truncatable-part> </ds-truncatable-part>
<p *ngIf="dso.hasMetadata('journalvolume.issuedate')" class="item-date card-text text-muted"> <p *ngIf="dso.hasMetadata('creativework.datePublished')" class="item-date card-text text-muted">
<ds-truncatable-part [id]="dso.id" [minLines]="1"> <ds-truncatable-part [id]="dso.id" [minLines]="1">
<span [innerHTML]="firstMetadataValue('journalvolume.issuedate')"></span> <span [innerHTML]="firstMetadataValue('creativework.datePublished')"></span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<p *ngIf="dso.hasMetadata('journalvolume.identifier.description')" class="item-description card-text"> <p *ngIf="dso.hasMetadata('dc.description')" class="item-description card-text">
<ds-truncatable-part [id]="dso.id" [minLines]="3"> <ds-truncatable-part [id]="dso.id" [minLines]="3">
<span [innerHTML]="firstMetadataValue('journalvolume.identifier.description')"></span> <span [innerHTML]="firstMetadataValue('dc.description')"></span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<div class="text-center"> <div class="text-center">

View File

@@ -15,13 +15,13 @@ mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
value: 'This is just another title' value: 'This is just another title'
} }
], ],
'journalvolume.issuedate': [ 'creativework.datePublished': [
{ {
language: null, language: null,
value: '2015-06-26' value: '2015-06-26'
} }
], ],
'journalvolume.identifier.description': [ 'dc.description': [
{ {
language: 'en_US', language: 'en_US',
value: 'A description for the journal volume' value: 'A description for the journal volume'

View File

@@ -11,17 +11,19 @@
<ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4"> <ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4">
<h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4> <h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4>
</ds-truncatable-part> </ds-truncatable-part>
<p *ngIf="dso.hasMetadata('journal.contributor.editor')" <p *ngIf="dso.hasMetadata('creativework.editor')"
class="item-publisher card-text text-muted"> class="item-publisher card-text text-muted">
<ds-truncatable-part [id]="dso.id" [minLines]="1"> <ds-truncatable-part [id]="dso.id" [minLines]="1">
<span *ngIf="dso.hasMetadata('journal.contributor.editor')" class="item-editor">{{dso.firstMetadataValue('journal.contributor.editor')}}</span> <span class="item-editor">{{dso.firstMetadataValue('creativework.editor')}}</span>
<span>, </span> <span *ngIf="dso.hasMetadata('creativework.publisher')" class="item-publisher">
<span *ngIf="dso.hasMetadata('journal.publisher')" class="item-publisher">{{dso.firstMetadataValue('journal.publisher')}}</span> <span>, </span>
{{dso.firstMetadataValue('creativework.publisher')}}
</span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<p *ngIf="dso.hasMetadata('journal.identifier.description')" class="item-description card-text"> <p *ngIf="dso.hasMetadata('dc.description')" class="item-description card-text">
<ds-truncatable-part [id]="dso.id" [minLines]="3"> <ds-truncatable-part [id]="dso.id" [minLines]="3">
<span [innerHTML]="firstMetadataValue('journal.identifier.description')"></span> <span [innerHTML]="firstMetadataValue('dc.description')"></span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<div class="text-center"> <div class="text-center">

View File

@@ -15,19 +15,19 @@ mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
value: 'This is just another title' value: 'This is just another title'
} }
], ],
'journal.contributor.editor': [ 'creativework.editor': [
{ {
language: 'en_US', language: 'en_US',
value: 'Smith, Donald' value: 'Smith, Donald'
} }
], ],
'journal.publisher': [ 'creativework.publisher': [
{ {
language: 'en_US', language: 'en_US',
value: 'A company' value: 'A company'
} }
], ],
'journal.identifier.description': [ 'dc.description': [
{ {
language: 'en_US', language: 'en_US',
value: 'This is the description' value: 'This is the description'

View File

@@ -9,19 +9,21 @@
<div class="card-body"> <div class="card-body">
<ds-item-type-badge [object]="object"></ds-item-type-badge> <ds-item-type-badge [object]="object"></ds-item-type-badge>
<ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4"> <ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4">
<h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4> <h4 class="card-title" [innerHTML]="dso.firstMetadataValue('organization.legalName')"></h4>
</ds-truncatable-part> </ds-truncatable-part>
<p *ngIf="dso.hasMetadata('orgunit.identifier.dateestablished')" class="item-date card-text text-muted"> <p *ngIf="dso.hasMetadata('organization.foundingDate')" class="item-date card-text text-muted">
<ds-truncatable-part [id]="dso.id" [minLines]="1"> <ds-truncatable-part [id]="dso.id" [minLines]="1">
<span [innerHTML]="firstMetadataValue('orgunit.identifier.dateestablished')"></span> <span [innerHTML]="firstMetadataValue('organization.foundingDate')"></span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<p *ngIf="dso.hasMetadata('orgunit.identifier.country')" <p *ngIf="dso.hasMetadata('organization.address.addressCountry')"
class="item-location card-text"> class="item-location card-text">
<ds-truncatable-part [id]="dso.id" [minLines]="3"> <ds-truncatable-part [id]="dso.id" [minLines]="3">
<span *ngIf="dso.hasMetadata('orgunit.identifier.country')" class="item-country">{{dso.firstMetadataValue('orgunit.identifier.country')}}</span> <span class="item-country">{{dso.firstMetadataValue('organization.address.addressCountry')}}</span>
<span>, </span> <span *ngIf="dso.hasMetadata('organization.address.addressLocality')" class="item-city">
<span *ngIf="dso.hasMetadata('orgunit.identifier.city')" class="item-city">{{dso.firstMetadataValue('orgunit.identifier.city')}}</span> <span>, </span>
{{dso.firstMetadataValue('organization.address.addressLocality')}}
</span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<div class="text-center"> <div class="text-center">

View File

@@ -15,19 +15,19 @@ mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
value: 'This is just another title' value: 'This is just another title'
} }
], ],
'orgunit.identifier.dateestablished': [ 'organization.foundingDate': [
{ {
language: null, language: null,
value: '2015-06-26' value: '2015-06-26'
} }
], ],
'orgunit.identifier.country': [ 'organization.address.addressCountry': [
{ {
language: 'en_US', language: 'en_US',
value: 'Belgium' value: 'Belgium'
} }
], ],
'orgunit.identifier.city': [ 'organization.address.addressLocality': [
{ {
language: 'en_US', language: 'en_US',
value: 'Brussels' value: 'Brussels'

View File

@@ -16,9 +16,9 @@
<span [innerHTML]="firstMetadataValue('person.email')"></span> <span [innerHTML]="firstMetadataValue('person.email')"></span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<p *ngIf="dso.hasMetadata('person.jobtitle')" class="item-jobtitle card-text"> <p *ngIf="dso.hasMetadata('person.jobTitle')" class="item-jobtitle card-text">
<ds-truncatable-part [id]="dso.id" [minLines]="3"> <ds-truncatable-part [id]="dso.id" [minLines]="3">
<span [innerHTML]="firstMetadataValue('person.jobtitle')"></span> <span [innerHTML]="firstMetadataValue('person.jobTitle')"></span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<div class="text-center"> <div class="text-center">

View File

@@ -15,13 +15,13 @@ mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
value: 'This is just another title' value: 'This is just another title'
} }
], ],
'person.identifier.email': [ 'person.email': [
{ {
language: 'en_US', language: 'en_US',
value: 'Smith-Donald@gmail.com' value: 'Smith-Donald@gmail.com'
} }
], ],
'person.identifier.jobtitle': [ 'person.jobTitle': [
{ {
language: 'en_US', language: 'en_US',
value: 'Web Developer' value: 'Web Developer'

View File

@@ -11,9 +11,9 @@
<ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4"> <ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4">
<h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4> <h4 class="card-title" [innerHTML]="dso.firstMetadataValue('dc.title')"></h4>
</ds-truncatable-part> </ds-truncatable-part>
<p *ngIf="dso.hasMetadata('project.identifier.funder')" class="item-funder card-text text-muted"> <p *ngIf="dso.hasMetadata('dc.description')" class="item-description card-text text-muted">
<ds-truncatable-part [id]="dso.id" [minLines]="3"> <ds-truncatable-part [id]="dso.id" [minLines]="3">
<span [innerHTML]="firstMetadataValue('project.identifier.funder')"></span> <span [innerHTML]="firstMetadataValue('dc.description')"></span>
</ds-truncatable-part> </ds-truncatable-part>
</p> </p>
<div class="text-center"> <div class="text-center">

View File

@@ -15,10 +15,10 @@ mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
value: 'This is just another title' value: 'This is just another title'
} }
], ],
'project.identifier.funder': [ 'dc.description': [
{ {
language: 'en_US', language: 'en_US',
value: 'The project funder' value: 'The project description'
} }
] ]
} }
@@ -38,4 +38,4 @@ mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
} }
}); });
describe('ProjectGridElementComponent', getEntityGridElementTestComponent(ProjectGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['funder'])); describe('ProjectGridElementComponent', getEntityGridElementTestComponent(ProjectGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['description']));