From ed682e2672fc9c2a4973136955ab8be2d1e40906 Mon Sep 17 00:00:00 2001 From: Aria <aria@suma-ev.de> Date: Mon, 14 Aug 2017 12:06:28 +0200 Subject: [PATCH] farbliche hinterlegung rueckgaengig gemacht, stattdessen wird ein hinweis angezeigt --- app/Http/Controllers/LanguageController.php | 7 +++++-- resources/views/languages/synoptic.blade.php | 21 ++++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/LanguageController.php b/app/Http/Controllers/LanguageController.php index c2a51cf4f..e580c78fd 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 492884d50..f160b3995 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> -- GitLab