151 lines
8.5 KiB
PHP
151 lines
8.5 KiB
PHP
<!-- Files -->
|
|
<div class="card mb-2">
|
|
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseLeadFiles" aria-expanded="false" aria-controls="collapseLeadFiles">
|
|
<strong style="line-height: 1.6em">PDF Dateien</strong>
|
|
</h6>
|
|
<div class="collapse" id="collapseLeadFiles">
|
|
|
|
@php($lead_files_count = 1)
|
|
<div class="card-body row">
|
|
<div class="table-responsive" id="lead_files_table">
|
|
<table class="table table-striped table-sm">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Datei</th>
|
|
<th>Inhalt</th>
|
|
<th>Datum</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
@foreach(\App\Services\Lead::contentFiles() as $content_file)
|
|
@if($file = \App\Models\CMSContent::getModelBySlug($content_file))
|
|
<tr>
|
|
<th scope="row">{{$lead_files_count++}}</th>
|
|
<td>
|
|
<a target="_blank" href="{{ $file->getURL() }}" class="badge badge-md badge-next">
|
|
<i class="fa fa-file-pdf mr-1"></i> {{$file->name}}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{{ $file->formatBytes() }}
|
|
</td>
|
|
<td>{{\App\Services\Util::_format_date($file->created_at, 'date')}}</td>
|
|
<td>
|
|
<a href="{{ $file->getURL('download') }}" class="btn btn-xs btn-default"
|
|
title="Download" data-placement="left" rel="tooltip">
|
|
<i class="fa fa-download"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
@endforeach
|
|
@if($lead->travel_country_crm)
|
|
@foreach($lead->travel_country_crm->getContactLandsModels() as $TravelCountry)
|
|
@if($TravelCountry->stern_travel_country)
|
|
@foreach($TravelCountry->stern_travel_country->general_files as $general_files)
|
|
<tr>
|
|
<th scope="row">{{$lead_files_count++}}</th>
|
|
<td>
|
|
<a target="_blank" href="{{ $general_files->getURL() }}" class="badge badge-md badge-info">
|
|
<i class="{{$general_files->getIconExt()}} mr-1"></i> {{$general_files->original_name}}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
@if(Auth::user()->isPermission('sua-st-co'))
|
|
<a href="{{route('admin_settings_travel_country_detail', [$TravelCountry->stern_travel_country->id, 'data'])}}">{{$TravelCountry->stern_travel_country->name }}</a> |
|
|
@endif
|
|
{{ $general_files->mine }} | {{ $general_files->formatBytes() }}
|
|
</td>
|
|
<td>{{\App\Services\Util::_format_date($general_files->created_at, 'date')}}</td>
|
|
<td>
|
|
<a href="{{ $general_files->getURL('download') }}" class="btn btn-xs btn-default"
|
|
title="Download" data-placement="left" rel="tooltip">
|
|
<i class="fa fa-download"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
|
|
@foreach($lead->getPassolutionPDF() as $PassolutionPDF)
|
|
@if($PassolutionPDF)
|
|
<tr>
|
|
<th scope="row">{{$lead_files_count++}}</th>
|
|
<td>
|
|
<a target="_blank" href="{{ $PassolutionPDF['url'] }}?t={{ time() }}" class="badge badge-md badge-next">
|
|
<i class="fa fa-file-pdf mr-1"></i> {{$PassolutionPDF['filename']}}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
Passolution |
|
|
{{ \App\Services\Util::_formatBytes($PassolutionPDF['size']) }}
|
|
</td>
|
|
<td>{{\App\Services\Util::_format_date($PassolutionPDF['date'], 'date')}}</td>
|
|
<td>
|
|
<a href="{{ $PassolutionPDF['url'] }}?t={{ time() }}" class="btn btn-xs btn-default"
|
|
title="Download" data-placement="left" rel="tooltip" download="">
|
|
<i class="fa fa-download"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
@endif
|
|
@endforeach
|
|
|
|
|
|
@if($lead->lead_files)
|
|
@foreach($lead->lead_files as $lead_file)
|
|
<tr>
|
|
<th scope="row">{{$lead_files_count++}}</th>
|
|
<td>
|
|
<a target="_blank" href="{{ $lead_file->getURL() }}" class="badge badge-md badge-secondary">
|
|
<i class="{{$lead_file->getIconExt()}} mr-1"></i> {{$lead_file->original_name}}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{{ $lead_file->mine }} | {{ $lead_file->formatBytes() }}
|
|
</td>
|
|
<td>{{\App\Services\Util::_format_date($lead_file->created_at, 'date')}}</td>
|
|
<td>
|
|
<a href="{{ $lead_file->getURL('download') }}" class="btn btn-xs btn-default"
|
|
title="Download" data-placement="left" rel="tooltip">
|
|
<i class="fa fa-download"></i>
|
|
</a>
|
|
<a class="ml-2 btn btn-xs btn-danger" href="{{ route('lead_delete', [$lead_file->id, 'lead_files']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
|
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<div class="text-right d-block w-100">
|
|
@if(Auth::user()->isPermission('sua-st-em'))
|
|
<div class="float-left small">Allgemeine Dateien unter: <a href="{{route('admin_settings_emails', ['settings'])}}">Einstellungen -> E-Mails / Einstellungen</a></div>
|
|
@endif
|
|
@if(Auth::user()->isPermission('sua-st-co'))
|
|
<br><div class="float-left small">Landesspezifische Dateien unter: <a href="{{route('admin_settings_travel_country', [])}}">Einstellungen -> Reieseländer</a></div>
|
|
@endif
|
|
<br><div class="float-left small">Passolution Dateien aktualisieren: <a class="ml-2 btn btn-xs btn-warning" href="{{ route('lead_delete', [$lead->id, 'passolution_file']) }}" onclick="return confirm('{{__('Einreisebestimmungen erneuern?')}}');"><i class="fa fa-sync"></i></a>
|
|
</div>
|
|
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
|
|
data-target="#modals-load-content"
|
|
data-id="new-file"
|
|
data-model="LeadFile"
|
|
data-action="modal-upload-lead-file"
|
|
data-url=""
|
|
data-redirect="back"
|
|
data-lead_id="{{$lead->id}}"
|
|
data-route="{{ route('lead_mail_modal_load') }}"><i class="ion ion-md-cloud-upload"></i> Datei hinzufügen</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|