diff --git a/CHANGELOG.md b/CHANGELOG.md
index e72e110f..477be20c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## [Prerelease]
- Update license link for editions, works, and collections to copyright
+- Update License page to Copyright and add section for "In Copyright" explanation
## [0.18.3]
diff --git a/playwright/support/mappings.ts b/playwright/support/mappings.ts
index 6bc5af40..4e20ea76 100644
--- a/playwright/support/mappings.ts
+++ b/playwright/support/mappings.ts
@@ -27,8 +27,8 @@ export const pages: { [name: string]: Pages } = {
about: {
route: "/about",
},
- license: {
- route: "/license",
+ copyright: {
+ route: "/copyright",
},
"read online": {
route: "/read/4440666",
@@ -117,7 +117,7 @@ export const elements = {
"item featured edition year": "a:has-text('Edition') >> nth=0",
"item featured edition publisher": "div:text('Published by') >> nth=0",
"item featured edition language": "div:text('Languages') >> nth=0",
- "item featured edition license": "[href='/license'] >> nth=0",
+ "item featured edition license": "[href='/copyright'] >> nth=0",
"item details heading": "#details-list-heading",
"item details authors heading": "dt:text('Authors')",
"item details authors": "dd > a[href*='display=author'] >> nth=0",
diff --git a/src/__tests__/Search.test.tsx b/src/__tests__/Search.test.tsx
index 1664aaef..8bd0c899 100644
--- a/src/__tests__/Search.test.tsx
+++ b/src/__tests__/Search.test.tsx
@@ -367,7 +367,7 @@ describe("Renders Search Results Page", () => {
test("Shows license with links", () => {
expect(
screen.getByText("Copyright: Public Domain").closest("a").href
- ).toContain("/license");
+ ).toContain("/copyright");
});
test("Shows cover", () => {
expect(
@@ -416,7 +416,7 @@ describe("Renders Search Results Page", () => {
test("Shows Unknown license with links", () => {
expect(
screen.getByText("Copyright: Unknown").closest("a").href
- ).toContain("/license");
+ ).toContain("/copyright");
});
test("Shows Placeholder cover", () => {
expect(
@@ -486,7 +486,7 @@ describe("Renders Search Results Page", () => {
"Copyright: Public Domain Public Domain Public Domain Public Domain Public Domain Public Domain Public Domain Public Domain Public Domain"
)
.closest("a").href
- ).toContain("/license");
+ ).toContain("/copyright");
});
test("Shows cover", () => {
expect(
diff --git a/src/components/About/About.tsx b/src/components/About/About.tsx
index ce8d51b8..267953de 100644
--- a/src/components/About/About.tsx
+++ b/src/components/About/About.tsx
@@ -39,10 +39,10 @@ const About: React.FC = () => {
All the materials in Digital Research Books Beta are completely free to
read and most of them you can download and keep, with no library card
required. The books are either in the{" "}
- public domain, with no restrictions on your
+ public domain, with no restrictions on your
use of them, or under{" "}
- Creative Commons licences that may have some
- conditions, but only on redistribution or adaptation.
+ Creative Commons licences that may have
+ some conditions, but only on redistribution or adaptation.
Works in the public domain have no copyright (in most cases because the
@@ -159,6 +159,13 @@ const License: React.FC = () => {
, you may copy, distribute and modify the work as long as any
modifications are also made available under the GPL.
+ In Copyright
+
+ Works that are In Copyright are protected by copyright and/or related
+ rights. You are free to use this Item in any way that is permitted by
+ the copyright and related rights legislation that applies to your use.
+ For other uses you need to obtain permission from the rights-holder(s).
+
, you may copy, distribute and modify the work as long as any modifications are also made available under the GPL.
+
+ In Copyright
+
+
+ Works that are In Copyright are protected by copyright and/or related rights. You are free to use this Item in any way that is permitted by the copyright and related rights legislation that applies to your use. For other uses you need to obtain permission from the rights-holder(s).
+
diff --git a/src/components/EditionCard/CopyrightLink.tsx b/src/components/EditionCard/CopyrightLink.tsx
new file mode 100644
index 00000000..e26a85d9
--- /dev/null
+++ b/src/components/EditionCard/CopyrightLink.tsx
@@ -0,0 +1,15 @@
+import React from "react";
+import { Rights } from "~/src/types/DataModel";
+import Link from "~/src/components/Link/Link";
+
+const CopyrightLink: React.FC<{ rights: Rights[] }> = ({ rights }) => {
+ return (
+
+ {rights && rights.length > 0
+ ? `Copyright: ${rights[0].rightsStatement}`
+ : "Copyright: Unknown"}
+
+ );
+};
+
+export default CopyrightLink;
diff --git a/src/components/EditionCard/EditionCard.test.tsx b/src/components/EditionCard/EditionCard.test.tsx
index f50b9644..7056aeb4 100644
--- a/src/components/EditionCard/EditionCard.test.tsx
+++ b/src/components/EditionCard/EditionCard.test.tsx
@@ -37,7 +37,7 @@ describe("Edition Card with Valid Data", () => {
test("Shows license with links", () => {
expect(
screen.getByText("Copyright: test rights statement").closest("a").href
- ).toContain("/license");
+ ).toContain("/copyright");
});
test("Shows cover", () => {
expect(
@@ -80,7 +80,7 @@ describe("Edition Year with Minimal Data", () => {
});
test("Shows Unknown license with links", () => {
expect(screen.getByText("Copyright: Unknown").closest("a").href).toContain(
- "/license"
+ "/copyright"
);
});
test("Shows Placeholder cover", () => {
diff --git a/src/components/EditionCard/EditionCard.tsx b/src/components/EditionCard/EditionCard.tsx
index a5143e24..7e1f45c6 100644
--- a/src/components/EditionCard/EditionCard.tsx
+++ b/src/components/EditionCard/EditionCard.tsx
@@ -19,6 +19,7 @@ import FeaturedEditionBadge from "./FeaturedEditionBadge";
import PhysicalEditionBadge from "./PhysicalEditionBadge";
import ScanAndDeliverBlurb from "./ScanAndDeliverBlurb";
import UpBlurb from "./UpBlurb";
+import CopyrightLink from "./CopyrightLink";
export const EditionCard: React.FC<{
edition: WorkEdition;
@@ -114,9 +115,7 @@ export const EditionCard: React.FC<{
publishers={edition.publishers}
/>
-
- {EditionCardUtils.getLicense(previewItem)}
-
+
{isPhysicalEdition && }
{isUniversityPress && }
diff --git a/src/components/EditionDetail/Edition.test.tsx b/src/components/EditionDetail/Edition.test.tsx
index 07800aa9..9eda8ba1 100644
--- a/src/components/EditionDetail/Edition.test.tsx
+++ b/src/components/EditionDetail/Edition.test.tsx
@@ -75,7 +75,7 @@ describe("Renders edition component when given valid edition", () => {
screen
.getAllByText("Copyright: Public Domain when viewed in the US")[0]
.closest("a").href
- ).toContain("/license");
+ ).toContain("/copyright");
});
test("Featured Card, which has publisher 'Miller', shows up once", () => {
diff --git a/src/components/InstanceCard/InstanceCard.test.tsx b/src/components/InstanceCard/InstanceCard.test.tsx
index 18d1bbae..bdac6220 100644
--- a/src/components/InstanceCard/InstanceCard.test.tsx
+++ b/src/components/InstanceCard/InstanceCard.test.tsx
@@ -41,7 +41,7 @@ describe("Instance Card with Valid Data", () => {
test("shows license", () => {
expect(
screen.getByText("Copyright: test rights statement").closest("a").href
- ).toContain("/license");
+ ).toContain("/copyright");
});
});
@@ -75,7 +75,7 @@ describe("Instance Card with Minmal Data", () => {
});
test("shows license", () => {
expect(screen.getByText("Copyright: Unknown").closest("a").href).toContain(
- "/license"
+ "/copyright"
);
});
});
diff --git a/src/components/InstanceCard/InstanceCard.tsx b/src/components/InstanceCard/InstanceCard.tsx
index 2a7a52ba..d26f9cb6 100644
--- a/src/components/InstanceCard/InstanceCard.tsx
+++ b/src/components/InstanceCard/InstanceCard.tsx
@@ -10,7 +10,6 @@ import {
Flex,
} from "@nypl/design-system-react-components";
import EditionCardUtils from "~/src/util/EditionCardUtils";
-import Link from "../Link/Link";
import Ctas from "../EditionCard/Ctas";
import PublisherAndLocation from "../EditionCard/PublisherAndLocation";
import WorldCat from "./WorldCat";
@@ -19,6 +18,7 @@ import FeaturedEditionBadge from "../EditionCard/FeaturedEditionBadge";
import PhysicalEditionBadge from "../EditionCard/PhysicalEditionBadge";
import ScanAndDeliverBlurb from "../EditionCard/ScanAndDeliverBlurb";
import UpBlurb from "../EditionCard/UpBlurb";
+import CopyrightLink from "../EditionCard/CopyrightLink";
// Creates an Instance card out of the Edition Year and Instance object
// Note: Edition Year only needs to be passed because `instance.publication_date`
@@ -94,7 +94,7 @@ export const InstanceCard: React.FC<{
/>
- {EditionCardUtils.getLicense(previewItem)}
+
{isPhysicalEdition && }
{isUniversityPress && }
diff --git a/src/components/License/License.test.tsx b/src/components/License/License.test.tsx
deleted file mode 100644
index 10f21189..00000000
--- a/src/components/License/License.test.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import React from "react";
-import { render } from "~/src/__tests__/testUtils/render";
-import License from "./License";
-
-it("renders License page unchanged", async () => {
- const tree = render();
- expect(tree.container.firstChild).toMatchSnapshot();
-});
diff --git a/src/components/Work/Work.test.tsx b/src/components/Work/Work.test.tsx
index 02eaba07..abb00858 100644
--- a/src/components/Work/Work.test.tsx
+++ b/src/components/Work/Work.test.tsx
@@ -77,7 +77,7 @@ describe("Renders Work component when given valid work", () => {
expect(screen.getAllByText("Languages: English, German").length).toBe(1);
expect(
screen.getAllByText("Copyright: Unknown")[0].closest("a").href
- ).toContain("/license");
+ ).toContain("/copyright");
});
test("Shows Details Table", () => {
expect(
diff --git a/src/constants/analytics.ts b/src/constants/analytics.ts
index 68feb1d5..d787b3e4 100644
--- a/src/constants/analytics.ts
+++ b/src/constants/analytics.ts
@@ -3,7 +3,7 @@ export const SITE_SECTION = "Digital Research Books";
export const pageNames = {
home: "drb|home",
about: "drb|about",
- license: "drb|license",
+ copyright: "drb|copyright",
advancedSearch: "drb|advanced-search",
search: "drb|search|?",
workItem: "drb|work|",
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index 7c5385bd..f01ee5c7 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -66,8 +66,8 @@ const sendAnalytics = (query: any, pathname: string) => {
trackPageview(pageNames.advancedSearch);
} else if (pathname === "/about") {
trackPageview(pageNames.about);
- } else if (pathname === "/license") {
- trackPageview(pageNames.license);
+ } else if (pathname === "/copyright") {
+ trackPageview(pageNames.copyright);
} else {
trackPageview(pageNames.home);
}
diff --git a/src/pages/copyright.tsx b/src/pages/copyright.tsx
new file mode 100644
index 00000000..873c0956
--- /dev/null
+++ b/src/pages/copyright.tsx
@@ -0,0 +1,12 @@
+import React from "react";
+import Copyright from "~/src/components/Copyright/Copyright";
+import Layout from "~/src/components/Layout/Layout";
+
+const CopyrightPage: React.FC = () => {
+ return (
+
+
+
+ );
+};
+export default CopyrightPage;
diff --git a/src/pages/license.tsx b/src/pages/license.tsx
deleted file mode 100644
index 2664efda..00000000
--- a/src/pages/license.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import React from "react";
-import License from "~/src/components/License/License";
-import Layout from "~/src/components/Layout/Layout";
-
-const LicensePage: React.FC = () => {
- return (
-
-
-
- );
-};
-export default LicensePage;