From 81848b065402239a386bcf2be73f6a2d97b8cf3c Mon Sep 17 00:00:00 2001
From: digrazia2038 <digrazia@2038.it>
Date: Tue, 13 Dec 2022 12:30:04 +0100
Subject: [PATCH] Licence compatibility button added

---
 .../pages/data-catalogue/dataset/dataset.component.html    | 7 ++++++-
 src/app/pages/data-catalogue/dataset/dataset.component.ts  | 3 +++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/app/pages/data-catalogue/dataset/dataset.component.html b/src/app/pages/data-catalogue/dataset/dataset.component.html
index b6aa1b6d..87671bc5 100644
--- a/src/app/pages/data-catalogue/dataset/dataset.component.html
+++ b/src/app/pages/data-catalogue/dataset/dataset.component.html
@@ -73,7 +73,12 @@
 
             <span *ngIf="licenses!=undefined && licenses.length>0" class="d-flex flex-column mb-2">
                 <label class="label">Licenses:</label>
-                <p class="truncated" *ngFor="let l of licenses"><a  [href]="l.uri">{{l.name}}</a></p>
+                <p class="truncated" *ngFor="let l of licenses"><a  [href]="l.uri">{{l.name}}</a> &nbsp;&nbsp;
+                    <nb-tag size="small" nbTooltip="JLA - Licences Compatibility Checker" appearance="outline" status="info" (click)="openLicence()"
+                    text="Check Licence Compatibility">
+                </nb-tag>
+                </p>
+                
             </span>
 
             <span *ngIf="dataset.releaseDate!='' && showDate(dataset.releaseDate)" class="d-flex flex-column mb-2">
diff --git a/src/app/pages/data-catalogue/dataset/dataset.component.ts b/src/app/pages/data-catalogue/dataset/dataset.component.ts
index fdf4136e..76920d41 100644
--- a/src/app/pages/data-catalogue/dataset/dataset.component.ts
+++ b/src/app/pages/data-catalogue/dataset/dataset.component.ts
@@ -213,4 +213,7 @@ export class DatasetComponent implements OnInit {
     });
   }
 
+  openLicence() {
+    window.open("https://joinup.ec.europa.eu/collection/eupl/solution/joinup-licensing-assistant/jla-compatibility-checker", "_blank");
+  }
 }
-- 
GitLab