Format all blade templates to 2 spaces #530 (#531)

This commit is contained in:
Nabeel S
2020-02-01 13:05:56 -05:00
committed by GitHub
parent 06b47d97e0
commit 59d09c0cec
254 changed files with 7123 additions and 7006 deletions

View File

@@ -6,87 +6,87 @@ Pass in:
--}}
<div id="airport-files-wrapper" class="col-12">
<div class="header">
<h3>files</h3>
@component('admin.components.info')
Add a download link or upload a file to make available
@endcomponent
</div>
<div class="header">
<h3>files</h3>
@component('admin.components.info')
Add a download link or upload a file to make available
@endcomponent
</div>
@if(count($model->files) === 0)
@include('admin.common.none_added', ['type' => 'files'])
@if(count($model->files) === 0)
@include('admin.common.none_added', ['type' => 'files'])
@endif
{{-- Show all the files here --}}
<table class="table table-hover table-responsive">
@if(count($model->files))
<thead>
<tr>
<td>Name</td>
<td>Direct Link</td>
<td>Downloads</td>
<td class="text-right"></td>
</tr>
</thead>
@endif
<tbody>
@foreach($model->files as $file)
<tr>
<td>{{ $file->name }}</td>
<td><a href="{{ $file->url }}" target="_blank">Link to file</a></td>
<td>{{$file->download_count}}</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.files.delete', $file->id], 'method' => 'delete']) }}
{{ Form::hidden('id', $file->id) }}
{{ Form::button('<i class="fa fa-times"></i>', [
'type' => 'submit',
'class' => 'btn btn-sm btn-danger btn-icon',
'onclick' => "return confirm('Are you sure?')"])
}}
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
<hr>
<div class="row">
<div class="col-sm-12">
<div class="text-right">
{{ Form::open([
'url' => route('admin.files.store'),
'method' => 'POST',
'class' => 'form-inline',
'files' => true
])
}}
{{-- Show all the files here --}}
<table class="table table-hover table-responsive">
@if(count($model->files))
<thead>
<tr>
<td>Name</td>
<td>Direct Link</td>
<td>Downloads</td>
<td class="text-right"></td>
</tr>
</thead>
@endif
<tbody>
@foreach($model->files as $file)
<tr>
<td>{{ $file->name }}</td>
<td><a href="{{ $file->url }}" target="_blank">Link to file</a></td>
<td>{{$file->download_count}}</td>
<td class="text-right">
{{ Form::open(['route' => ['admin.files.delete', $file->id], 'method' => 'delete']) }}
{{ Form::hidden('id', $file->id) }}
{{ Form::button('<i class="fa fa-times"></i>', [
'type' => 'submit',
'class' => 'btn btn-sm btn-danger btn-icon',
'onclick' => "return confirm('Are you sure?')"])
}}
{{ Form::close() }}
</td>
</tr>
@endforeach
</tbody>
</table>
<hr>
<div class="row">
<div class="col-sm-12">
<div class="text-right">
{{ Form::open([
'url' => route('admin.files.store'),
'method' => 'POST',
'class' => 'form-inline',
'files' => true
])
}}
{{ Form::token() }}
{{ Form::token() }}
<span class="required">*</span>
{{ Form::text('file_name', null, ['class' => 'form-control', 'placeholder' => 'Name']) }}
{{ Form::text('file_description', null, ['class' => 'form-control', 'placeholder' => 'Description']) }}
{{ Form::text('url', null, ['class' => 'form-control', 'placeholder' => 'URL']) }}
{{ Form::file('file', ['class' => 'form-control']) }}
<span class="required">*</span>
{{ Form::text('file_name', null, ['class' => 'form-control', 'placeholder' => 'Name']) }}
{{ Form::text('file_description', null, ['class' => 'form-control', 'placeholder' => 'Description']) }}
{{ Form::text('url', null, ['class' => 'form-control', 'placeholder' => 'URL']) }}
{{ Form::file('file', ['class' => 'form-control']) }}
{{-- Fields for the model --}}
{{ Form::hidden('ref_model', get_class($model)) }}
{{ Form::hidden('ref_model_id', $model->id) }}
{{-- Fields for the model --}}
{{ Form::hidden('ref_model', get_class($model)) }}
{{ Form::hidden('ref_model_id', $model->id) }}
{{ Form::submit('Save', [
'id' => 'save_file_upload',
'class' => 'btn btn-success'
])
}}
<div class="text-danger" style="padding-top: 10px;">
<span>{{ $errors->first('filename') }}</span>
<span>{{ $errors->first('url') }}</span>
<span>{{ $errors->first('file') }}</span>
</div>
{{ Form::close() }}
</div>
{{ Form::submit('Save', [
'id' => 'save_file_upload',
'class' => 'btn btn-success'
])
}}
<div class="text-danger" style="padding-top: 10px;">
<span>{{ $errors->first('filename') }}</span>
<span>{{ $errors->first('url') }}</span>
<span>{{ $errors->first('file') }}</span>
</div>
{{ Form::close() }}
</div>
</div>
</div>
</div>

View File

@@ -1,37 +1,37 @@
<div class="card border-blue-bottom">
<div class="content">
<div class="row">
<div class="content">
<div class="row">
{{ Form::open(['method' => 'post', 'route' => $route, 'files' => true]) }}
<div class="form-group col-12">
{{ Form::label('csv_file', 'Choose a CSV file to import') }}
{{ Form::file('csv_file', ['accept' => '.csv']) }}
<p class="text-danger">{{ $errors->first('csv_file') }}</p>
</div>
{{ Form::open(['method' => 'post', 'route' => $route, 'files' => true]) }}
<div class="form-group col-12">
{{ Form::label('csv_file', 'Choose a CSV file to import') }}
{{ Form::file('csv_file', ['accept' => '.csv']) }}
<p class="text-danger">{{ $errors->first('csv_file') }}</p>
</div>
<div class="form-group col-md-12">
<div class="text-right">
{{ Form::button('Start Import', ['type' => 'submit', 'class' => 'btn btn-success']) }}
</div>
</div>
{{ Form::close() }}
<div class="form-group col-md-12">
@if($logs['success'])
<h4>Logs</h4>
@foreach($logs['success'] as $line)
<p>{{ $line }}</p>
@endforeach
@endif
@if($logs['errors'])
<h4>Errors</h4>
@foreach($logs['errors'] as $line)
<p>{{ $line }}</p>
@endforeach
@endif
</div>
<div class="form-group col-md-12">
<div class="text-right">
{{ Form::button('Start Import', ['type' => 'submit', 'class' => 'btn btn-success']) }}
</div>
</div>
{{ Form::close() }}
<div class="form-group col-md-12">
@if($logs['success'])
<h4>Logs</h4>
@foreach($logs['success'] as $line)
<p>{{ $line }}</p>
@endforeach
@endif
@if($logs['errors'])
<h4>Errors</h4>
@foreach($logs['errors'] as $line)
<p>{{ $line }}</p>
@endforeach
@endif
</div>
</div>
</div>
</div>

View File

@@ -1,5 +1,5 @@
<div class="jumbotron">
<p class="text-center">
No {{ $type }} have been added
</p>
<p class="text-center">
No {{ $type }} have been added
</p>
</div>