Skip to content
Snippets Groups Projects
Commit 094d45c7 authored by Anthony's avatar Anthony
Browse files

Add trad and tooltip

parent 40ae0ebd
Branches
Tags
2 merge requests!13Manifest side to side,!11Draft: 33 8 open an other manifest side by side from an annotation
Pipeline #1314 passed
......@@ -4,13 +4,12 @@ import AccordionSummary from '@material-ui/core/AccordionSummary';
import ExpandMoreIcon from '@material-ui/icons/ExpandMoreSharp';
import Typography from '@material-ui/core/Typography';
import AccordionDetails from '@material-ui/core/AccordionDetails';
import PlaylistAddIcon from '@material-ui/icons/PlaylistAdd';
import PropTypes from 'prop-types';
import {
Card, CardActionArea, CardActions, CardContent, CardMedia, Fab,
} from '@material-ui/core';
import Button from '@material-ui/core/Button';
import async from 'async';
import Tooltip from '@material-ui/core/Tooltip';
/**
* AnnotationManifestsAccordion
......@@ -54,19 +53,6 @@ export class AnnotationManifestsAccordion extends Component {
this.state = { annotation };
}
/** */
handleOpenManifestSideToSide(e, manifestId) {
const { addResource, addWindow } = this.props;
addResource(manifestId);
addWindow({ manifestId });
}
/** */
// eslint-disable-next-line class-methods-use-this,require-jsdoc
handleOpenAccordion(e) {
e.stopPropagation();
}
/** */
componentDidMount() {
const { annotation } = this.state;
......@@ -92,6 +78,19 @@ export class AnnotationManifestsAccordion extends Component {
});
}
/** */
handleOpenManifestSideToSide(e, manifestId) {
const { addResource, addWindow } = this.props;
addResource(manifestId);
addWindow({ manifestId });
}
/** */
// eslint-disable-next-line class-methods-use-this,require-jsdoc
handleOpenAccordion(e) {
e.stopPropagation();
}
/** */
render() {
const {
......@@ -114,7 +113,7 @@ export class AnnotationManifestsAccordion extends Component {
expandIcon={<ExpandMoreIcon />}
onClick={(e) => this.handleOpenAccordion(e)}
>
<Typography className={classes.heading}>Manifests found:</Typography>
<Typography className={classes.heading}>{t('manifestsFound')}</Typography>
</AccordionSummary>
<AccordionDetails>
<Typography>
......@@ -135,6 +134,7 @@ export class AnnotationManifestsAccordion extends Component {
</CardContent>
</CardActionArea>
<CardActions>
<Tooltip title={t('openManifestInOtherWindow', { manifest: manifest.id })}>
<Button
size="small"
color="primary"
......@@ -142,8 +142,9 @@ export class AnnotationManifestsAccordion extends Component {
this.handleOpenManifestSideToSide(e, manifest.id);
}}
>
Open in new panel
{t('openInCompanionWindow')}
</Button>
</Tooltip>
</CardActions>
</Card>
</Typography>
......
......@@ -81,6 +81,7 @@
"login": "Log in",
"logout": "Log out",
"manifestError": "The resource cannot be added:",
"manifestFound": "Manifests found:",
"maximizeWindow": "Maximize window",
"minimizeWindow": "Minimize window",
"mirador": "Mirador",
......
......@@ -78,6 +78,7 @@
"login": "Se connecter",
"logout": "Se déconnecter",
"manifestError": "Cette ressource ne peut pas être ajoutée :",
"manifestFound": "Manifests trouvés:",
"maximizeWindow": "Agrandir cette fenêtre",
"minimizeWindow": "Réduire cette fenêtre",
"mirador": "Mirador",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment