Skip to content

Commit

Permalink
Merge pull request IQSS#90 from janvanmansum/multi-license
Browse files Browse the repository at this point in the history
DD-511 Open links to license in new tab
  • Loading branch information
janvanmansum authored Jun 18, 2021
2 parents 58b623e + 5b68e53 commit a980c5e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@

ALTER TABLE termsofuseandaccess ADD COLUMN IF NOT EXISTS license_id BIGINT;

ALTER TABLE termsofuseandaccess ADD CONSTRAINT fk_termsofuseandcesss_license_id foreign key (license_id) REFERENCES license(id);
DO $$
BEGIN

BEGIN
ALTER TABLE termsofuseandaccess ADD CONSTRAINT fk_termsofuseandcesss_license_id foreign key (license_id) REFERENCES license(id);
EXCEPTION
WHEN duplicate_object THEN RAISE NOTICE 'Table constraint fk_termsofuseandcesss_license_id already exists';
END;

END $$;
4 changes: 2 additions & 2 deletions src/main/webapp/dataset-license-terms.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@
<ui:fragment rendered="#{!empty termsOfUseAndAccess.license and empty DatasetPage.licenseId and empty editMode}">
<p>
<img src="#{termsOfUseAndAccess.license.iconUrl}" alt="#{bundle['file.icon.alttxt']}" width="15%" height="15%"/>
<a href="#{termsOfUseAndAccess.license.uri}">#{termsOfUseAndAccess.license.name}</a>
<a href="#{termsOfUseAndAccess.license.uri}" target="_blank">#{termsOfUseAndAccess.license.name}</a>
</p>
</ui:fragment>
<ui:fragment rendered="#{!empty DatasetPage.licenseId}">
<p >
<img src="#{DatasetPage.getSelectedLicenseById().iconUrl}" alt="#{bundle['file.icon.alttxt']}" width="15%" height="15%"/>
<a href="#{DatasetPage.getSelectedLicenseById().uri}">#{DatasetPage.getSelectedLicenseById().name}</a>
<a href="#{DatasetPage.getSelectedLicenseById().uri}" target="_blank">#{DatasetPage.getSelectedLicenseById().name}</a>
</p>
</ui:fragment>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/dataset.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@
<ui:fragment rendered="#{!empty DatasetPage.workingVersion.termsOfUseAndAccess.license}">
<p>
<img src="#{DatasetPage.workingVersion.termsOfUseAndAccess.license.iconUrl}" alt="#{bundle['file.icon.alttxt']}" width="15%" height="15%"/>
<a href="#{DatasetPage.workingVersion.termsOfUseAndAccess.license.uri}">#{DatasetPage.workingVersion.termsOfUseAndAccess.license.name}</a>
<a href="#{DatasetPage.workingVersion.termsOfUseAndAccess.license.uri}" target="_blank">#{DatasetPage.workingVersion.termsOfUseAndAccess.license.name}</a>
</p>
</ui:fragment>
<ui:fragment rendered="#{empty DatasetPage.workingVersion.termsOfUseAndAccess.license}">
Expand Down Expand Up @@ -1624,7 +1624,7 @@
<ui:fragment rendered="#{!empty DatasetPage.workingVersion.termsOfUseAndAccess.license}">
<p>
<img src="#{DatasetPage.workingVersion.termsOfUseAndAccess.license.iconUrl}" alt="#{bundle['file.icon.alttxt']}" width="15%" height="15%"/>
<a href="#{DatasetPage.workingVersion.termsOfUseAndAccess.license.uri}">#{DatasetPage.workingVersion.termsOfUseAndAccess.license.name}</a>
<a href="#{DatasetPage.workingVersion.termsOfUseAndAccess.license.uri}" target="_blank">#{DatasetPage.workingVersion.termsOfUseAndAccess.license.name}</a>
</p>
</ui:fragment>
</div>
Expand Down

0 comments on commit a980c5e

Please sign in to comment.