huge Laravel 10 upgrade

This commit is contained in:
HolgerHatGarKeineNode
2023-02-19 20:13:20 +01:00
parent 5c74f77beb
commit 12847f95f6
440 changed files with 46336 additions and 682 deletions

View File

@@ -0,0 +1,41 @@
@extends('translation::layout')
@section('body')
<div class="panel w-1/2">
<div class="panel-header">
{{ __('translation::translation.add_language') }}
</div>
<form action="{{ route('languages.store') }}" method="POST">
<fieldset>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="panel-body p-4">
@include('translation::forms.text', ['field' => 'name', 'label' => __('translation::translation.language_name'), ])
@include('translation::forms.text', ['field' => 'locale', 'label' => __('translation::translation.locale'), ])
</div>
</fieldset>
<div class="panel-footer flex flex-row-reverse">
<button class="button button-blue">
{{ __('translation::translation.save') }}
</button>
</div>
</form>
</div>
@endsection

View File

@@ -0,0 +1,56 @@
@extends('translation::layout')
@section('body')
@if(count($languages))
<div class="panel w-1/2">
<div class="panel-header">
{{ __('translation::translation.languages') }}
<div class="flex flex-grow justify-end items-center">
<a href="{{ route('languages.create') }}" class="button">
{{ __('translation::translation.add') }}
</a>
</div>
</div>
<div class="panel-body">
<table>
<thead>
<tr>
<th>{{ __('translation::translation.language_name') }}</th>
<th>{{ __('translation::translation.locale') }}</th>
</tr>
</thead>
<tbody>
@foreach($languages as $language => $name)
<tr>
<td>
{{ $name }}
</td>
<td>
<a href="{{ route('languages.translations.index', $language) }}">
{{ $language }}
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endif
@endsection

View File

@@ -0,0 +1,56 @@
@extends('translation::layout')
@section('body')
<div class="panel w-1/2">
<div class="panel-header">
{{ __('translation::translation.add_translation') }}
</div>
<form action="{{ route('languages.translations.store', $language) }}" method="POST">
<fieldset>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="panel-body p-4">
@include('translation::forms.text', ['field' => 'group', 'label' => __('translation::translation.group_label'), 'placeholder' => __('translation::translation.group_placeholder')])
@include('translation::forms.text', ['field' => 'key', 'label' => __('translation::translation.key_label'), 'placeholder' => __('translation::translation.key_placeholder')])
@include('translation::forms.text', ['field' => 'value', 'label' => __('translation::translation.value_label'), 'placeholder' => __('translation::translation.value_placeholder')])
<div class="input-group">
<button v-on:click="toggleAdvancedOptions" class="text-blue">{{ __('translation::translation.advanced_options') }}</button>
</div>
<div v-show="showAdvancedOptions">
@include('translation::forms.text', ['field' => 'namespace', 'label' => __('translation::translation.namespace_label'), 'placeholder' => __('translation::translation.namespace_placeholder')])
</div>
</div>
</fieldset>
<div class="panel-footer flex flex-row-reverse">
<button class="button button-blue">
{{ __('translation::translation.save') }}
</button>
</div>
</form>
</div>
@endsection

View File

@@ -0,0 +1,89 @@
@extends('translation::layout')
@section('body')
<form action="{{ route('languages.translations.index', ['language' => $language]) }}" method="get">
<div class="panel">
<div class="panel-header">
{{ __('translation::translation.translations') }}
<div class="flex flex-grow justify-end items-center">
@include('translation::forms.search', ['name' => 'filter', 'value' => Request::get('filter')])
@include('translation::forms.select', ['name' => 'language', 'items' => $languages, 'submit' => true, 'selected' => $language])
<div class="sm:hidden lg:flex items-center">
@include('translation::forms.select', ['name' => 'group', 'items' => $groups, 'submit' => true, 'selected' => Request::get('group'), 'optional' => true])
<a href="{{ route('languages.translations.create', $language) }}" class="button">
{{ __('translation::translation.add') }}
</a>
</div>
</div>
</div>
<div class="panel-body">
@if(count($translations))
<table>
<thead>
<tr>
<th class="w-1/5 uppercase font-thin">{{ __('translation::translation.group_single') }}</th>
<th class="w-1/5 uppercase font-thin">{{ __('translation::translation.key') }}</th>
<th class="uppercase font-thin">{{ config('app.locale') }}</th>
<th class="uppercase font-thin">{{ $language }}</th>
</tr>
</thead>
<tbody>
@foreach($translations as $type => $items)
@foreach($items as $group => $translations)
@foreach($translations as $key => $value)
@if(!is_array($value[config('app.locale')]))
<tr>
<td>{{ $group }}</td>
<td>{{ $key }}</td>
<td>{{ $value[config('app.locale')] }}</td>
<td>
<translation-input
initial-translation="{{ $value[$language] }}"
language="{{ $language }}"
group="{{ $group }}"
translation-key="{{ $key }}"
route="{{ config('translation.ui_url') }}">
</translation-input>
</td>
</tr>
@endif
@endforeach
@endforeach
@endforeach
</tbody>
</table>
@endif
</div>
</div>
</form>
@endsection