mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
Changes based on review feedback
This commit is contained in:
@@ -8,11 +8,12 @@
|
||||
ds-view-mode-switch {
|
||||
margin-bottom: $spacer;
|
||||
}
|
||||
ds-search-switch-configuration {
|
||||
margin-bottom: 2*$spacer !important;
|
||||
}
|
||||
.sidebar-content > *:not(:last-child) {
|
||||
.sidebar-content > *:not(:last-child):not(ds-search-switch-configuration) {
|
||||
margin-bottom: 4*$spacer;
|
||||
display: block;
|
||||
}
|
||||
ds-search-switch-configuration {
|
||||
margin-bottom: 2*$spacer;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
@@ -162,8 +162,6 @@ export abstract class BaseResponseParsingService {
|
||||
}
|
||||
|
||||
protected isSuccessStatus(statusCode: number) {
|
||||
return (statusCode === 201
|
||||
|| statusCode === 200
|
||||
|| statusCode === 204)
|
||||
return statusCode >= 200 && statusCode < 300;
|
||||
}
|
||||
}
|
||||
|
@@ -117,7 +117,7 @@ describe('TasksService', () => {
|
||||
|
||||
describe('deleteById', () => {
|
||||
|
||||
it('should configure a new TaskPostRequest', () => {
|
||||
it('should configure a new TaskDeleteRequest', () => {
|
||||
const scopeId = '1234';
|
||||
const expected = new TaskDeleteRequest(requestService.generateRequestId(), `${taskEndpoint}/${linkPath}/${scopeId}`, null);
|
||||
scheduler.schedule(() => service.deleteById('testTask', scopeId).subscribe());
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<div class="mt-2 mb-2">
|
||||
<span class="text-muted">{{'submission.workflow.tasks.generic.submitter' | translate}} : <span class="badge badge-pill badge-light">{{(submitter$ | async)?.name}}</span></span>
|
||||
<span class="text-muted">{{'submission.workflow.tasks.generic.submitter' | translate}} : <span class="badge badge-light">{{(submitter$ | async)?.name}}</span></span>
|
||||
</div>
|
||||
|
@@ -6,23 +6,4 @@ ds-wrapper-detail-element ::ng-deep {
|
||||
height: $card-thumbnail-height;
|
||||
width: 100%;
|
||||
}
|
||||
.card-title {
|
||||
line-height: $headings-line-height;
|
||||
height: ($headings-line-height*3) +em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.item-abstract {
|
||||
line-height: $line-height-base;
|
||||
height: ($line-height-base*5)+em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.item-authors{
|
||||
line-height: $line-height-base;
|
||||
height: ($line-height-base*1.5)+em;
|
||||
}
|
||||
div.card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
@@ -3,17 +3,17 @@
|
||||
<ds-mydspace-item-status [status]="status"></ds-mydspace-item-status>
|
||||
</ng-container>
|
||||
<ds-truncatable [id]="item.id">
|
||||
<h3 class="h3-title" [innerHTML]="firstMetadataValue('dc.title') || ('mydspace.results.no-title' | translate)" [ngClass]="{'lead': true,'text-muted': !firstMetadataValue('dc.title')}"></h3>
|
||||
<h3 class="h3-title" [innerHTML]="item.firstMetadataValue('dc.title') || ('mydspace.results.no-title' | translate)" [ngClass]="{'lead': true,'text-muted': !item.firstMetadataValue('dc.title')}"></h3>
|
||||
<div>
|
||||
<span class="text-muted">
|
||||
<ds-truncatable-part [id]="item.id" [minLines]="1">
|
||||
(<span *ngIf="item.hasMetadata('dc.publisher')" class="item-list-publisher"
|
||||
[innerHTML]="firstMetadataValue('dc.publisher') + ', '"></span>
|
||||
<span class="item-list-date" [innerHTML]="firstMetadataValue('dc.date.issued') || ('mydspace.results.no-date' | translate)"></span>)
|
||||
[innerHTML]="item.firstMetadataValue('dc.publisher') + ', '"></span>
|
||||
<span class="item-list-date" [innerHTML]="item.firstMetadataValue('dc.date.issued') || ('mydspace.results.no-date' | translate)"></span>)
|
||||
<span *ngIf="item.hasMetadata(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']);"
|
||||
class="item-list-authors">
|
||||
<span *ngIf="allMetadataValues(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']).length === 0">{{'mydspace.results.no-authors' | translate}}</span>
|
||||
<span *ngFor="let author of allMetadataValues(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']); let last=last;">
|
||||
<span *ngIf="item.allMetadataValues(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']).length === 0">{{'mydspace.results.no-authors' | translate}}</span>
|
||||
<span *ngFor="let author of item.allMetadataValues(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']); let last=last;">
|
||||
<span [innerHTML]="author"><span [innerHTML]="author"></span></span>
|
||||
</span>
|
||||
</span>
|
||||
@@ -22,8 +22,8 @@
|
||||
</span>
|
||||
|
||||
<ds-truncatable-part [id]="item.id" [minLines]="1" class="item-list-abstract">
|
||||
<span [ngClass]="{'text-muted': !firstMetadataValue('dc.description.abstract')}"
|
||||
[innerHTML]="(firstMetadataValue('dc.description.abstract')) || ('mydspace.results.no-abstract' | translate)"></span>
|
||||
<span [ngClass]="{'text-muted': !item.firstMetadataValue('dc.description.abstract')}"
|
||||
[innerHTML]="(item.firstMetadataValue('dc.description.abstract')) || ('mydspace.results.no-abstract' | translate)"></span>
|
||||
</ds-truncatable-part>
|
||||
|
||||
</div>
|
||||
|
@@ -3,7 +3,6 @@ import { Component, Input } from '@angular/core';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { fadeInOut } from '../../../animations/fade';
|
||||
import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type';
|
||||
import { Metadata } from '../../../../core/shared/metadata.utils';
|
||||
import { MyDSpaceResult } from '../../../../+my-dspace-page/my-dspace-result.model';
|
||||
|
||||
/**
|
||||
@@ -37,24 +36,4 @@ export class ItemListPreviewComponent {
|
||||
*/
|
||||
@Input() showSubmitter = false;
|
||||
|
||||
/**
|
||||
* Gets all matching metadata string values from hitHighlights or dso metadata, preferring hitHighlights.
|
||||
*
|
||||
* @param {string|string[]} keyOrKeys The metadata key(s) in scope. Wildcards are supported; see [[Metadata]].
|
||||
* @returns {string[]} the matching string values or an empty array.
|
||||
*/
|
||||
allMetadataValues(keyOrKeys: string | string[]): string[] {
|
||||
return Metadata.allValues([this.object.hitHighlights, this.item.metadata], keyOrKeys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the first matching metadata string value from hitHighlights or dso metadata, preferring hitHighlights.
|
||||
*
|
||||
* @param {string|string[]} keyOrKeys The metadata key(s) in scope. Wildcards are supported; see [[Metadata]].
|
||||
* @returns {string} the first matching string value, or `undefined`.
|
||||
*/
|
||||
firstMetadataValue(keyOrKeys: string | string[]): string {
|
||||
return Metadata.firstValue([this.object.hitHighlights, this.item.metadata], keyOrKeys);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user