file upload and review updated
This commit is contained in:
@ -2,38 +2,39 @@
|
||||
$column_name = !empty($column_name) ? $column_name : 'attachment';
|
||||
$options = !empty($options) ? $options : false;
|
||||
@endphp
|
||||
<div class="card mb-0">
|
||||
<div class="card-body">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto">
|
||||
@if ($file->aggregate_type != 'image')
|
||||
<i class="fas fa-file-image"></i>
|
||||
@else
|
||||
<a href="#" class="avatar">
|
||||
<img src="{{ url('uploads/' . $file->id) }}" alt="{{ $file->basename }}">
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<ul class="mailbox-attachments clearfix margin-top">
|
||||
<li>
|
||||
@if ($file->aggregate_type != 'image')
|
||||
<span class="mailbox-attachment-icon">
|
||||
<i class="fa fa-file-{{ $file->aggregate_type }}-o"></i>
|
||||
</span>
|
||||
@else
|
||||
<span class="mailbox-attachment-icon has-img">
|
||||
<img src="{{ url('uploads/' . $file->id) }}" alt="{{ $file->basename }}">
|
||||
</span>
|
||||
@endif
|
||||
<div class="col ml--2 long-texts">
|
||||
<h4 class="mb-0">
|
||||
<span><i class="fas fa-paperclip"></i></span>
|
||||
<span>{{ $file->basename }}</span>
|
||||
</h4>
|
||||
|
||||
<div class="mailbox-attachment-info">
|
||||
<a href="javascript:void();" class="mailbox-attachment-name">
|
||||
<p class="mailbox-attachment-file-name">
|
||||
<i class="fa fa-paperclip"></i> {{ $file->basename }}
|
||||
</p>
|
||||
</a>
|
||||
<small>{{ $file->readableSize() }}</small>
|
||||
</div>
|
||||
|
||||
<span class="mailbox-attachment-size">
|
||||
{{ $file->readableSize() }}
|
||||
|
||||
@permission('delete-common-uploads')
|
||||
<div class="col-auto">
|
||||
@permission('delete-common-uploads')
|
||||
{!! Form::open([
|
||||
'id' => $column_name. '-' . $file->id,
|
||||
'method' => 'DELETE',
|
||||
'url' => [url('uploads/' . $file->id)],
|
||||
'class' => 'd-inline'
|
||||
]) !!}
|
||||
<a href="javascript:void();" id="remove-{{ $column_name }}" class="btn btn-danger btn-xs pull-right mailbox-attachment-remove">
|
||||
<i class="fa fa fa-times"></i>
|
||||
|
||||
<a href="javascript:void();" id="remove-{{ $column_name }}" type="button" class="btn btn-danger text-white header-button-top">
|
||||
<i class="fas fa-times"></i>
|
||||
</a>
|
||||
|
||||
@if ($options)
|
||||
@ -42,12 +43,12 @@
|
||||
<input type="hidden" name="value" value="{{ $file->id }}" />
|
||||
@endif
|
||||
{!! Form::close() !!}
|
||||
@endpermission
|
||||
@endpermission
|
||||
|
||||
<a href="{{ url('uploads/' . $file->id . '/download') }}" class="btn btn-info btn-xs pull-right mailbox-attachment-download">
|
||||
<i class="fa fa-cloud-download"></i>
|
||||
<a href="{{ url('uploads/' . $file->id . '/download') }}" type="button" class="btn btn-info text-white header-button-top">
|
||||
<i class="fas fa-file-download"></i>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,54 +0,0 @@
|
||||
@php
|
||||
$column_name = !empty($column_name) ? $column_name : 'attachment';
|
||||
$options = !empty($options) ? $options : false;
|
||||
@endphp
|
||||
|
||||
<ul class="mailbox-attachments clearfix margin-top">
|
||||
@foreach ($files as $file)
|
||||
<li>
|
||||
@if ($file->aggregate_type != 'image')
|
||||
<span class="mailbox-attachment-icon">
|
||||
<i class="fa fa-file-{{ $file->aggregate_type }}-o"></i>
|
||||
</span>
|
||||
@else
|
||||
<span class="mailbox-attachment-icon has-img">
|
||||
<img src="{{ url('uploads/' . $file->id) }}" alt="{{ $file->basename }}">
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<div class="mailbox-attachment-info">
|
||||
<a href="javascript:void();" class="mailbox-attachment-name">
|
||||
<p class="mailbox-attachment-file-name">
|
||||
<i class="fa fa-paperclip"></i> {{ $file->basename }}
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<span class="mailbox-attachment-size">
|
||||
{{ $file->readableSize() }}
|
||||
|
||||
@permission('delete-common-uploads')
|
||||
{!! Form::open([
|
||||
'id' => 'attachment-' . $file->id,
|
||||
'method' => 'DELETE',
|
||||
'url' => [url('uploads/' . $file->id)],
|
||||
'class' => 'd-inline'
|
||||
]) !!}
|
||||
<a href="javascript:void();" id="remove-attachment" class="btn btn-danger btn-xs pull-right mailbox-attachment-remove">
|
||||
<i class="fa fa fa-times"></i>
|
||||
</a>
|
||||
@if ($options)
|
||||
<input type="hidden" name="page" value="{{ $options['page'] }}" />
|
||||
<input type="hidden" name="key" value="{{ $options['key'] }}" />
|
||||
<input type="hidden" name="value" value="{{ $file->id }}" />
|
||||
@endif
|
||||
{!! Form::close() !!}
|
||||
@endpermission
|
||||
|
||||
<a href="{{ url('uploads/' . $file->id . '/download') }}" class="btn btn-info btn-xs pull-right mailbox-attachment-download">
|
||||
<i class="fa fa-cloud-download"></i>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
Reference in New Issue
Block a user