Some datatables consistency

This commit is contained in:
Deon George
2021-08-14 11:11:20 +10:00
parent 385290d18c
commit 6db826c8a4
10 changed files with 373 additions and 131 deletions

View File

@@ -10,12 +10,12 @@
<p>In FTN network addresses, a domain is the 5th dimension and used when a system supports 5D addressing, ie: zone:net/node.point@<strong class="highlight">domain</strong>.</p>
<p>Domains are used with zones to uniquely identify a FTN network.</p>
<p><small>Some legacy Fidonet software is not 5D aware and may behave unexpectedly when a domain is used</small></p>
<p>This system is aware of the following domains @can('admin',(new \App\Models\Domain))(you can <a href="{{ url('ftn/domain/addedit') }}">add</a> more)@endcan:</p>
</div>
</div>
<div class="row">
<div class="col-6">
<p>This system is aware of the following domains:</p>
<div class="col-9">
@if (\App\Models\Domain::count() == 0)
@can('admin',(new \App\Models\Domain))
@@ -24,7 +24,7 @@
<p class="pad">There are no domains - you need to ask an admin to create one for you.</p>
@endcan
@else
<table class="table monotable">
<table class="table monotable" id="domain">
<thead>
<tr>
<th>ID</th>
@@ -36,11 +36,6 @@
</thead>
<tbody>
@can('admin',(new \App\Models\Domain))
<tr>
<td colspan="5"><a href="{{ url('ftn/domain/addedit') }}">Add New Domain</a></td>
</tr>
@endcan
@foreach (\App\Models\Domain::orderBy('name')->with(['zones'])->get() as $oo)
<tr>
<td><a href="{{ url('ftn/domain/addedit',[$oo->id]) }}">{{ $oo->id }}</a></td>
@@ -58,12 +53,38 @@
@endsection
@section('page-scripts')
<link type="text/css" rel="stylesheet" href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap5.min.css" media="screen">
<link type="text/css" rel="stylesheet" href="{{ asset('plugin/dataTables/dataTables.bootstrap5.css') }}" media="screen">
<script type="text/javascript" src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="{{ asset('plugin/dataTables/dataTables.conditionalPaging.js') }}"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('table tr').click(function() {
var href = $(this).find('a').attr('href');
if (href)
window.location = href;
});
$('#domain').DataTable({
paging: true,
pageLength: 25,
searching: true,
order: [],
conditionalPaging: {
style: 'fade',
speed: 500
},
language: {
paginate: {
previous: '&lt;&lt;',
next: '&gt;&gt;'
}
}
});
});
</script>
@append