diff --git a/src/app/dialog/dialog-policy/dialog-policy.component.html b/src/app/dialog/dialog-policy/dialog-policy.component.html index af0b47a6..7b0a51a8 100644 --- a/src/app/dialog/dialog-policy/dialog-policy.component.html +++ b/src/app/dialog/dialog-policy/dialog-policy.component.html @@ -1,6 +1,6 @@ - +
{{ 'alert.inaccessible_document_description' | translate }}
@@ -8,7 +8,11 @@ [innerHTML]="(krameriusInfo.data$ | async).rightMsg">
- + +
+ {{ 'alert.inaccessible_document_dnnt_description' | translate }} +
+
diff --git a/src/app/metadata/metadata.component.html b/src/app/metadata/metadata.component.html index 665409d9..3453f533 100644 --- a/src/app/metadata/metadata.component.html +++ b/src/app/metadata/metadata.component.html @@ -63,8 +63,14 @@
- - {{ 'metadata.policy_private' | translate }} () + + + {{ 'metadata.policy_dnnt' | translate }} () + + + + {{ 'metadata.policy_private' | translate }} () +
diff --git a/src/app/metadata/metadata.component.ts b/src/app/metadata/metadata.component.ts index 56d84050..649b9138 100644 --- a/src/app/metadata/metadata.component.ts +++ b/src/app/metadata/metadata.component.ts @@ -48,6 +48,10 @@ export class MetadataComponent implements OnInit { this.modalService.open(DialogPolicyComponent, { type: 'private' } ); } + showPolicyDnntDialog() { + this.modalService.open(DialogPolicyComponent, { type: 'dnnt' } ); + } + showCitation() { this.analytics.sendEvent('metadata', 'citation'); this.modalService.open(DialogCitationComponent, { metadata: this.metadata }); diff --git a/src/app/model/metadata.model.ts b/src/app/model/metadata.model.ts index 47c8491f..d8ed0feb 100644 --- a/src/app/model/metadata.model.ts +++ b/src/app/model/metadata.model.ts @@ -31,6 +31,7 @@ export class Metadata { public volume: Volume; public isPublic = true; + public isDnnt = false; public currentIssue: PeriodicalItem; public nextIssue: PeriodicalItem; @@ -63,9 +64,12 @@ export class Metadata { public assignDocument(item: DocumentItem) { this.isPublic = item.public; + this.isDnnt = item.dnnt; this.model = item.doctype; this.donator = item.donator; this.originUrl = item.originUrl; + console.log('assignDocument item', item); + console.log('assignDocument data', this); } public getOriginUrl() { diff --git a/src/app/services/book.service.ts b/src/app/services/book.service.ts index 8c36243e..9224f13b 100644 --- a/src/app/services/book.service.ts +++ b/src/app/services/book.service.ts @@ -146,9 +146,7 @@ export class BookService { this.isPrivate = !item.public; this.api.getMods(item.root_uuid).subscribe(response => { this.metadata = this.modsParserService.parse(response, item.root_uuid); - this.metadata.isPublic = item.public; - this.metadata.model = item.doctype; - this.metadata.donator = item.donator; + this.metadata.assignDocument(item); this.analytics.sendEvent('viewer', 'open', this.metadata.getShortTitle()); this.pageTitle.setTitle(null, this.metadata.getShortTitle()); if (item.doctype) { diff --git a/src/app/services/utils.service.ts b/src/app/services/utils.service.ts index 755aed7f..25eb8bd9 100644 --- a/src/app/services/utils.service.ts +++ b/src/app/services/utils.service.ts @@ -40,6 +40,7 @@ export class Utils { item.root_uuid = json['root_pid']; item.public = json['policy'] === 'public'; item.doctype = json['model']; + item.dnnt = json['dnnt']; item.date = json['datumstr']; item.authors = json['author']; if (json['replicatedFrom'] && json['replicatedFrom'].length > 0) {