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

87 lines
2.4 KiB
PHP
Raw Permalink Normal View History

2021-05-13 12:40:21 +00:00
@extends('layouts.app')
2021-06-14 11:33:18 +00:00
@section('htmlheader_title')
FTN Zones
@endsection
2021-05-13 12:40:21 +00:00
@section('content')
<div class="row">
<div class="col-12">
<h2>About FTN Zones</h2>
<p>In FTN network addresses, a zone is the 3rd dimension and used when a system supports 3D (or better) addressing, ie: <strong class="highlight">zone</strong>:net/node.point@domain.</p>
<p>Zones are used with domains to uniquely identify a FTN network. Within an FTN network there can be multiple zones with the same domain.</p>
<p>It is rare that a domain has multiple zones - unless it grows quite large. Zones can also be used to group systems into a common boundary.</p>
<p>This system is aware of the following zones in each domain @can('admin',(new \App\Models\Zone))(you can <a href="{{ url('zone/addedit') }}">add</a> more)@endcan:</p>
</div>
</div>
2021-05-13 12:40:21 +00:00
<div class="row">
2021-08-16 12:26:33 +00:00
<div class="col-9">
2023-06-27 07:39:11 +00:00
@if (\App\Models\Zone::count() === 0)
@can('admin',(new \App\Models\Zone))
<p>There are no zones setup, to <a href="{{ url('zone/addedit') }}">set up your first</a>.</p>
@else
<p class="pad">There are no zones - 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="zone">
<thead>
2021-05-13 12:40:21 +00:00
<tr>
<th>Domain</th>
<th>Zone</th>
<th>Active</th>
2021-08-16 12:26:33 +00:00
<th>Default</th>
<th>Systems</th>
2021-05-13 12:40:21 +00:00
</tr>
</thead>
<tbody>
2021-06-26 00:34:49 +00:00
@foreach (\App\Models\Zone::orderBy('zone_id')->with(['domain','addresses'])->get() as $oo)
<tr>
<td>{{ $oo->domain->name }}</td>
<td><a href="{{ url('zone/addedit',[$oo->id]) }}">{{ $oo->zone_id }}</a></td>
<td>{{ $oo->active ? 'YES' : 'NO' }}</td>
2021-08-16 12:26:33 +00:00
<td>{{ $oo->default ? 'YES' : 'NO' }}</td>
2021-06-26 00:34:49 +00:00
<td>{{ $oo->addresses->count() }}</td>
</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-05-13 12:40:21 +00:00
<script type="text/javascript">
$(document).ready(function() {
$('table tr').click(function() {
var href = $(this).find("a").attr("href");
if(href) {
window.location = href;
}
});
2021-08-14 01:11:20 +00:00
$('#zone').DataTable({
paging: true,
pageLength: 25,
searching: true,
2021-08-14 01:11:20 +00:00
autoWidth: false,
conditionalPaging: {
style: 'fade',
speed: 500 // optional
},
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