clrghouz/resources/views/domain/home.blade.php

100 lines
2.5 KiB
PHP
Raw Permalink Normal View History

@use(App\Models\Domain)
2021-05-13 12:40:21 +00:00
@extends('layouts.app')
2021-06-14 11:33:18 +00:00
@section('htmlheader_title')
FTN Domains
@endsection
2021-05-13 12:40:21 +00:00
@section('content')
<div class="row">
<div class="col-12">
<h2>About FTN Domains</h2>
<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 Domain))(you can <a href="{{ url('domain/addedit') }}">add</a> more)@endcan:</p>
</div>
</div>
2021-05-13 12:40:21 +00:00
<div class="row">
2021-08-14 01:11:20 +00:00
<div class="col-9">
@if (Domain::count() === 0)
@can('admin',(new Domain))
<p>There are no domains setup, to <a href="{{ url('domain/addedit') }}">set up your first</a>.</p>
@else
<p class="pad">There are no domains - you need to ask an admin to create one for you.</p>
@endcan
@else
2021-08-14 01:11:20 +00:00
<table class="table monotable" id="domain">
<thead>
<tr>
<th>ID</th>
<th>Domain</th>
<th>Active</th>
<th>DNS domain</th>
<th>Zones</th>
</tr>
</thead>
2021-05-13 12:40:21 +00:00
<tbody>
@foreach (Domain::orderBy('name')->with(['zones'])->get() as $oo)
2021-05-13 12:40:21 +00:00
<tr>
<td><a href="{{ url('domain/addedit',[$oo->id]) }}">{{ $oo->id }}</a></td>
2021-05-13 12:40:21 +00:00
<td>{{ $oo->name }}</td>
<td>{{ $oo->active ? 'YES' : 'NO' }}</td>
2021-05-13 12:40:21 +00:00
<td>{{ $oo->dnsdomain }}</td>
<td>{{ $oo->zones->pluck('zone_id')->sort()->join(', ') }}</td>
2021-05-13 12:40:21 +00:00
</tr>
@endforeach
</tbody>
</table>
@endif
2021-05-13 12:40:21 +00:00
</div>
</div>
@endsection
2021-11-13 06:00:08 +00:00
@section('page-css')
@css('datatables')
@append
2021-05-13 12:40:21 +00:00
@section('page-scripts')
2021-11-13 06:00:08 +00:00
@js('datatables')
2021-08-14 01:11:20 +00:00
2021-05-13 12:40:21 +00:00
<script type="text/javascript">
2021-08-14 01:11:20 +00:00
$(document).ready(function() {
2021-05-13 12:40:21 +00:00
$('table tr').click(function() {
var href = $(this).find('a').attr('href');
if (href)
2021-05-13 12:40:21 +00:00
window.location = href;
});
2021-08-14 01:11:20 +00:00
$('#domain').DataTable({
paging: true,
pageLength: 25,
searching: true,
order: [],
conditionalPaging: {
style: 'fade',
speed: 500
},
columnDefs: [
{
targets: 4,
type: 'num-fmt',
render: {
'sort': function (data,type,row,meta) {
return data ? parseFloat(data) : 0;
},
}
}
],
2021-08-14 01:11:20 +00:00
language: {
paginate: {
previous: '&lt;&lt;',
next: '&gt;&gt;'
}
}
});
});
2021-05-13 12:40:21 +00:00
</script>
2021-11-13 06:00:08 +00:00
@append