app: Affichage des alias

This commit is contained in:
Mattéo Delabre 2019-12-04 13:53:33 -05:00
parent b2185333c3
commit 46355c8776
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
3 changed files with 26 additions and 6 deletions

View File

@ -216,6 +216,14 @@ const TermInput = ({terms, availableTerms, setTerms}) =>
onClick={addTerm.bind(null, suggestion)} onClick={addTerm.bind(null, suggestion)}
> >
{suggestion.name} {suggestion.name}
{suggestion.alias.length >= 1 ? (
<span
className="TermInput_suggestionAlias"
title={`Alias du terme: ${suggestion.alias.join(', ')}`}
>
{suggestion.alias.join(', ')}
</span>
) : null}
</li> </li>
)} )}
</ul> </ul>

View File

@ -23,9 +23,6 @@ export const terms = {
id: 'Q154882', id: 'Q154882',
name: 'Légionellose', name: 'Légionellose',
alias: [ alias: [
'Légionnellose',
'Légionnelose',
'Légionelose',
'Maladie des légionnaires', 'Maladie des légionnaires',
], ],
types: [types.disease], types: [types.disease],
@ -42,8 +39,6 @@ export const terms = {
id: 'Q326663', id: 'Q326663',
name: 'Encéphalite à tiques', name: 'Encéphalite à tiques',
alias: [ alias: [
'Encéphalite à tique',
'Encéphalites à tiques',
'Encéphalite d\'Europe centrale', 'Encéphalite d\'Europe centrale',
'Encéphalite verno-estivale russe', 'Encéphalite verno-estivale russe',
'Méningoencéphalite à tique', 'Méningoencéphalite à tique',
@ -106,7 +101,6 @@ export const terms = {
id: 'Q127076', id: 'Q127076',
name: 'Vomissement', name: 'Vomissement',
alias: [ alias: [
'Vomissements',
'Vomi', 'Vomi',
'Vomissage', 'Vomissage',
'Vomir', 'Vomir',

View File

@ -156,6 +156,10 @@ input
cursor: pointer; cursor: pointer;
line-height: calc(2 * var(--base-size)); line-height: calc(2 * var(--base-size));
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: background var(--animation-short) var(--animation-ease-out); transition: background var(--animation-short) var(--animation-ease-out);
} }
@ -165,6 +169,19 @@ input
background: var(--color-light-darker); background: var(--color-light-darker);
} }
.TermInput_suggestionAlias
{
font-style: italic;
color: var(--color-dark-lighter);
}
.TermInput_suggestionAlias::before
{
content: "— ";
margin-left: calc(.4 * var(--base-size));
margin-right: calc(.25 * var(--base-size));
}
/** /**
* Graph * Graph
*/ */
@ -248,6 +265,7 @@ input
font-size: var(--font-size-larger); font-size: var(--font-size-larger);
font-style: italic; font-style: italic;
color: var(--color-dark-lighter); color: var(--color-dark-lighter);
text-align: center;
} }
/** /**