Commit 0eb09400 authored by Florent Poittevin's avatar Florent Poittevin Committed by David.Gold1
Browse files

feat: [DLCM-1931] integrate oai link into footer

parent d8ece877
......@@ -47,6 +47,15 @@
mat-menu-item
>{{'toc.section.tools' | translate}}
</button>
<button [disabled]="oaiPmhProvider | isNullOrUndefined"
(click)="navigateTo(oaiPmhProvider)"
mat-menu-item
>OAI PMH Provider
<solidify-icon class="icon-right"
[iconName]="iconNameEnum.externalLink"
></solidify-icon>
</button>
</mat-menu>
<mat-menu #integrationGuideMenu="matMenu"
......
......@@ -16,6 +16,11 @@
padding: 0 10px;
margin: 8px 0;
}
.icon-right {
margin-left: 15px;
margin-right: 0;
}
}
.shared-toc-container-panel {
......
......@@ -15,6 +15,7 @@ import {
MatMenu,
MatMenuItem,
} from "@angular/material/menu";
import {environment} from "@environments/environment";
import {SharedAbstractPresentational} from "@shared/components/presentationals/shared-abstract/shared-abstract.presentational";
import {TocHelper} from "@shared/helpers/toc.helper";
import {
......@@ -24,6 +25,7 @@ import {
import {distinctUntilChanged} from "rxjs/operators";
import {
BreakpointService,
isNullOrUndefinedOrWhiteString,
MARK_AS_TRANSLATABLE,
ObservableUtil,
} from "solidify-frontend";
......@@ -50,6 +52,13 @@ export class SharedTocPresentational extends SharedAbstractPresentational implem
@Input()
isLoading: boolean;
get oaiPmhProvider(): string {
if (isNullOrUndefinedOrWhiteString(environment.oaiInfo) || isNullOrUndefinedOrWhiteString(environment.oaiProviderUrlEnd)) {
return undefined;
}
return environment.oaiInfo + environment.oaiProviderUrlEnd;
}
@ViewChild("menu")
readonly menu: MatMenu;
......@@ -104,4 +113,8 @@ export class SharedTocPresentational extends SharedAbstractPresentational implem
openUserGuide(): void {
this._displaySidebarUserGuideChangeBS.next();
}
navigateTo(url: string) {
window.open(url, "_blank");
}
}
......@@ -51,6 +51,7 @@ export interface DlcmEnvironment extends DefaultSolidifyEnvironment {
urlNationalArchivePronom: string;
doiLink: string;
oaiProviderUrlEnd: string;
// Polling
refreshTabStatusCounterIntervalInSecond: number;
......
......@@ -71,6 +71,7 @@ export const defaultEnvironment: DlcmEnvironment = {
urlNationalArchivePronom: "https://www.nationalarchives.gov.uk/PRONOM/",
doiLink: "https://doi.org/",
oaiProviderUrlEnd: "/oai-provider/oai?verb=Identify&smartView=dlcm_oai2.xsl",
// Polling
refreshTabStatusCounterIntervalInSecond: 60,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment