Commit ff3c3e70 authored by Aria Givi's avatar Aria Givi
Browse files

Daten werden dargestellt

parent 0a8901de
......@@ -195,7 +195,6 @@ class LanguageController extends Controller
}
}
$t = [];
$fn = "";
#Wähle die erste Datei aus, welche nicht ausgeschlossen worden ist
......@@ -209,29 +208,33 @@ class LanguageController extends Controller
}
}
}
#Speichere den Inhalt der ausgewählten Datei in Array $t ab
$snippets = [];
#Speichere den Inhalt der ausgewählten Datei in allen Sprachen in $snippets ab
foreach($languageObjects as $folder => $languageObject) {
foreach($languageObject->stringMap as $languageFileName => $languageFile) {
if($languageFileName === $fn) {
$t[$languageObject->language] = $languageFile;
foreach($languageFile as $key => $value) {
$snippets[$key][$languageObject->language] = $value;
}
continue 2;
}
}
}
foreach($t as $language => $text) {
// foreach($text as $key => $value) {
echo("<p>");
var_dump($text);
echo("</p>");
//}
#Fülle $snippets auf mit leeren Einträgen für übrige Sprachen
foreach($to as $t) {
foreach($snippets as $key => $langArray) {
if(!isset($langArray[$t])) {
$snippets[$key][$t] = "";
}
}
}
die();
return view('languages.synoptic')
->with('to', $to) #Alle vorhandenen Sprachen
->with('texts', $t) #Array mit Sprachsnippets
->with('texts', $snippets) #Array mit Sprachsnippets
->with('filename', $fn) #Name der Datei
->with('title', trans('titles.languages.edit'));
}
......
......@@ -204,11 +204,11 @@ class MailController extends Controller
if ($new > 0) {
if($emailAddress !== "") {
Mail::to("aria@suma-ev.de")
Mail::to("dev@suma-ev.de")
->send(new Sprachdatei($message, $output, basename($filename), $emailAddress));
}
else {
Mail::to("aria@suma-ev.de")
Mail::to("dev@suma-ev.de")
->send(new Sprachdatei($message, $output, basename($filename)));
}
}
......
......@@ -26,32 +26,19 @@
@endforeach
</tr>
</thead>
<?php /*<tbody>
@foreach($texts as $name => $langValues)
@if($langValues === "")
<tr>
<td class="name language-name">{{preg_replace("/(\s*).*#(.*)$/si", "$1$2", $name)}}</td>
<td></td>
<td></td>
</tr>
@else
<tr> <!--Key -->
<td class="name language-name">{{preg_replace("/(\s*).*#(.*)$/si", "$1$2", $name)}}</td>
<td>
@if(isset($langValues[$to]))
<textarea class="language-text-area" type="text" rows="1" cols="50" form="submit" name="{{ base64_encode($name) }}">{{$langValues[$to]}}</textarea>
@else
<textarea class="language-text-area" rows="1" cols="50" form="submit" name="{{base64_encode("_new_" . $name)}}"></textarea>
@endif
</td>
@foreach($langs as $lang => $value)
<td>{!! $langValues[$lang] or "" !!}</td>
@endforeach
</tr>
@endif
<tbody>
@foreach($texts as $key => $language)
<tr> <!--Key -->
<td class="name language-name">{{preg_replace("/(\s*).*#(.*)$/si", "$1$2", $key)}}</td>
@foreach($language as $lang => $languageValue)
<td>
<textarea class="language-text-area" rows="1" cols="50" form="submit" name="{{base64_encode("_new_" . $key)}}">{{ $languageValue }} </textarea>
</td>
@endforeach
</tr>
@endforeach
</tbody> */
?>
</tbody>
</table>
<!--
<p>{{ trans('languages.hinweis.1') }}</p>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment