mirror of https://github.com/4xmen/xshop.git
added attachment temp download link
added simple attachs list fixed area seederpull/49/head
parent
fc5a288067
commit
3ff5f7543d
@ -0,0 +1,43 @@
|
||||
<section class='SimpleAttachmentList'>
|
||||
<div class="{{gfx()['container']}}">
|
||||
@if(count($data['attachs']) > 0)
|
||||
<h2 class="my-3">
|
||||
{{__("Attachments")}}
|
||||
</h2>
|
||||
<table class="table table-striped attach-table table-hover">
|
||||
<tr>
|
||||
<th>
|
||||
{{__("Name")}}
|
||||
</th>
|
||||
<th>
|
||||
{{__("File name")}}
|
||||
</th>
|
||||
<th>
|
||||
{{__("Size")}}
|
||||
</th>
|
||||
<th>
|
||||
-
|
||||
</th>
|
||||
</tr>
|
||||
@foreach($data['attachs'] as $attach)
|
||||
<tr>
|
||||
<th>
|
||||
{{$attach->title}}
|
||||
</th>
|
||||
<th>
|
||||
{{$attach->title}} <span> [ {{$attach->ext}} ] </span>
|
||||
</th>
|
||||
<th>
|
||||
{{formatFileSize($attach->size)}}
|
||||
</th>
|
||||
<th>
|
||||
<a href="{{$attach->tempUrl()}}" class="btn btn-sm btn-outline-primary">
|
||||
<i class="ri-download-2-line"></i>
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "SimpleAttachmentList",
|
||||
"version": "1.0",
|
||||
"author": "xStack",
|
||||
"email": "xshop@xstack.ir",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"url": "https:\/\/xstack.ir",
|
||||
"author_url": "https:\/\/4xmen.ir",
|
||||
"packages": []
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Resources\Views\Segments;
|
||||
|
||||
use App\Models\Part;
|
||||
|
||||
class SimpleAttachmentList
|
||||
{
|
||||
public static function onAdd(Part $part = null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static function onRemove(Part $part = null)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static function onMount(Part $part = null, $model = null)
|
||||
{
|
||||
if ($model == null) {
|
||||
return $part;
|
||||
}
|
||||
$part->attachs = $model->attachs;
|
||||
return $part;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
.SimpleAttachmentList {
|
||||
// scss\
|
||||
padding: 2rem 0;
|
||||
.attach-table {
|
||||
border-radius: var(--xshop-border-radius);
|
||||
overflow: hidden;
|
||||
span{
|
||||
color: var(--xshop-secondary);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Loading…
Reference in New Issue