Added localization strings for partials, added file structure

This commit is contained in:
Wächtler, Yannick 2021-11-19 12:12:11 +01:00
parent 6eb120d101
commit 04fec144a0
16 changed files with 26 additions and 16 deletions

View file

@ -20,5 +20,5 @@ return [
'bulk_actions' => 'Bulk Actions',
'add_maintenance' => 'Add Maintenance',
'append' => 'Append',
'remove' => 'Remove',
'new' => 'New',
];

View file

@ -148,6 +148,7 @@
'licenses' => 'Licenses',
'list_all' => 'List All',
'loading' => 'Loading',
'loading_wait' => 'Loading... please wait....',
'lock_passwords' => 'This field value will not be saved in a demo installation.',
'feature_disabled' => 'This feature has been disabled for the demo installation.',
'location' => 'Location',

View file

@ -0,0 +1,6 @@
<?php
return [
'alt_uploaded_image_thumbnail' => 'Uploaded image thumbnail',
'placeholder_kit' => 'Select a kit',
];

View file

@ -77,7 +77,9 @@
@can('update', $custom_fieldset)
<form method="post" action="{{ route('fields.disassociate', [$field, $custom_fieldset->id]) }}">
@csrf
<button type="submit" class="btn btn-sm btn-danger">{{ trans('button.remove') }}</button> @endcan
<button type="submit" class="btn btn-sm btn-danger">{{ trans('button.remove') }}</button>
</form>
@endcan
</td>
</tr>
@endforeach

View file

@ -4,6 +4,7 @@
@endpush
@push('js')
<script src="{{ url(mix('js/dist/bootstrap-table.js')) }}"></script>
<script nonce="{{ csrf_token() }}">
@ -64,7 +65,7 @@
return newParams;
},
formatLoadingMessage: function () {
return '<h2><i class="fas fa-spinner fa-spin" aria-hidden="true"></i> Loading... please wait.... </h4>';
return '<h2><i class="fas fa-spinner fa-spin" aria-hidden="true"></i> {{ trans('general.loading_wait') }} </h4>';
},
icons: {
advancedSearchIcon: 'fas fa-search-plus',

View file

@ -18,7 +18,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\Category::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
<a href='{{ route('modal.show',['type' => 'category', 'category_type' => isset($category_type) ? $category_type : 'assets' ]) }}' data-toggle="modal" data-target="#createModal" data-select='category_select_id' class="btn btn-sm btn-primary">New</a>
<a href='{{ route('modal.show',['type' => 'category', 'category_type' => isset($category_type) ? $category_type : 'assets' ]) }}' data-toggle="modal" data-target="#createModal" data-select='category_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endif
@endcan
</div>

View file

@ -14,7 +14,7 @@
{!! $errors->first('image', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
<div class="col-md-4 col-md-offset-3" aria-hidden="true">
<img id="uploadFile-imagePreview" style="max-width: 200px; display: none;" alt="Uploaded image thumbnail">
<img id="uploadFile-imagePreview" style="max-width: 200px; display: none;" alt="{{ trans('partials/forms/general.alt_uploaded_image_thumbnail') }}">
</div>
</div>

View file

@ -3,13 +3,13 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required)) && ($required=='true')) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="kits" data-placeholder="Select a kit{{-- TODO: trans --}}" name="{{ $fieldname }}" style="width: 100%" id="kit_id_select">
<select class="js-data-ajax" data-endpoint="kits" data-placeholder="{{ trans('partials/forms/general.placeholder_kit') }}" name="{{ $fieldname }}" style="width: 100%" id="kit_id_select">
@if ($kit_id = Request::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $kit_id }}" selected="selected">
{{ (\App\Models\User::find($kit_id)) ? \App\Models\User::find($kit_id)->present()->fullName : '' }}
</option>
@else
<option value="">Select a kit{{-- TODO: trans --}}</option>
<option value="">{{ trans('partials/forms/general.placeholder_kit') }}</option>
@endif
</select>
</div>
@ -17,7 +17,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\PredefinedKit::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
{{-- <a href='{{ route('modal.show, 'kit') }}' data-toggle="modal" data-target="#createModal" data-select='kit_id_select' class="btn btn-sm btn-default">New</a> --}}
{{-- <a href='{{ route('modal.show, 'kit') }}' data-toggle="modal" data-target="#createModal" data-select='kit_id_select' class="btn btn-sm btn-default">{{ trans('buttons.new') }}</a> --}}
@endif
@endcan
</div>

View file

@ -17,7 +17,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\Location::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
<a href='{{ route('modal.show', 'location') }}' data-toggle="modal" data-target="#createModal" data-select='{{ $fieldname }}_location_select' class="btn btn-sm btn-primary">New</a>
<a href='{{ route('modal.show', 'location') }}' data-toggle="modal" data-target="#createModal" data-select='{{ $fieldname }}_location_select' class="btn btn-sm btn-primary">{{ trans('general.new') }}</a>
@endif
@endcan
</div>

View file

@ -19,7 +19,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\Manufacturer::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
<a href='{{ route('modal.show', 'manufacturer') }}' data-toggle="modal" data-target="#createModal" data-select='manufacturer_select_id' class="btn btn-sm btn-primary">New</a>
<a href='{{ route('modal.show', 'manufacturer') }}' data-toggle="modal" data-target="#createModal" data-select='manufacturer_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endif
@endcan
</div>

View file

@ -18,7 +18,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\AssetModel::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
<a href='{{ route('modal.show', 'model') }}' data-toggle="modal" data-target="#createModal" data-select='model_select_id' class="btn btn-sm btn-primary">New</a>
<a href='{{ route('modal.show', 'model') }}' data-toggle="modal" data-target="#createModal" data-select='model_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
<span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;">
<i class="fas fa-spinner fa-spin" aria-hidden="true"></i>
</span>

View file

@ -8,7 +8,7 @@
<div class="col-md-2 col-sm-2 text-left">
@can('create', \App\Models\Statuslabel::class)
<a href='{{ route('modal.show', 'statuslabel') }}' data-toggle="modal" data-target="#createModal" data-select='status_select_id' class="btn btn-sm btn-primary">New</a>
<a href='{{ route('modal.show', 'statuslabel') }}' data-toggle="modal" data-target="#createModal" data-select='status_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endcan
<span class="status_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fas fa-spinner fa-spin" aria-hidden="true"></i> </span>

View file

@ -17,7 +17,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\Supplier::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
<a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-select='supplier_select' class="btn btn-sm btn-primary">New</a>
<a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-select='supplier_select' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endif
@endcan
</div>

View file

@ -6,6 +6,6 @@
{!! $errors->first('supplier_id', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
</div>
<div class="col-md-1 col-sm-1 text-left">
<a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-primary">New</a>
<a href='{{ route('modal.show', 'supplier') }}' data-toggle="modal" data-target="#createModal" data-dependency="supplier" data-select='supplier_select_id' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
</div>
</div>

View file

@ -17,7 +17,7 @@
<div class="col-md-1 col-sm-1 text-left">
@can('create', \App\Models\User::class)
@if ((!isset($hide_new)) || ($hide_new!='true'))
<a href='{{ route('modal.show', 'user') }}' data-toggle="modal" data-target="#createModal" data-select='assigned_user_select' class="btn btn-sm btn-primary">New</a>
<a href='{{ route('modal.show', 'user') }}' data-toggle="modal" data-target="#createModal" data-select='assigned_user_select' class="btn btn-sm btn-primary">{{ trans('button.new') }}</a>
@endif
@endcan
</div>

View file

@ -1,3 +1,3 @@
<a style="padding-left: 10px; font-size: 18px;" class="text-dark-gray" data-trigger="focus" tabindex="0" role="button" data-toggle="popover" title="More Info" data-placement="right" data-html="true" data-content="{{ (isset($helpText)) ? $helpText : 'Help Info Missing' }}">
<i class="far fa-life-ring" aria-hidden="true"><span class="sr-only">More Info</span></i>
<i class="far fa-life-ring" aria-hidden="true"><span class="sr-only">{{ trans('general.moreinfo')) }}</span></i>
</a>