mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
40416: solved collections issue on item page
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
"abstract": "Abstract",
|
||||
"date": "Date",
|
||||
"uri": "URI",
|
||||
"files": "Files"
|
||||
"files": "Files",
|
||||
"collections": "Collections"
|
||||
}
|
||||
},
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<ds-metadata-field-wrapper [label]="label | translate">
|
||||
<div class="collections">
|
||||
<a *ngFor="let collection of collections" [href]="(collection)?.self">
|
||||
<span>{{(collection)?.name}}</span>
|
||||
<a *ngFor="let collection of collections; let last=last;" [href]="(collection | async)?.self">
|
||||
<span>{{(collection | async)?.name}}</span><span *ngIf="!last" [innerHTML]="separator"></span>
|
||||
</a>
|
||||
</div>
|
||||
</ds-metadata-field-wrapper>
|
||||
|
@@ -11,6 +11,7 @@ export class CollectionsComponent implements OnInit {
|
||||
|
||||
@Input() item: Item;
|
||||
label : string = "item.page.collections";
|
||||
separator: string = "<br/>"
|
||||
collections: Array<Observable<Collection>>;
|
||||
|
||||
constructor() {
|
||||
@@ -23,7 +24,7 @@ export class CollectionsComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.collections = this.item.getCollections();
|
||||
this.collections[0].subscribe(d => console.log("TEST TEST LOREM IPSUM LALALALAL"));
|
||||
this.collections[0].subscribe(d => console.log(d.name));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<ds-metadata-field-wrapper [label]="label | translate">
|
||||
<div class="file-section">
|
||||
<a *ngFor="let file of (files | async)" [href]="(file | async)?.retrieve">
|
||||
<a *ngFor="let file of (files | async); let last=last;" [href]="(file | async)?.retrieve">
|
||||
<span>{{(file | async)?.name}}</span>
|
||||
<span>({{((file | async)?.size) | dsFileSize }})</span>
|
||||
<span *ngIf="!last" innerHTML="{{separator}}"></span>
|
||||
</a>
|
||||
</div>
|
||||
</ds-metadata-field-wrapper>
|
||||
|
@@ -11,6 +11,7 @@ export class FileSectionComponent implements OnInit {
|
||||
|
||||
@Input() item: Item;
|
||||
label : string = "item.page.files";
|
||||
separator: string = "<br/>"
|
||||
files: Observable<Array<Observable<Bitstream>>>;
|
||||
|
||||
constructor() {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<ds-metadata-field-wrapper [label]="label | translate">
|
||||
<a *ngFor="let metadatum of values; let last=last;" href="{{metadatum.value}}">
|
||||
{{linktext || metadatum.value}}<span *ngIf="!last"><span innerHTML="{{separator}}"></span></span>
|
||||
<a *ngFor="let metadatum of values; let last=last;" [href]="metadatum.value">
|
||||
{{ linktext || metadatum.value }}<span *ngIf="!last" [innerHTML]="separator"></span>
|
||||
</a>
|
||||
</ds-metadata-field-wrapper>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<ds-metadata-field-wrapper [label]="label | translate">
|
||||
<span *ngFor="let metadatum of values; let last=last;">
|
||||
{{metadatum.value}}<span *ngIf="!last"><span innerHTML="{{separator}}"></span></span>
|
||||
{{metadatum.value}}<span *ngIf="!last" [innerHTML]="separator"></span>
|
||||
</span>
|
||||
</ds-metadata-field-wrapper>
|
||||
|
@@ -9,6 +9,7 @@ import { ItemPageSpecificFieldComponent } from "../item-page-specific-field.comp
|
||||
export class ItemPageAuthorFieldComponent extends ItemPageSpecificFieldComponent implements OnInit {
|
||||
|
||||
@Input() item: Item;
|
||||
separator : string;
|
||||
|
||||
fields : string[] = [
|
||||
"dc.contributor.author",
|
||||
@@ -16,6 +17,5 @@ export class ItemPageAuthorFieldComponent extends ItemPageSpecificFieldComponent
|
||||
"dc.contributor"
|
||||
];
|
||||
label : string = "item.page.author";
|
||||
separator : string = ",";
|
||||
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ import { ItemPageSpecificFieldComponent } from "../item-page-specific-field.comp
|
||||
export class ItemPageDateFieldComponent extends ItemPageSpecificFieldComponent implements OnInit {
|
||||
|
||||
@Input() item: Item;
|
||||
separator : string;
|
||||
separator : string = ", ";
|
||||
|
||||
fields : string[] = [
|
||||
"dc.date.issued"
|
||||
|
Reference in New Issue
Block a user