Compare commits

..

1 Commits

Author SHA1 Message Date
7783f4dc18 Add filearea stats
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 38s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m48s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
2024-10-23 21:17:38 +11:00
3 changed files with 2 additions and 63 deletions

View File

@ -31,9 +31,4 @@ class Filearea extends Model
{
return $this->belongsTo(Domain::class);
}
public function files()
{
return $this->hasMany(File::class);
}
}

View File

@ -109,7 +109,7 @@
<tbody>
@foreach ($o->filearea_stats()->groupBy('id') as $oo)
<tr>
<td style="width: 10%;"><a href="{{ url('filearea/addedit',[($x=$oo->first())->id]) }}">{{ $x->name }}</a></td>
<td style="width: 10%;"><a href="{{ url('echoarea/addedit',[($x=$oo->first())->id]) }}">{{ $x->name }}</a></td>
<td>{{ $x->description }}</td>
<td>{{ ($xx=$oo->min('first_file')) ? $xx->format('Y-m-d H:i') : '-' }}</td>
<td>{{ $x->last_file ? $x->last_file->format('Y-m-d H:i') : '-' }}</td>

View File

@ -150,61 +150,5 @@
</div>
</div>
</div>
<div class="row">
<div class="col-12">
@if ($o->files->count())
<table class="table monotable" id="files">
<thead>
<tr>
<th>ID</th>
<th>File</th>
<th>Size</th>
<th>Hatched</th>
<th>Description</th>
</tr>
</thead>
<tbody>
@foreach ($o->files as $oo)
<tr>
<td><a href="{{ url('file/view',[$oo->id]) }}">{{ $oo->id }}</a></td>
<td>{{ $oo->name }}</td>
<td class="text-end">{{ number_format($oo->size) }}</td>
<td>{{ $oo->datetime->format('Y-m-d H:i:s') }}</td>
<td><small>{{ $oo->desc }}</small></td>
</tr>
@endforeach
</tbody>
</table>
@else
<p>No files yet in this area.</p>
@endif
</div>
</div>
</form>
@endsection
@section('page-css')
@css('datatables')
@append
@section('page-scripts')
@js('datatables')
<script type="text/javascript">
$(document).ready(function() {
$('#files').DataTable({
paging: true,
pageLength: 25,
searching: true,
ordering: true,
order: [1,'asc'],
conditionalPaging: {
style: 'fade',
speed: 500 // optional
},
});
});
</script>
@append
@endsection