edit.blade.php 2.31 KB
Newer Older
1
2
3
4
5
@extends('layouts.subPages')

@section('title', $title )

@section('content')
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
	<h1>{{ trans('languages.header') }}</h1>
	<p>{{ trans('languages.beschreibung.1') }}</p>
	<p>{{ trans('languages.beschreibung.2') }}</p>
	<div class="progress">
		<div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="{{ round(100 * (($langTexts[$to]+$new) / count($sum))) }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ round(100 * (($langTexts[$to]+$new) / count($sum))) }}%">
			{{ trans('languages.progress', ['uebersetzteTexte'=> ($langTexts[$to]+$new), 'textCount'=>count($sum), 'percentage'=>round(100 * (($langTexts[$to]+$new) / count($sum)))]) }}
		</div>
	</div>
	<h1>{{$filename}}</h1>
	<form id="submit" method="POST">
		<input type="hidden" name="filename" value="{{$filename}}" />
	</form>
	<table class="table">
		<thead>
			<tr>
				<th>#ID</th>
				<th>{{$to}}</th>
				@foreach($langs as $lang => $value)
					<th>{{$lang}}</th>
				@endforeach
			</tr>
		</thead>
		<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>
						<td class="name language-name">{{preg_replace("/(\s*).*#(.*)$/si", "$1$2", $name)}}</td>
						<td>
							@if(isset($langValues[$to]))
41
								<textarea class="language-text-area" type="text" rows="1" cols="50" form="submit" name="{{ base64_encode($name) }}">{{$langValues[$to]}}</textarea>
42
43
44
45
46
							@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)
Dominik Hebeler's avatar
Dominik Hebeler committed
47
							<td>{!! $langValues[$lang] ?? "" !!}</td>
48
49
50
						@endforeach
					</tr>
				@endif
51
			@endforeach
52
53
54
55
56
		</tbody>
	</table>
	<p>{{ trans('languages.hinweis.1') }}</p>
	<p>{!! trans('languages.hinweis.2') !!}</p>
	<p>{!! trans('languages.hinweis.3') !!}</p>
57
	<p>{!! trans('languages.email') !!}</p>
Aria Givi's avatar
Aria Givi committed
58
	<p><input type="email" name="email" form="submit" value="{{$email}}"/></p>
59
	<button class="btn btn-success" type="submit" form="submit">Daten übermitteln</button>
60
61
	<script src="{{ mix('js/lib.js') }}"></script>
	<script src="{{ mix('js/editLanguage.js') }}"></script>
62
@endsection