Skip to content

Commit

Permalink
Add Chicago Links
Browse files Browse the repository at this point in the history
  • Loading branch information
ejimsan committed Jul 14, 2024
1 parent 5e4972d commit 9e93705
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 66 deletions.
1 change: 1 addition & 0 deletions src/fragmentarium/domain/Fragment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ const config: Parameters<typeof Fragment['create']>[0] = {
bmIdNumber: 'W_1848-0720-117',
archibabNumber: '42',
bdtnsNumber: '99',
chicagoIsacNumber: 'd0be123f-2411-4dcd-b930-74d2eb9f19a4',
urOnlineNumber: '123',
hilprechtJenaNumber: '123',
hilprechtHeidelbergNumber: '123',
Expand Down
1 change: 1 addition & 0 deletions src/fragmentarium/domain/FragmentDtos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const ExternalNumberTypes = [
'bmIdNumber',
'archibabNumber',
'bdtnsNumber',
'chicagoIsacNumber',
'urOnlineNumber',
'hilprechtJenaNumber',
'hilprechtHeidelbergNumber',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ exports[`Snapshot 1`] = `
</p>
<p>
Excavation no.:
ucotes.1
ed.1
</p>
<p>
Provenance:
Eridu
Dugirdkhan
</p>
</small>
</div>
Expand Down Expand Up @@ -5851,27 +5851,27 @@ exports[`Snapshot 1`] = `
class="fragment-result__fragment-number"
>
<a
href="/fragmentarium/ke.2"
href="/fragmentarium/etkoclo.2"
>
ke.2
etkoclo.2
</a>
(Ur3)
(JN)
</h4>
<div
class="fragment-result__archaeology-info"
>
<small>
<p>
Accession no.:
wugutkoc.2
baj.2
</p>
<p>
Excavation no.:
jozi.2
jil.2
</p>
<p>
Provenance:
Qatara
Tall Imlīḥiyah
</p>
</small>
</div>
Expand All @@ -5883,11 +5883,6 @@ exports[`Snapshot 1`] = `
class="text-secondary fragment-result__genre col-sm-4 col-12"
>
<ul>
<ul>
<small>
ARCHIVE ➝ Administrative ➝ Lists
</small>
</ul>
<ul>
<small>
Other ➝ Fake ➝ Certain
Expand All @@ -5904,17 +5899,7 @@ exports[`Snapshot 1`] = `
<li
class="Record__entry"
>
Romolini
(
Transliteration
,
<time
datetime="2108-01-21"
>
21/1/2108
</time>
)
No record
</li>
</ol>
</div>
Expand Down Expand Up @@ -5959,9 +5944,9 @@ exports[`Snapshot 1`] = `
<span
class="reference-popover__citation"
>
Garrido & Tinti, 2055: 5928983864541184-7552106621829120
Checcucci & Tomlinson, 2026: 4727451873705984-8024100712742912
[
l. 4'.2., 1.
l. 3'., 1.
]
<span
class="type-abbreviation"
Expand All @@ -5978,9 +5963,9 @@ exports[`Snapshot 1`] = `
<span
class="reference-popover__citation"
>
Dong & Ducci, 2026: 3794580308754432-4010327748378624
Chirici & Borchi, 2066: 1964069523292160-4777479967342592
[
l. 3'., 4'.2.
l. 4'.2., 2.
]
<span
class="type-abbreviation"
Expand Down Expand Up @@ -11668,7 +11653,27 @@ exports[`Snapshot 1`] = `
</div>
<div
class="fragment-result__preview col-sm-4 col-12"
/>
>
<div
class="fade alert alert-danger show"
role="alert"
>
<h4>
Something's gone wrong.
</h4>
<p>
Our team has been notified, but you can fill out a report by clicking the button below.
</p>
<p>
<button
class="btn btn-danger"
type="button"
>
Send a report
</button>
</p>
</div>
</div>
</div>
<hr />
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/fragmentarium/ui/info/ExternalNumberLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ export function BdtnsLink({ number }: { number: string }): JSX.Element {
/>
)
}
export function ChicagoIsacLink({ number }: { number: string }): JSX.Element {
return (
<ExternalNumberLink
number={number}
baseUrl={'https://isac-idb.uchicago.edu/id/'}
label={'Chicago ISAC'}
/>
)
}
export function ArchibabLink({ number }: { number: string }): JSX.Element {
return (
<ExternalNumberLink
Expand Down
4 changes: 4 additions & 0 deletions src/fragmentarium/ui/info/ExternalResources.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Fragment } from 'fragmentarium/domain/fragment'
const cdliNumber = 'P 0000+q'
const bmIdNumber = 'bm 00000+q'
const bdtnsNumber = 'bdtns123'
const chicagoIsacNumber = 'd0be123f-2411-4dcd-b930-74d2eb9f19a4'
const archibabNumber = 'A38'
const urOnlineNumber = 'U5'
const hilprechtJenaNumber = 'H42'
Expand All @@ -34,6 +35,7 @@ describe('external resources', () => {
cdliNumber,
bmIdNumber,
bdtnsNumber,
chicagoIsacNumber,
archibabNumber,
urOnlineNumber,
hilprechtJenaNumber,
Expand Down Expand Up @@ -61,6 +63,7 @@ describe('external resources', () => {
bmIdNumber,
],
['BDTNS', 'http://bdtns.filol.csic.es/', bdtnsNumber],
['Chicago ISAC', 'https://isac-idb.uchicago.edu/id/', chicagoIsacNumber],
['Archibab', 'http://www.archibab.fr/', archibabNumber],
['Ur Online', 'http://www.ur-online.org/subject/', urOnlineNumber],
[
Expand Down Expand Up @@ -135,6 +138,7 @@ describe('missing external resources', () => {
'CDLI',
'The British Museum',
'BDTNS',
'Chicago ISAC',
'Archibab',
'Ur Online',
'Hilprecht Collection',
Expand Down
2 changes: 2 additions & 0 deletions src/fragmentarium/ui/info/ExternalResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import './ExternalResources.sass'
import {
BdtnsLink,
CdliLink,
ChicagoIsacLink,
ArchibabLink,
UrOnlineLink,
HilprechtJenaLink,
Expand Down Expand Up @@ -41,6 +42,7 @@ export default function ExternalResources({
[fragment.getExternalNumber('bmIdNumber'), BmIdLink],
[fragment.getExternalNumber('cdliNumber'), CdliLink],
[fragment.getExternalNumber('bdtnsNumber'), BdtnsLink],
[fragment.getExternalNumber('chicagoIsacNumber'), ChicagoIsacLink],
[fragment.getExternalNumber('archibabNumber'), ArchibabLink],
[fragment.getExternalNumber('urOnlineNumber'), UrOnlineLink],
[fragment.getExternalNumber('hilprechtJenaNumber'), HilprechtJenaLink],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ exports[`external resources Snapshot 1`] = `
</a>
)
</li>
<li>
Chicago ISAC (
<a
aria-label="Chicago ISAC text d0be123f-2411-4dcd-b930-74d2eb9f19a4"
href="https://isac-idb.uchicago.edu/id/d0be123f-2411-4dcd-b930-74d2eb9f19a4"
rel="noopener noreferrer"
target="_blank"
>
d0be123f-2411-4dcd-b930-74d2eb9f19a4
</a>
)
</li>
<li>
Archibab (
<a
Expand Down
Loading

0 comments on commit 9e93705

Please sign in to comment.