Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Display more information in the dataset preview #138

Merged
merged 6 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions app/configurator/components/dataset-metadata.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Trans } from "@lingui/macro";
import Link from "next/link";
import { ReactNode } from "react";
import { Box } from "theme-ui";
import { Loading } from "../../components/hint";
Expand Down Expand Up @@ -59,6 +60,19 @@ export const DataSetMetadata = ({ dataSetIri }: { dataSetIri: string }) => {
<DataSetMetadataBody>
{data.dataCubeByIri.version ?? "–"}
</DataSetMetadataBody>

<DataSetMetadataTitle>
<Trans id="dataset.metadata.email">Contact points</Trans>
</DataSetMetadataTitle>
<DataSetMetadataBody>
{data.dataCubeByIri.contactEmail ? (
<Link href={`mailto:${data.dataCubeByIri.contactEmail}`}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be next/link (since there's no page routing involved) but the Link component from theme-ui, so the proper styles can be used.

{data.dataCubeByIri.contactEmail}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the metadata there should also be the actual name associated that we should display here (contactName).

</Link>
) : (
"–"
)}
</DataSetMetadataBody>
</Box>
);
} else {
Expand Down
14 changes: 9 additions & 5 deletions app/locales/de/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -557,23 +557,27 @@ msgstr "Titel hinzufügen"
msgid "dataset.includeDrafts"
msgstr "Entwurfs-Datensätze anzeigen"

#: app/configurator/components/dataset-metadata.tsx:48
#: app/configurator/components/dataset-metadata.tsx:49
msgid "dataset.metadata.date.created"
msgstr "Erstellungsdatum"

#: app/configurator/components/dataset-metadata.tsx:25
#: app/configurator/components/dataset-metadata.tsx:26
msgid "dataset.metadata.description"
msgstr "Beschreibung"

#: app/configurator/components/dataset-metadata.tsx:34
#: app/configurator/components/dataset-metadata.tsx:65
msgid "dataset.metadata.email"
msgstr "Kontaktstellen"

#: app/configurator/components/dataset-metadata.tsx:35
msgid "dataset.metadata.source"
msgstr "Quelle"

#: app/configurator/components/dataset-metadata.tsx:20
#: app/configurator/components/dataset-metadata.tsx:21
msgid "dataset.metadata.title"
msgstr "Titel"

#: app/configurator/components/dataset-metadata.tsx:57
#: app/configurator/components/dataset-metadata.tsx:58
msgid "dataset.metadata.version"
msgstr "Version"

Expand Down
14 changes: 9 additions & 5 deletions app/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -557,23 +557,27 @@ msgstr "Title"
msgid "dataset.includeDrafts"
msgstr "Include draft datasets"

#: app/configurator/components/dataset-metadata.tsx:48
#: app/configurator/components/dataset-metadata.tsx:49
msgid "dataset.metadata.date.created"
msgstr "Date created"

#: app/configurator/components/dataset-metadata.tsx:25
#: app/configurator/components/dataset-metadata.tsx:26
msgid "dataset.metadata.description"
msgstr "Description"

#: app/configurator/components/dataset-metadata.tsx:34
#: app/configurator/components/dataset-metadata.tsx:65
msgid "dataset.metadata.email"
msgstr "Contact points"

#: app/configurator/components/dataset-metadata.tsx:35
msgid "dataset.metadata.source"
msgstr "Source"

#: app/configurator/components/dataset-metadata.tsx:20
#: app/configurator/components/dataset-metadata.tsx:21
msgid "dataset.metadata.title"
msgstr "Title"

#: app/configurator/components/dataset-metadata.tsx:57
#: app/configurator/components/dataset-metadata.tsx:58
msgid "dataset.metadata.version"
msgstr "Version"

Expand Down
14 changes: 9 additions & 5 deletions app/locales/fr/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -557,23 +557,27 @@ msgstr "Titre"
msgid "dataset.includeDrafts"
msgstr "Inclure les jeux de données à l'état d'ébauche"

#: app/configurator/components/dataset-metadata.tsx:48
#: app/configurator/components/dataset-metadata.tsx:49
msgid "dataset.metadata.date.created"
msgstr "Date de création"

#: app/configurator/components/dataset-metadata.tsx:25
#: app/configurator/components/dataset-metadata.tsx:26
msgid "dataset.metadata.description"
msgstr "Description"

#: app/configurator/components/dataset-metadata.tsx:34
#: app/configurator/components/dataset-metadata.tsx:65
msgid "dataset.metadata.email"
msgstr "Points de contact"

#: app/configurator/components/dataset-metadata.tsx:35
msgid "dataset.metadata.source"
msgstr "Source"

#: app/configurator/components/dataset-metadata.tsx:20
#: app/configurator/components/dataset-metadata.tsx:21
msgid "dataset.metadata.title"
msgstr "Titre"

#: app/configurator/components/dataset-metadata.tsx:57
#: app/configurator/components/dataset-metadata.tsx:58
msgid "dataset.metadata.version"
msgstr "Version"

Expand Down
14 changes: 9 additions & 5 deletions app/locales/it/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -557,23 +557,27 @@ msgstr "Titolo"
msgid "dataset.includeDrafts"
msgstr "Includi la bozza del set di dati"

#: app/configurator/components/dataset-metadata.tsx:48
#: app/configurator/components/dataset-metadata.tsx:49
msgid "dataset.metadata.date.created"
msgstr "Data di creazione"

#: app/configurator/components/dataset-metadata.tsx:25
#: app/configurator/components/dataset-metadata.tsx:26
msgid "dataset.metadata.description"
msgstr "Descrizione"

#: app/configurator/components/dataset-metadata.tsx:34
#: app/configurator/components/dataset-metadata.tsx:65
msgid "dataset.metadata.email"
msgstr "Punti di contatto"

#: app/configurator/components/dataset-metadata.tsx:35
msgid "dataset.metadata.source"
msgstr "Fonte"

#: app/configurator/components/dataset-metadata.tsx:20
#: app/configurator/components/dataset-metadata.tsx:21
msgid "dataset.metadata.title"
msgstr "Titolo"

#: app/configurator/components/dataset-metadata.tsx:57
#: app/configurator/components/dataset-metadata.tsx:58
msgid "dataset.metadata.version"
msgstr "versione"

Expand Down