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

164 lines
6.0 KiB
PHP

@extends('layouts.app')
@section('htmlheader_title')
{{ $o->name }}
@endsection
@section('content')
<h1>{{ $o->name }} <small class="float-end pt-4">Last Update: {{ $o->updated_at->format('Y-m-d H:i') }}</small></h1>
<p class="float-end"><small>Expand each heading for information about this FTN network</small></p>
<div class="accordion" id="accordion_homepage">
<!-- About -->
<div class="accordion-item">
<h3 class="accordion-header" id="about" data-bs-toggle="collapse" data-bs-target="#collapse_about" aria-expanded="true" aria-controls="collapse_about">About</h3>
<div id="collapse_about" class="accordion-collapse collapse show" aria-labelledby="about" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
{!! \Illuminate\Mail\Markdown::parse($o->homepage) !!}
</div>
</div>
</div>
<!-- Echomail -->
<div class="accordion-item open">
<h3 class="accordion-header" id="echoareas" data-bs-toggle="collapse" data-bs-target="#collapse_echoareas" aria-expanded="false" aria-controls="collapse_echoareas">Echo Areas</h3>
<div id="collapse_echoareas" class="accordion-collapse collapse" aria-labelledby="echoareas" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
@if(FALSE)
@else
This network doesnt have any Echomail areas (yet). Perhaps you would like to create one?
@endif
</div>
</div>
</div>
<!-- File areas -->
<div class="accordion-item">
<h3 class="accordion-header" id="fileareas" data-bs-toggle="collapse" data-bs-target="#collapse_fileareas" aria-expanded="false" aria-controls="collapse_fileareas">File Areas</h3>
<div id="collapse_fileareas" class="accordion-collapse collapse" aria-labelledby="fileareas" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
@if(FALSE)
@else
This network doesnt have any File areas (yet). Perhaps you would like to create one?
@endif
</div>
</div>
</div>
<!-- Systems -->
<div class="accordion-item">
<h3 class="accordion-header" id="systems" data-bs-toggle="collapse" data-bs-target="#collapse_systems" aria-expanded="false" aria-controls="collapse_systems">Systems</h3>
<div id="collapse_systems" class="accordion-collapse collapse" aria-labelledby="systems" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
<p>The following systems are members of this network.</p>
<table class="table monotable" id="network">
<thead>
<tr>
<th>System</th>
<th>Sysop</th>
<th>Location</th>
<th>Address</th>
<th>Last Seen</th>
</tr>
</thead>
<tbody>
@foreach ($o->zones->sortBy('zone_id') as $oz)
<!-- First System Zone -->
<tr>
<td>{{ sprintf('ZC-%s-%05d',$oz->domain->name,$oz->zone_id) }}</td>
<td>{{ $oz->system->sysop }}</td>
<td>{{ $oz->system->location }}</td>
<td>{{ $oz->zone_id }}:0/0</td>
<td>-</td>
</tr>
@foreach ($oz->addresses()->active()->FTNorder()->where('point_id',0)->whereNull('hub_id')->with(['system','zone.domain'])->get() as $ao)
@if ($ao->role == 'Host')
<tr>
<td>{{ sprintf('NC-%s-%05d',$oz->domain->name,$ao->host_id) }} @auth<span class="float-end"><small>[{{ $ao->system_id }}]</small></span>@endauth</td>
<td>{{ $ao->system->sysop }}</td>
<td>{{ $ao->system->location }}</td>
<td>{{ $oz->zone_id }}:{{ $ao->host_id }}/0</td>
<td>-</td>
</tr>
@endif
<tr>
<td>{{ $ao->system->full_name($ao) }} @auth<span class="float-end"><small>[{{ $ao->system_id }}]</small></span>@endauth</td>
<td>{{ $ao->system->sysop }}</td>
<td>{{ $ao->system->location }}</td>
<td>{{ $ao->ftn_3d }}</td>
<td>-</td>
</tr>
<!-- If this node is a hub -->
@if ($ao->role == 'Hub')
@foreach ($oz->addresses()->active()->FTNorder()->where('point_id',0)->where('hub_id',$ao->id)->with(['system','zone.domain'])->get() as $aoo)
<tr>
<td>{{ $aoo->system->full_name($aoo) }} @auth<span class="float-end"><small>[{{ $aoo->system_id }}]</small></span>@endauth</td>
<td>{{ $aoo->system->sysop }}</td>
<td>{{ $aoo->system->location }}</td>
<td>{{ $aoo->ftn_3d }}</td>
<td>-</td>
</tr>
@endforeach
@endif
@endforeach
@endforeach
</tbody>
</table>
</div>
</div>
</div>
<!-- Sign up -->
<div class="accordion-item">
<h3 class="accordion-header" id="signup" data-bs-toggle="collapse" data-bs-target="#collapse_signup" aria-expanded="false" aria-controls="collapse_signup">Join Network</h3>
<div id="collapse_signup" class="accordion-collapse collapse" aria-labelledby="signup" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
@guest
To start an application to join this network please <a href="{{ url('login') }}">login</a>.
@else
@if(Auth::user()->isMember($o))
@else
This website is not ready to take applications yet, check back soon!
@endif
@endguest
</div>
</div>
</div>
</div>
@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="https://cdn.datatables.net/rowgroup/1.1.2/js/dataTables.rowGroup.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript">
$('table tr').click(function() {
var href = $(this).find('a').attr('href');
if (href)
window.location = href;
});
$('#network').DataTable({
paging: true,
pageLength: 25,
searching: true,
order: [
[3,'asc'],
],
});
</script>
@append