Work on registration of existing systems to users

This commit is contained in:
Deon George
2022-03-14 22:28:54 +11:00
parent d68307461e
commit 8072f7c5a9
19 changed files with 553 additions and 56 deletions

View File

@@ -13,7 +13,10 @@
<div class="row">
<div class="col-12">
<p>This system is aware of the following systems @can('create',(new \App\Models\System))(you can <a href="{{ url('ftn/system/addedit') }}">add</a> more)@endcan:</p>
<p>This system is aware of the following systems
@can('create',(new \App\Models\System))(you can <a href="{{ url('user/system/register') }}">register</a> more):@endcan
@can('admin',(new \App\Models\System))(you can <a href="{{ url('ftn/system/addedit') }}">add</a> more):@endcan
</p>
@if (\App\Models\System::active()->count() == 0)
@can('create',(new \App\Models\System))
@@ -39,7 +42,7 @@
<tbody>
@foreach (\App\Models\System::active()->with(['addresses.zone.domain'])->get() as $oo)
<tr>
<td><a href="{{ url('ftn/system/addedit',[$oo->id]) }}">{{ $oo->id }}</a></td>
<td><a href="{{ url('ftn/system/addedit',[$oo->id]) }}" @cannot('update',$oo)class="disabled" @endcannot>{{ $oo->id }}</a></td>
<td>{{ $oo->name }} @if(! $oo->active)<span class="float-end"><small>[i]</small></span>@endif</td>
<td>{{ $oo->sysop }}</td>
<td>{{ $oo->location }}</td>
@@ -72,7 +75,7 @@
<script type="text/javascript">
$(document).ready(function() {
$('table tr').click(function() {
var href = $(this).find('a').attr('href');
var href = $(this).find('a:not(.disabled)').attr('href');
if (href)
window.location = href;