diff --git a/app/Http/Controllers/LanguageController.php b/app/Http/Controllers/LanguageController.php index c2a51cf4ffa4acb0850e3b3f884f7130cb3fe4a8..e580c78fdc19e2b5b3d26c4df91676979943077b 100644 --- a/app/Http/Controllers/LanguageController.php +++ b/app/Http/Controllers/LanguageController.php @@ -197,9 +197,12 @@ class LanguageController extends Controller foreach($languageObjects as $folder => $languageObject) { foreach($languageObject->stringMap as $languageFileName => $languageFile) { if($languageFileName === $fn) { - if($changeTime <= filemtime($languageObject->filePath."/".$languageFileName)) { + if($changeTime < filemtime($languageObject->filePath."/".$languageFileName)) { + unset($recentlyChangedFiles); $changeTime = filemtime($languageObject->filePath."/".$languageFileName); $recentlyChangedFiles[] = $languageObject->language; + } else if($changeTime === filemtime($languageObject->filePath."/".$languageFileName)) { + $recentlyChangedFiles[] = $languageObject->language; } foreach($languageFile as $key => $value) { $snippets[$key][$languageObject->language] = $value; @@ -217,7 +220,7 @@ class LanguageController extends Controller } } } - + return view('languages.synoptic') ->with('to', $to) # Alle vorhandenen Sprachen ->with('texts', $snippets) # Array mit Sprachsnippets diff --git a/resources/views/languages/synoptic.blade.php b/resources/views/languages/synoptic.blade.php index 492884d507b2896ff54687c17894c913b3dbccdd..f160b3995d2f1102fe220177ab24395dab3987cf 100644 --- a/resources/views/languages/synoptic.blade.php +++ b/resources/views/languages/synoptic.blade.php @@ -14,6 +14,9 @@ --> */?> <h2>{{$filename}}</h2> + <p>Eine gelb hinterlegte Spalte bedeutet, dass mindestens ein Eintrag in dieser Datei kürzlich verändert worden ist. Eine genaue Bestimmung des zuletzt veränderten Textes ist + nicht möglich. Dementsprechend müssen die Texte der anderen Spalten angepasst werden. + </p> <form id="submit" method="POST"> <input type="hidden" name="filename" value="{{$filename}}" /> </form> @@ -22,7 +25,11 @@ <tr> <th>#ID</th> @foreach($to as $t) - <th>{{$t}}</th> + <th>{{$t}}<br> + @if(in_array($t, $recentlyChangedFiles)) + <span style="">Datei wurde vor kurzem bearbeitet.</span> + @endif + </th> @endforeach </tr> </thead> @@ -32,15 +39,9 @@ <td class="name language-name">{{$key}}</td> @foreach($language as $lang => $languageValue) @if($languageValue !== "") - @if(in_array($lang, $recentlyChangedFiles)) - <td> - <textarea class="language-text-area" rows="1" cols="20" style="background-color: Khaki;" form="submit" name="{{base64_encode($lang."_".$key)}}">{{$languageValue}}</textarea> - </td> - @else - <td> - <textarea class="language-text-area" rows="1" cols="20" form="submit" name="{{base64_encode($lang."_".$key)}}">{{$languageValue}}</textarea> - </td> - @endif + <td> + <textarea class="language-text-area" rows="1" cols="20" form="submit" name="{{base64_encode($lang."_".$key)}}">{{$languageValue}}</textarea> + </td> @else <td> <textarea class="language-text-area" rows="1" cols="20" form="submit" name="{{base64_encode("_new_".$lang."_".$key)}}"></textarea>