mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-5270] Fixes requested as improvements
This commit is contained in:
@@ -2,7 +2,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<p class="m-1">
|
<p class="m-1">
|
||||||
{{'submission.sections.sherpa.publisher.policy.openaccess' | translate}}
|
<ds-alert [type]="AlertTypeEnum.Info"
|
||||||
|
[content]="'submission.sections.sherpa.publisher.policy.openaccess'| translate">
|
||||||
|
</ds-alert>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
|
|
||||||
import { Policy } from '../../../../core/submission/models/sherpa-policies-details.model';
|
import { Policy } from '../../../../core/submission/models/sherpa-policies-details.model';
|
||||||
|
import { AlertType } from './../../../../shared/alert/aletr-type';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This component represents a section that contains the publisher policy informations.
|
* This component represents a section that contains the publisher policy informations.
|
||||||
@@ -17,4 +18,11 @@ export class PublisherPolicyComponent {
|
|||||||
*/
|
*/
|
||||||
@Input() policy: Policy;
|
@Input() policy: Policy;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The AlertType enumeration
|
||||||
|
* @type {AlertType}
|
||||||
|
*/
|
||||||
|
public AlertTypeEnum = AlertType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-container *ngVar="(sherpaPoliciesData$ | async)?.sherpaResponse as sherpaData">
|
<ng-container *ngVar="(sherpaPoliciesData$ | async)?.sherpaResponse as sherpaData">
|
||||||
<ng-container *ngIf="!hasNoData()">
|
<ng-container *ngIf="!hasNoData() && !sherpaData.error">
|
||||||
<ng-container *ngFor="let journal of sherpaData.journals;let j=index;">
|
<ng-container *ngFor="let journal of sherpaData.journals;let j=index;">
|
||||||
<div class="mb-3 border-bottom" data-test="collapse">
|
<div class="mb-3 border-bottom" data-test="collapse">
|
||||||
<div class="w-100 d-flex justify-content-between collapse-toggle" (click)="collapse.toggle()">
|
<div class="w-100 d-flex justify-content-between collapse-toggle" (click)="collapse.toggle()">
|
||||||
@@ -59,4 +59,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container *ngIf="sherpaData.error">
|
||||||
|
<ds-alert [type]="AlertTypeEnum.Error"
|
||||||
|
[content]="!!sherpaData.message ? sherpaData.message : 'submission.sections.sherpa.error.message'| translate">
|
||||||
|
</ds-alert>
|
||||||
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
@@ -1,3 +1,4 @@
|
|||||||
|
import { AlertType } from './../../../shared/alert/aletr-type';
|
||||||
import { Component, Inject, QueryList, ViewChildren } from '@angular/core';
|
import { Component, Inject, QueryList, ViewChildren } from '@angular/core';
|
||||||
|
|
||||||
import { BehaviorSubject, interval, Observable, of, Subscription } from 'rxjs';
|
import { BehaviorSubject, interval, Observable, of, Subscription } from 'rxjs';
|
||||||
@@ -49,6 +50,13 @@ export class SubmissionSectionSherpaPoliciesComponent extends SectionModelCompon
|
|||||||
*/
|
*/
|
||||||
public isCollapsed = false;
|
public isCollapsed = false;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The AlertType enumeration
|
||||||
|
* @type {AlertType}
|
||||||
|
*/
|
||||||
|
public AlertTypeEnum = AlertType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize instance variables
|
* Initialize instance variables
|
||||||
*
|
*
|
||||||
@@ -71,6 +79,7 @@ export class SubmissionSectionSherpaPoliciesComponent extends SectionModelCompon
|
|||||||
* Unsubscribe from all subscriptions
|
* Unsubscribe from all subscriptions
|
||||||
*/
|
*/
|
||||||
onSectionDestroy() {
|
onSectionDestroy() {
|
||||||
|
|
||||||
this.subs
|
this.subs
|
||||||
.filter((subscription) => hasValue(subscription))
|
.filter((subscription) => hasValue(subscription))
|
||||||
.forEach((subscription) => subscription.unsubscribe());
|
.forEach((subscription) => subscription.unsubscribe());
|
||||||
@@ -81,7 +90,6 @@ export class SubmissionSectionSherpaPoliciesComponent extends SectionModelCompon
|
|||||||
* Initialize all instance variables and retrieve collection default access conditions
|
* Initialize all instance variables and retrieve collection default access conditions
|
||||||
*/
|
*/
|
||||||
protected onSectionInit(): void {
|
protected onSectionInit(): void {
|
||||||
|
|
||||||
this.pathCombiner = new JsonPatchOperationPathCombiner('sections', this.sectionData.id);
|
this.pathCombiner = new JsonPatchOperationPathCombiner('sections', this.sectionData.id);
|
||||||
this.subs.push(
|
this.subs.push(
|
||||||
this.sectionService.getSectionData(this.submissionId, this.sectionData.id, this.sectionData.sectionType)
|
this.sectionService.getSectionData(this.submissionId, this.sectionData.id, this.sectionData.sectionType)
|
||||||
|
@@ -4046,6 +4046,8 @@
|
|||||||
|
|
||||||
"submission.sections.sherpa.record.information.uri": "URI",
|
"submission.sections.sherpa.record.information.uri": "URI",
|
||||||
|
|
||||||
|
"submission.sections.sherpa.error.message": "There was an error retrieving sherpa informations",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"submission.submit.breadcrumbs": "New submission",
|
"submission.submit.breadcrumbs": "New submission",
|
||||||
|
Reference in New Issue
Block a user