08 2024
This commit is contained in:
parent
04d677d37a
commit
bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions
18
resources/views/vendor/translation/forms/_select.blade.php
vendored
Normal file
18
resources/views/vendor/translation/forms/_select.blade.php
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<div class="select-group">
|
||||
|
||||
<select name="{{ $name }}" @if(isset($submit) && $submit) v-on:change="submit" @endif>
|
||||
@if(isset($optional) && $optional)<option value> ----- </option>@endif
|
||||
@foreach($items as $key => $value)
|
||||
@if(is_numeric($key))
|
||||
<option value="{{ $value }}" @if(isset($selected) && $selected === $value) selected="selected" @endif>{{ $value }}</option>
|
||||
@else
|
||||
<option value="{{ $key }}" @if(isset($selected) && $selected === $key) selected="selected" @endif>{{ $value }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<div class="caret">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/></svg>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
3
resources/views/vendor/translation/forms/search.blade.php
vendored
Normal file
3
resources/views/vendor/translation/forms/search.blade.php
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<div class="search">
|
||||
<input type="text" class="form-control" placeholder="{{ __('translation::translation.search') }}" name="{{ $name }}" value="{{ $value }}">
|
||||
</div>
|
||||
13
resources/views/vendor/translation/forms/select.blade.php
vendored
Normal file
13
resources/views/vendor/translation/forms/select.blade.php
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
<select class="custom-select" name="{{ $name }}" @if(isset($submit) && $submit) v-on:change="submit" @endif>
|
||||
@if(isset($optional) && $optional)<option value> ----- </option>@endif
|
||||
@foreach($items as $key => $value)
|
||||
@if(is_numeric($key))
|
||||
<option value="{{ $value }}" @if(isset($selected) && $selected === $value) selected="selected" @endif>{{ $value }}</option>
|
||||
@else
|
||||
<option value="{{ $key }}" @if(isset($selected) && $selected === $key) selected="selected" @endif>{{ $value }}</option>
|
||||
@endif
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
|
||||
18
resources/views/vendor/translation/forms/text.blade.php
vendored
Normal file
18
resources/views/vendor/translation/forms/text.blade.php
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<div class="input-group">
|
||||
<label for="{{ $field }}">
|
||||
{{ $label }}
|
||||
</label>
|
||||
<input
|
||||
class="@if($errors->has($field)) error @endif"
|
||||
name="{{ $field }}"
|
||||
id="{{ $field }}"
|
||||
type="text"
|
||||
placeholder="{{ isset($placeholder) ? $placeholder : '' }}"
|
||||
value="{{ old($field) }}"
|
||||
{{ isset($required) ? 'required' : '' }}>
|
||||
@if($errors->has($field))
|
||||
@foreach($errors->get($field) as $error)
|
||||
<p class="error-text">{!! $error !!}</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
1
resources/views/vendor/translation/icons/globe.blade.php
vendored
Normal file
1
resources/views/vendor/translation/icons/globe.blade.php
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg class="{{ isset($class) ? $class : 'fill-current w-4 h-4 mr-2' }}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 20a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm2-2.25a8 8 0 0 0 4-2.46V9a2 2 0 0 1-2-2V3.07a7.95 7.95 0 0 0-3-1V3a2 2 0 0 1-2 2v1a2 2 0 0 1-2 2v2h3a2 2 0 0 1 2 2v5.75zm-4 0V15a2 2 0 0 1-2-2v-1h-.5A1.5 1.5 0 0 1 4 10.5V8H2.25A8.01 8.01 0 0 0 8 17.75z"/></svg>
|
||||
|
After Width: | Height: | Size: 389 B |
1
resources/views/vendor/translation/icons/translate.blade.php
vendored
Normal file
1
resources/views/vendor/translation/icons/translate.blade.php
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg class="{{ isset($class) ? $class : 'fill-current w-4 h-4 mr-2' }}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M7.41 9l2.24 2.24-.83 2L6 10.4l-3.3 3.3-1.4-1.42L4.58 9l-.88-.88c-.53-.53-1-1.3-1.3-2.12h2.2c.15.28.33.53.51.7l.89.9.88-.88C7.48 6.1 8 4.84 8 4H0V2h5V0h2v2h5v2h-2c0 1.37-.74 3.15-1.7 4.12L7.4 9zm3.84 8L10 20H8l5-12h2l5 12h-2l-1.25-3h-5.5zm.83-2h3.84L14 10.4 12.08 15z"/></svg>
|
||||
|
After Width: | Height: | Size: 412 B |
36
resources/views/vendor/translation/languages/create.blade.php
vendored
Normal file
36
resources/views/vendor/translation/languages/create.blade.php
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
@extends('translation::layout')
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<!-- Description -->
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('translation::translation.add_language') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
|
||||
{!! Form::open(['url' => route('languages.store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="name">{{ __('translation::translation.language_name') }}</label>
|
||||
{{ Form::text('name', '', array('class'=>'form-control', 'id'=>'name')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="locale">{{ __('translation::translation.locale') }}</label>
|
||||
{{ Form::text('locale', '', array('class'=>'form-control', 'id'=>'locale')) }}
|
||||
</div>
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-secondary">{{ __('save') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
65
resources/views/vendor/translation/languages/index.blade.php
vendored
Normal file
65
resources/views/vendor/translation/languages/index.blade.php
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
@extends('translation::layout')
|
||||
|
||||
@section('body')
|
||||
@if(count($languages))
|
||||
|
||||
<div class="card">
|
||||
<h5 class="card-header">
|
||||
{{__('Sprache')}}
|
||||
</h5>
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
|
||||
<th>{{ __('translation::translation.language_name') }}</th>
|
||||
<th>{{ __('translation::translation.locale') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach($languages as $language => $name)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('languages.translations.index', $language) }}?group=single" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $name }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('languages.translations.index', $language) }}?group=single">
|
||||
{{ $language }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-4">
|
||||
<a href="{{ route('languages.create') }}" class="btn btn-sm btn-primary">
|
||||
{{ __('translation::translation.add') }} {{ __('translation::translation.language') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-style').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/datatables-{{ \App::getLocale() }}.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
49
resources/views/vendor/translation/languages/translations/create.blade.php
vendored
Normal file
49
resources/views/vendor/translation/languages/translations/create.blade.php
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
|
||||
|
||||
@extends('translation::layout')
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<!-- Description -->
|
||||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('translation::translation.add_translation') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
|
||||
{!! Form::open(['url' => route('languages.translations.store', $language), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="group">{{ __('translation::translation.group_label') }}</label>
|
||||
{{ Form::text('group', '', array('placeholder'=> __('translation::translation.group_placeholder'),'class'=>'form-control', 'id'=>'group')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="key">{{ __('translation::translation.key_label') }}</label>
|
||||
{{ Form::text('key', '', array('placeholder'=> __('translation::translation.key_placeholder'),'class'=>'form-control', 'id'=>'key')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="value">{{ __('translation::translation.value_label') }}</label>
|
||||
{{ Form::text('value', '', array('placeholder'=> __('translation::translation.value_placeholder'), 'class'=>'form-control', 'id'=>'value')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="namespace">{{ __('translation::translation.namespace_label') }}</label>
|
||||
{{ Form::text('namespace', '', array('placeholder'=> __('translation::translation.namespace_placeholder'), 'class'=>'form-control', 'id'=>'namespace')) }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-secondary">{{ __('save') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
97
resources/views/vendor/translation/languages/translations/custom.blade.php
vendored
Normal file
97
resources/views/vendor/translation/languages/translations/custom.blade.php
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
@extends('translation::layout')
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="card">
|
||||
|
||||
<h5 class="card-header">
|
||||
{{ __('translation::translation.translations') }} {{ $model }}
|
||||
</h5>
|
||||
|
||||
<div class="card-body p-0">
|
||||
|
||||
{!! Form::open(['url' => route('admin_translate', ['model'=>$model]), 'class' => 'form-horizontal', 'method'=>'get']) !!}
|
||||
|
||||
<div class="form-row align-items-center pb-0 px-4 pt-1">
|
||||
<div class="col-12">
|
||||
<p><em>Hinweis: Platzhalter in den Inhalte die mit einem Doppelkunkt beginnen (wie :date :num :attribute etc), oder Platzhalter wie $0 oder {0} müssen erhalten bleiben und werden bei der Ausgabe dynamisch durch entsprechende Werte ersetzt.
|
||||
<br>Tags wie <b> <strong> <br> etc. formatieren den Text und sollten genau so in den Übersetzungen übernommen werden. </em></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row align-items-center px-4 pb-2 pt-1">
|
||||
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
@include('translation::forms.select', ['name' => 'key', 'items' => $keys, 'submit' => true, 'selected' => Request::get('key'), 'optional' => false])
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 col-md-2 col-lg-2 mb-1">
|
||||
@include('translation::forms.select', ['name' => 'language', 'items' => $languages, 'submit' => true, 'selected' => $select_language])
|
||||
</div>
|
||||
{{-- <div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
@include('translation::forms.search', ['name' => 'filter', 'value' => Request::get('filter')])
|
||||
</div>
|
||||
--}}
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered" id="">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr>
|
||||
<th style="width: 40%;">{{ $select_language }}</th>
|
||||
<th style="width: 40%;">{{ $source_language }}</th>
|
||||
<th style="width: 20%;">Titel</th>
|
||||
</tr>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($translations as $id => $value)
|
||||
<tr>
|
||||
<td>
|
||||
<translation-input
|
||||
initial-translation="{{ $value['trans'] }}"
|
||||
language="{{ $select_language }}"
|
||||
group="{{ $select_key }}"
|
||||
translation-key="{{ $id }}"
|
||||
route="admin/translate/update/{{ $model }}">
|
||||
</translation-input>
|
||||
</td>
|
||||
<td>{{ $value['source'] }}</td>
|
||||
<td><span style="display: inline-block;">{{ $value['master'] }}</span></td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$("textarea").each(function(){
|
||||
this.style.height = "5px";
|
||||
this.style.height = (this.scrollHeight) + "px";
|
||||
});
|
||||
$("textarea").focus(function(){
|
||||
this.style.height = "5px";
|
||||
this.style.height = (this.scrollHeight) + "px";
|
||||
});
|
||||
$("textarea").focusout(function(){
|
||||
this.style.height = "5px";
|
||||
this.style.height = (this.scrollHeight) + "px";
|
||||
});
|
||||
$("textarea").on('change keyup paste', function() {
|
||||
this.style.height = "5px";
|
||||
this.style.height = (this.scrollHeight) + "px";
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@endsection
|
||||
122
resources/views/vendor/translation/languages/translations/index.blade.php
vendored
Normal file
122
resources/views/vendor/translation/languages/translations/index.blade.php
vendored
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
@extends('translation::layout')
|
||||
|
||||
@section('body')
|
||||
|
||||
|
||||
|
||||
<div class="card">
|
||||
|
||||
<h5 class="card-header">
|
||||
{{ __('translation::translation.translations') }}
|
||||
</h5>
|
||||
|
||||
<div class="card-body p-0">
|
||||
|
||||
{!! Form::open(['url' => route('languages.translations.index', ['language' => $language]), 'class' => 'form-horizontal', 'method'=>'get']) !!}
|
||||
|
||||
<div class="form-row align-items-center pb-0 px-4 pt-1">
|
||||
<div class="col-12">
|
||||
<p><em>Hinweis: Platzhalter in den Inhalte die mit einem Doppelkunkt beginnen (wie :date :num :attribute etc), oder Platzhalter wie $0 oder {0} müssen erhalten bleiben und werden bei der Ausgabe dynamisch durch entsprechende Werte ersetzt.
|
||||
<br>Tags wie <b> <strong> <br> etc. formatieren den Text und sollten genau so in den Übersetzungen übernommen werden. </em></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row align-items-center px-4 pb-2 pt-1">
|
||||
|
||||
|
||||
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
@include('translation::forms.select', ['name' => 'group', 'items' => $groups, 'submit' => true, 'selected' => Request::get('group'), 'optional' => false])
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 col-md-2 col-lg-2 mb-1">
|
||||
@include('translation::forms.select', ['name' => 'language', 'items' => $languages, 'submit' => true, 'selected' => $language])
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 col-md-4 col-lg-4 mb-1">
|
||||
@include('translation::forms.search', ['name' => 'filter', 'value' => Request::get('filter')])
|
||||
</div>
|
||||
<div class="col-6 col-sm-4 col-md-2 col-lg-2 mb-1">
|
||||
<a href="{{route('languages.translations.create', $language) }}" class="btn btn-sm btn-primary">
|
||||
{{ __('translation::translation.add') }} {{ __('translation::translation.translations') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div class="card-datatable table-responsive pt-0">
|
||||
<table class="datatables-style table table-striped table-bordered" id="">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr>
|
||||
|
||||
<th style="width: 40%;">{{ $language }}</th>
|
||||
<th style="width: 40%;">{{ config('app.locale') }}</th>
|
||||
|
||||
<th style="width: 10%;">{{ __('translation::translation.group_single') }}</th>
|
||||
<th style="width: 10%;">{{ __('translation::translation.key') }}</th>
|
||||
</tr>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($translations as $type => $items)
|
||||
|
||||
@foreach($items as $group => $trans)
|
||||
|
||||
@foreach($trans as $key => $value)
|
||||
@if(isset($value[config('app.locale')]))
|
||||
<tr>
|
||||
<td>
|
||||
<translation-input
|
||||
initial-translation="{{ $value[$language] }}"
|
||||
language="{{ $language }}"
|
||||
group="{{ $group }}"
|
||||
translation-key="{{ $key }}"
|
||||
route="{{ config('translation.ui_url') }}">
|
||||
</translation-input>
|
||||
</td>
|
||||
<td>{{ $value[config('app.locale')] }}</td>
|
||||
|
||||
<td>{{ $group }}</td>
|
||||
<td><span style="display: inline-block; width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{ $key }}</span></td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@endforeach
|
||||
|
||||
@endforeach
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$("textarea").each(function(){
|
||||
this.style.height = "5px";
|
||||
this.style.height = (this.scrollHeight) + "px";
|
||||
});
|
||||
$("textarea").focus(function(){
|
||||
this.style.height = "5px";
|
||||
this.style.height = (this.scrollHeight) + "px";
|
||||
});
|
||||
$("textarea").focusout(function(){
|
||||
this.style.height = "5px";
|
||||
this.style.height = (this.scrollHeight) + "px";
|
||||
});
|
||||
$("textarea").on('change keyup paste', function() {
|
||||
this.style.height = "5px";
|
||||
this.style.height = (this.scrollHeight) + "px";
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@endsection
|
||||
14
resources/views/vendor/translation/layout.blade.php
vendored
Normal file
14
resources/views/vendor/translation/layout.blade.php
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
|
||||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<link rel="stylesheet" href="{{ asset('/vendor/translation/css/my-main.css') }}">
|
||||
|
||||
<div id="app">
|
||||
@include('translation::notifications')
|
||||
@yield('body')
|
||||
</div>
|
||||
<script src="{{ asset('/vendor/translation/js/app.js') }}"></script>
|
||||
@endsection
|
||||
16
resources/views/vendor/translation/nav.blade.php
vendored
Normal file
16
resources/views/vendor/translation/nav.blade.php
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<nav class="header">
|
||||
<ul class="flex-grow justify-end pr-2">
|
||||
<li>
|
||||
<a href="{{ route('languages.index') }}" class="{{ set_active('') }}{{ set_active('/create') }}">
|
||||
@include('translation::icons.globe')
|
||||
{{ __('translation::translation.languages') }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('languages.translations.index', config('app.locale')) }}" class="{{ set_active('*/translations') }}">
|
||||
@include('translation::icons.translate')
|
||||
{{ __('translation::translation.translations') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
24
resources/views/vendor/translation/notifications.blade.php
vendored
Normal file
24
resources/views/vendor/translation/notifications.blade.php
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-success">
|
||||
<p>{{ Session::get('success') }}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if(Session::has('error'))
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<p>{{ Session::get('error') }}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue