diff --git a/src/components/media.js b/src/components/media.js
index 0595f8f..a4691f7 100644
--- a/src/components/media.js
+++ b/src/components/media.js
@@ -2,7 +2,9 @@ import React, { Fragment, useState } from "react";
import classnames from "classnames";
import { fade } from "@material-ui/core/styles/colorManipulator";
import { makeStyles } from "@material-ui/core/styles";
+import { Tooltip } from "@material-ui/core";
import {
+ BooleanField,
BooleanInput,
Button,
DateTimeInput,
@@ -16,6 +18,7 @@ import {
useRefresh,
useTranslate,
} from "react-admin";
+import ClearIcon from "@material-ui/icons/Clear";
import DeleteSweepIcon from "@material-ui/icons/DeleteSweep";
import Dialog from "@material-ui/core/Dialog";
import DialogContent from "@material-ui/core/DialogContent";
@@ -150,6 +153,7 @@ export const DeleteMediaButton = props => {
export const ProtectMediaButton = props => {
const { record } = props;
+ const translate = useTranslate();
const refresh = useRefresh();
const notify = useNotify();
const [create, { loading }] = useCreate("protect_media");
@@ -186,24 +190,54 @@ export const ProtectMediaButton = props => {
};
return (
+ /*
+ Wrapping Tooltip with
+ https://github.com/marmelab/react-admin/issues/4349#issuecomment-578594735
+ */
- {!record.safe_from_quarantine && !record.quarantined_by && (
-
+
+ {/*
+ Button instead BooleanField for
+ consistent appearance and position in the column
+ */}
+
+
+
)}
{record.safe_from_quarantine && (
-
+
+
+
+
+ )}
+ {!record.safe_from_quarantine && !record.quarantined_by && (
+
+
+
+
+
)}
);
diff --git a/src/components/users.js b/src/components/users.js
index 9f6ca9f..32cbdd6 100644
--- a/src/components/users.js
+++ b/src/components/users.js
@@ -466,8 +466,7 @@ export const UserEdit = props => {
-
-
+
diff --git a/src/i18n/de.js b/src/i18n/de.js
index 0165474..7a9139f 100644
--- a/src/i18n/de.js
+++ b/src/i18n/de.js
@@ -265,8 +265,9 @@ const de = {
},
protect_media: {
action: {
- create: "Schützen",
- delete: "Schutz aufheben",
+ create: "Ungeschützt, Schutz erstellen",
+ delete: "Geschützt, Schutz aufheben",
+ none: "In Quarantäne",
send_success: "Erfolgreich den Schutz-Status geändert.",
send_failure: "Beim Versenden ist ein Fehler aufgetreten.",
},
diff --git a/src/i18n/en.js b/src/i18n/en.js
index 49fbf01..680fcc5 100644
--- a/src/i18n/en.js
+++ b/src/i18n/en.js
@@ -261,8 +261,9 @@ const en = {
},
protect_media: {
action: {
- create: "Protect",
- delete: "Unprotect",
+ create: "Unprotected, create protection",
+ delete: "Protected, remove protection",
+ none: "In quarantine",
send_success: "Successfully changed the protection status.",
send_failure: "An error has occurred.",
},