]> _ Git - fluidbook-toolbox.git/commitdiff
#7600 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Jul 2025 14:53:54 +0000 (16:53 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 3 Jul 2025 14:53:54 +0000 (16:53 +0200)
resources/views/elearningmedia/index.blade.php

index 815cd78cdc3afd2bb574e8f8798ffd327e58c3fa..f603b0fcd725dc107ae57a0f3362a0f132f0c971 100644 (file)
@@ -1,4 +1,13 @@
-<!DOCTYPE html>
+@php
+    function elearningTranslate($translations,$str){
+        if(!is_array($translations) || !isset($translations[$str]) || !$translations[$str]){
+            return $str;
+        }
+        return $translations[$str];
+    }
+@endphp
+
+        <!DOCTYPE html>
 <html lang="en">
 <head>
     <meta charset="UTF-8">
@@ -13,7 +22,7 @@
 @if($type==='pdf')
     <iframe id="player" frameborder="0" src="pdfjs/web/viewer.html?file=../../media.pdf#page=1"></iframe>
     <a href="#"
-       id="completeButton">{{ $translations['Click here once you have completed your learning session']?:'Click here once you have completed your learning session' }}</a>
+       id="completeButton">{{ elearningTranslate($translations,'Click here once you have completed your learning session') }}</a>
 @elseif($type==='audio')
     <button type="button" id="audiobigplay" class="plyr__control plyr__control--overlaid" data-plyr="play"
             aria-label="Play">