Skip to content
Snippets Groups Projects
Commit fd26f190 authored by Art Lowel's avatar Art Lowel
Browse files

show entity time on item pages and in search results

parent 21953a07
No related branches found
No related tags found
No related merge requests found
Showing
with 47 additions and 8 deletions
......@@ -288,6 +288,7 @@
},
"person": {
"page": {
"titleprefix": "Person: ",
"jobtitle": "Job Title",
"lastname": "Last Name",
"firstname": "First Name",
......@@ -298,56 +299,83 @@
"link": {
"full": "Show all metadata"
}
},
"listelement": {
"badge": "Person"
}
},
"project": {
"page": {
"titleprefix": "Research Project: ",
"status": "Status",
"id": "ID",
"expectedcompletion": "Expected Completion",
"description": "Description",
"keyword": "Keywords"
},
"listelement": {
"badge": "Research Project"
}
},
"orgunit": {
"page": {
"titleprefix": "Organizational Unit: ",
"dateestablished": "Date established",
"city": "City",
"country": "Country",
"id": "ID",
"description": "Description"
},
"listelement": {
"badge": "Organizational Unit"
}
},
"journal": {
"page": {
"titleprefix": "Journal: ",
"issn": "ISSN",
"publisher": "Publisher",
"description": "Description",
"editor": "Editor-in-Chief"
},
"listelement": {
"badge": "Journal"
}
},
"journalvolume": {
"page": {
"titleprefix": "Journal Volume: ",
"volume": "Volume",
"issuedate": "Issue Date",
"description": "Description"
},
"listelement": {
"badge": "Journal Volume"
}
},
"journalissue": {
"page": {
"titleprefix": "Journal Issue: ",
"number": "Number",
"issuedate": "Issue Date",
"description": "Description",
"keyword": "Keywords",
"journal-title": "Journal Title",
"journal-issn": "Journal ISSN"
},
"listelement": {
"badge": "Journal Issue"
}
},
"publication": {
"page": {
"titleprefix": "Publication: ",
"journal-title": "Journal Title",
"journal-issn": "Journal ISSN",
"volume-title": "Volume Title"
},
"listelement": {
"badge": "Publication"
}
},
"nav": {
......
<h2 class="item-page-title-field">
<div *ngIf="item.firstMetadataValue('relationship.type') as type">
{{ type.toLowerCase() + '.page.titleprefix' | translate }}
</div>
<ds-metadata-values [mdValues]="item?.allMetadata(fields)"></ds-metadata-values>
</h2>
<h2 class="item-page-title-field">
<ds-metadata-values [mdValues]="item?.allMetadata(['dc.title'])"></ds-metadata-values>
{{'journalissue.page.titleprefix' | translate}}<ds-metadata-values [mdValues]="item?.allMetadata(['dc.title'])"></ds-metadata-values>
</h2>
<div class="row">
<div class="col-xs-12 col-md-4">
......
<h2 class="item-page-title-field">
<ds-metadata-values [mdValues]="item?.allMetadata(['dc.title'])"></ds-metadata-values>
{{'journalvolume.page.titleprefix' | translate}}<ds-metadata-values [mdValues]="item?.allMetadata(['dc.title'])"></ds-metadata-values>
</h2>
<div class="row">
<div class="col-xs-12 col-md-4">
......
<h2 class="item-page-title-field">
<ds-metadata-values [mdValues]="item?.allMetadata(['dc.title'])"></ds-metadata-values>
{{'journal.page.titleprefix' | translate}}<ds-metadata-values [mdValues]="item?.allMetadata(['dc.title'])"></ds-metadata-values>
</h2>
<div class="row">
<div class="col-xs-12 col-md-4">
......
<h2 class="item-page-title-field">
<ds-metadata-values [mdValues]="item?.allMetadata(['orgunit.identifier.name'])"></ds-metadata-values>
{{'orgunit.page.titleprefix' | translate}}<ds-metadata-values [mdValues]="item?.allMetadata(['orgunit.identifier.name'])"></ds-metadata-values>
</h2>
<div class="row">
<div class="col-xs-12 col-md-4">
......
<h2 class="item-page-title-field">
<ds-metadata-values [mdValues]="item?.allMetadata(['dc.contributor.author'])"></ds-metadata-values>
{{'person.page.titleprefix' | translate}}<ds-metadata-values [mdValues]="item?.allMetadata(['dc.contributor.author'])"></ds-metadata-values>
</h2>
<div class="row">
<div class="col-xs-12 col-md-4">
......
<h2 class="item-page-title-field">
<ds-metadata-values [mdValues]="item?.allMetadata(['project.identifier.name'])"></ds-metadata-values>
{{'project.page.titleprefix' | translate}}<ds-metadata-values [mdValues]="item?.allMetadata(['project.identifier.name'])"></ds-metadata-values>
</h2>
<div class="row">
<div class="col-xs-12 col-md-4">
......
<ds-item-page-title-field [item]="item"></ds-item-page-title-field>
<h2 class="item-page-title-field">
{{'publication.page.titleprefix' | translate}}<ds-metadata-values [mdValues]="item?.allMetadata(['dc.title'])"></ds-metadata-values>
</h2>
<div class="row">
<div class="col-xs-12 col-md-4">
<ds-metadata-field-wrapper>
......
......@@ -31,7 +31,7 @@ export class SearchResponseParsingService implements ResponseParsingService {
const dsoSelfLinks = payload._embedded.objects
.filter((object) => hasValue(object._embedded))
.map((object) => object._embedded.dspaceObject)
.map((object) => object._embedded.indexableObject)
// we don't need embedded collections, bitstreamformats, etc for search results.
// And parsing them all takes up a lot of time. Throw them away to improve performance
// until objs until partial results are supported by the rest api
......
<div *ngIf="object && object.dspaceObject && object.dspaceObject.firstMetadataValue('relationship.type') as type">
<span class="badge badge-light">{{ type.toLowerCase() + '.listelement.badge' | translate }}</span>
</div>
<ds-item-type-switcher [object]="object" [viewMode]="viewMode"></ds-item-type-switcher>
import { Component } from '@angular/core';
import { DSpaceObject } from '../../../../core/shared/dspace-object.model';
import { Item } from '../../../../core/shared/item.model';
import { focusBackground } from '../../../animations/focus';
import { hasValue } from '../../../empty.util';
import { renderElementsFor } from '../../../object-collection/shared/dso-element-decorator';
import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
......@@ -19,4 +21,5 @@ import { ItemViewMode } from '../../../items/item-type-decorator';
@renderElementsFor(ItemSearchResult, SetViewMode.List)
export class ItemSearchResultListElementComponent extends SearchResultListElementComponent<ItemSearchResult, Item> {
viewMode = ItemViewMode.Element;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment