From 01c8f9ec942f26c5092a44bac968daac6e4bea54 Mon Sep 17 00:00:00 2001 From: Bastian Heist Date: Fri, 31 May 2019 10:56:48 +0200 Subject: [PATCH] TASK: Show a hint if an H5P element has been moved and cannot be displayed anymore, prompting the user to reload. --- Resources/Private/Fusion/Root.fusion | 5 +++++ .../Templates/Frontend/H5PNotInitializedWarning.html | 3 +++ Resources/Private/Templates/Plugin/Content/Content.html | 7 +++++++ 3 files changed, 15 insertions(+) create mode 100644 Resources/Private/Templates/Frontend/H5PNotInitializedWarning.html diff --git a/Resources/Private/Fusion/Root.fusion b/Resources/Private/Fusion/Root.fusion index 4803cc2..c8df1c6 100644 --- a/Resources/Private/Fusion/Root.fusion +++ b/Resources/Private/Fusion/Root.fusion @@ -2,6 +2,11 @@ prototype(Neos.Neos:Page) { head { javascripts.h5p = Sandstorm.NeosH5P:H5PScriptsAndStyles } + body { + javascripts.h5p = Neos.Fusion:Template { + templatePath = 'resource://Sandstorm.NeosH5P/Private/Templates/Frontend/H5PNotInitializedWarning.html' + } + } } diff --git a/Resources/Private/Templates/Frontend/H5PNotInitializedWarning.html b/Resources/Private/Templates/Frontend/H5PNotInitializedWarning.html new file mode 100644 index 0000000..7d08ec6 --- /dev/null +++ b/Resources/Private/Templates/Frontend/H5PNotInitializedWarning.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/Resources/Private/Templates/Plugin/Content/Content.html b/Resources/Private/Templates/Plugin/Content/Content.html index 9d362be..5e00fe3 100644 --- a/Resources/Private/Templates/Plugin/Content/Content.html +++ b/Resources/Private/Templates/Plugin/Content/Content.html @@ -17,6 +17,13 @@ +

+ This H5P content cannot be shown right now. + +
+ Did you just move this element? Reload the page to attempt to fix the problem. +
+

No content chosen - please choose or create an H5P content element in the inspector.