Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mirador Video
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IIIF
Mirador
Mirador Video
Commits
e96d01be
Commit
e96d01be
authored
Jan 30, 2023
by
Anthony
Browse files
Options
Downloads
Patches
Plain Diff
WIP opening manifest Card
parent
6cea9853
No related branches found
No related tags found
2 merge requests
!13
Manifest side to side
,
!11
Draft: 33 8 open an other manifest side by side from an annotation
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/AnnotationManifestsAccordion.js
+36
-40
36 additions, 40 deletions
src/components/AnnotationManifestsAccordion.js
with
36 additions
and
40 deletions
src/components/AnnotationManifestsAccordion.js
+
36
−
40
View file @
e96d01be
...
@@ -6,7 +6,8 @@ import Typography from '@material-ui/core/Typography';
...
@@ -6,7 +6,8 @@ import Typography from '@material-ui/core/Typography';
import
AccordionDetails
from
'
@material-ui/core/AccordionDetails
'
;
import
AccordionDetails
from
'
@material-ui/core/AccordionDetails
'
;
import
PlaylistAddIcon
from
'
@material-ui/icons/PlaylistAdd
'
;
import
PlaylistAddIcon
from
'
@material-ui/icons/PlaylistAdd
'
;
import
PropTypes
from
'
prop-types
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
MiradorMenuButton
}
from
'
./MiradorMenuButton
'
;
import
{
Card
,
CardActionArea
,
CardActions
,
CardContent
,
CardMedia
,
Fab
}
from
'
@material-ui/core
'
;
import
Button
from
'
@material-ui/core/Button
'
;
/**
/**
* AnnotationManifestsAccordion
* AnnotationManifestsAccordion
...
@@ -29,6 +30,7 @@ export class AnnotationManifestsAccordion extends Component {
...
@@ -29,6 +30,7 @@ export class AnnotationManifestsAccordion extends Component {
}
}
/** */
/** */
// eslint-disable-next-line class-methods-use-this,require-jsdoc
handleOpenAccordion
(
e
)
{
handleOpenAccordion
(
e
)
{
e
.
stopPropagation
();
e
.
stopPropagation
();
}
}
...
@@ -46,17 +48,14 @@ export class AnnotationManifestsAccordion extends Component {
...
@@ -46,17 +48,14 @@ export class AnnotationManifestsAccordion extends Component {
);
);
}
}
annotation
.
idIsManifest
=
!!
searchManifest
(
annotation
.
id
);
annotation
.
manifests
=
searchManifest
(
annotation
.
content
.
concat
(
annotation
.
id
));
annotation
.
manifestsInContent
=
searchManifest
(
annotation
.
content
);
if
(
annotation
.
manifests
InContent
===
null
&&
!
annotation
.
idIsManifest
)
{
if
(
annotation
.
manifests
===
null
)
{
return
null
;
return
null
;
}
}
return
(
return
(
(
annotation
.
idIsManifest
||
annotation
.
manifestsInContent
)
&&
(
<
div
>
<
div
>
{
annotation
.
idIsManifest
}
<
Accordion
>
<
Accordion
>
<
AccordionSummary
<
AccordionSummary
expandIcon
=
{
<
ExpandMoreIcon
/>
}
expandIcon
=
{
<
ExpandMoreIcon
/>
}
...
@@ -66,43 +65,40 @@ export class AnnotationManifestsAccordion extends Component {
...
@@ -66,43 +65,40 @@ export class AnnotationManifestsAccordion extends Component {
<
/AccordionSummary
>
<
/AccordionSummary
>
<
AccordionDetails
>
<
AccordionDetails
>
<
Typography
>
<
Typography
>
{
annotation
.
idIsManifest
&&
(
{
annotation
.
manifests
.
map
(
manifestId
=>
(
<
div
className
=
{
classes
.
manifestOpeningWrapper
}
>
<
Card
className
=
{
classes
.
root
}
>
<
div
>
{
annotation
.
id
}
<
/div
>
<
CardActionArea
>
<
MiradorMenuButton
<
CardMedia
aria
-
haspopup
=
"
true
"
component
=
"
img
"
aria
-
label
=
{
t
(
'
openManifestInOtherWindow
'
,
{
manifest
:
annotation
.
id
})}
alt
=
"
Contemplative Reptile
"
titleAccess
=
{
t
(
'
openManifestInOtherWindow
'
,
{
manifest
:
annotation
.
id
})}
height
=
"
140
"
onClick
=
{(
e
)
=>
{
image
=
"
https://www.tetras-libre.fr/themes/tetras/img/logo.svg
"
this
.
handleOpenManifestSideToSide
(
e
,
annotation
.
id
);
title
=
"
Tetras tooltip
"
}}
/>
className
=
{
classes
.
manifestOpeningButton
}
<
CardContent
>
>
<
Typography
gutterBottom
variant
=
"
h5
"
component
=
"
h2
"
>
<
PlaylistAddIcon
/>
Lizard
<
/MiradorMenuButton
>
<
/Typography
>
<
/div
>
<
Typography
variant
=
"
body2
"
color
=
"
textSecondary
"
component
=
"
p
"
>
)}
Lizards
are
a
widespread
group
of
squamate
reptiles
,
with
over
6
,
000
species
,
ranging
{
annotation
.
manifestsInContent
&&
annotation
.
manifestsInContent
.
map
(
manifestId
=>
(
across
all
continents
except
Antarctica
<
div
className
=
{
classes
.
manifestOpeningWrapper
}
>
<
/Typography
>
<
div
>
{
manifestId
}
<
/div
>
<
/CardContent
>
<
MiradorMenuButton
<
/CardActionArea
>
aria
-
haspopup
=
"
true
"
<
CardActions
>
aria
-
label
=
{
t
(
'
openManifestInOtherWindow
'
)}
<
Button
size
=
"
small
"
color
=
"
primary
"
>
titleAccess
=
{
t
(
'
openManifestInOtherWindow
'
)}
Share
onClick
=
{(
e
)
=>
{
<
/Button
>
this
.
handleOpenManifestSideToSide
(
e
,
manifestId
);
<
Button
size
=
"
small
"
color
=
"
primary
"
>
}}
Learn
More
className
=
{
classes
.
manifestOpeningButton
}
<
/Button
>
>
<
/CardActions
>
<
PlaylistAddIcon
/>
<
/Card
>
<
/MiradorMenuButton
>
<
/div
>
))}
))}
<
/Typography
>
<
/Typography
>
<
/AccordionDetails
>
<
/AccordionDetails
>
<
/Accordion
>
<
/Accordion
>
<
/div
>
<
/div
>
)
);
);
}
}
}
}
...
@@ -112,9 +108,9 @@ AnnotationManifestsAccordion.propsTypes = {
...
@@ -112,9 +108,9 @@ AnnotationManifestsAccordion.propsTypes = {
addWindow
:
PropTypes
.
func
.
isRequired
,
addWindow
:
PropTypes
.
func
.
isRequired
,
annotation
:
PropTypes
.
shape
(
annotation
:
PropTypes
.
shape
(
{
{
content
:
PropTypes
.
string
.
isRequired
,
id
:
PropTypes
.
string
.
isRequired
,
id
:
PropTypes
.
string
.
isRequired
,
idIsManifest
:
PropTypes
.
bool
,
manifests
:
PropTypes
.
arrayOf
(
PropTypes
.
string
),
manifestsInContent
:
PropTypes
.
arrayOf
(
PropTypes
.
string
),
},
},
),
),
classes
:
PropTypes
.
objectOf
(
PropTypes
.
string
),
classes
:
PropTypes
.
objectOf
(
PropTypes
.
string
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment