From 49bc9460240b126ee24283488bb66ab848a14389 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 31 Jul 2021 17:43:58 +1000 Subject: [PATCH] CSS changes, enable links to system edit on network list --- app/Models/Address.php | 11 +---- public/oldschool/css/main.css | 58 +++++++++++++----------- resources/views/domain/view.blade.php | 15 ++++-- resources/views/system/addedit.blade.php | 4 +- 4 files changed, 45 insertions(+), 43 deletions(-) diff --git a/app/Models/Address.php b/app/Models/Address.php index 598d65a..114ea86 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -253,15 +253,6 @@ class Address extends Model */ public function session(string $type): ?string { - static $session = NULL; - - if (is_null($session)) { - $session = (new SystemZone) - ->where('zone_id',$this->zone_id) - ->where('system_id',$this->system_id) - ->single(); - } - - return $session ? $session->{$type} : NULL; + return ($x=$this->system->sessions->where('id',$this->zone_id)->first()) ? $x->pivot->{$type} : NULL; } } diff --git a/public/oldschool/css/main.css b/public/oldschool/css/main.css index becae68..3dd0718 100644 --- a/public/oldschool/css/main.css +++ b/public/oldschool/css/main.css @@ -98,11 +98,20 @@ sup:before { } sup:after { content: ']'; + padding-right: 2px; } sup:before, sup:after { color: #aa0000; } +sup.success { + color: #005300; +} + +sup.success:before, +sup.success:after { + color: #00aa00; +} #nav { width: 100%; @@ -115,8 +124,6 @@ sup:after { #nav-menu { color:#aaa; padding:0; - width:inherit; - max-width:1248px; position:fixed; z-index:4; top:0; @@ -124,20 +131,18 @@ sup:after { right:0; margin-top:0; margin-bottom:0; - margin-left:auto; - margin-right:auto; + margin-left:5%; + margin-right:5%; text-align:left; } #nav-menu h1 { - width: 216px; + width: 15%; font-size: 1.5em; font-weight:400; padding: 12px 0 0 0; color: #fff; display: inline-block; text-transform:uppercase; - margin-right: 10px; - margin-left: -50px; } #nav-menu ul { margin:0; @@ -259,9 +264,10 @@ ul#searchbar li i { left:0; top:calc(3em + 5px); height:calc(100vh - 3em + 5px); - width:22ch; + width:15%; + /*margin-right: 10px;*/ overflow:hidden; - padding-top:1.5em; + padding-top:1em; color:#c60; background-color:#000; box-sizing:border-box; @@ -287,9 +293,9 @@ ul#searchbar li i { #content { color:#aaa; - max-width:993px; - margin:0 auto; - padding:4em 0 0; + max-width:95%; + padding-top: 3.5em; + padding-left: 7px; box-sizing:border-box; overflow:hidden } @@ -302,12 +308,8 @@ ul#searchbar li i { .with-sidebar { position:relative; - left:88px; - max-width:1041px!important -} -.with-sidebar.x { - left:112px; - max-width:1017px!important + margin-left: 18.5% !important; + max-width:75% !important; } /* MAIN CONTENT HEADERS */ @@ -588,7 +590,6 @@ tbody { border-bottom:1px solid #555 } .monotable { - background-color:#1e1e1e; margin-top:.5em; margin-bottom:1.5em; text-indent:0 @@ -617,10 +618,11 @@ tbody { border-right:2px solid #666 } .monotable tbody { + background-color:#1e1e1e; border-top:3px double #666; border-left:2px solid #666; border-right:2px solid #666; - border-bottom:1px solid #666; + border-bottom:2px solid #666; color: #eee; } .monotable tbody tr.admin { @@ -637,16 +639,18 @@ tbody { .monotable tbody tr:last-child td { padding-bottom:7px!important } -.monotable tr td:not(:last-child) { +.monotable tbody tr td:not(:last-child) { border-right:2px solid #666 } -.monotable.cozy { - text-align:left + +.monotable tfoot { + background-color:#000; + border: 0; } -.monotable.cozy td { - padding-top:8px!important; - padding-bottom:7px!important; - border-bottom:1px solid #666 +.monotable tfoot tr td { + border-bottom: 0; + color: #eee; + font-size: 85%; } .titledbox { diff --git a/resources/views/domain/view.blade.php b/resources/views/domain/view.blade.php index 3508ca8..930796b 100644 --- a/resources/views/domain/view.blade.php +++ b/resources/views/domain/view.blade.php @@ -77,7 +77,7 @@ {{ $oz->system->last_session ? $oz->system->last_session->format('Y-m-d H:i') : '-' }} - @foreach ($oz->addresses()->active()->FTNorder()->where('point_id',0)->whereNull('hub_id')->with(['system','zone.domain'])->get() as $ao) + @foreach ($oz->addresses()->active()->FTNorder()->where('point_id',0)->whereNull('hub_id')->with(['system.sessions','system.setup','zone.domain'])->get() as $ao) @if ($ao->role == 'Host') {{ sprintf('NC-%s-%05d',$oz->domain->name,$ao->host_id) }} @auth[{{ $ao->system_id }}]@endauth @@ -89,7 +89,7 @@ @endif - {{ $ao->system->full_name($ao) }} @auth[{{ $ao->system_id }}]@endauth + {{ $ao->system->full_name($ao) }} @auth@if($ao->session('sespass'))*@elseif($ao->system->setup)+@endif[{{ $ao->system_id }}]@endauth {{ $ao->system->sysop }} {{ $ao->system->location }} {{ $ao->ftn_3d }} @@ -98,9 +98,9 @@ @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) + @foreach ($oz->addresses()->active()->FTNorder()->where('point_id',0)->where('hub_id',$ao->id)->with(['system.sessions','zone.domain'])->get() as $aoo) - {{ $aoo->system->full_name($aoo) }} @auth[{{ $aoo->system_id }}]@endauth + {{ $aoo->system->full_name($aoo) }} @auth[{{ $aoo->system_id }}]@endauth {{ $aoo->system->sysop }} {{ $aoo->system->location }} {{ $aoo->ftn_3d }} @@ -111,6 +111,13 @@ @endforeach @endforeach + @auth + + + *System defined here +This system + + + @endauth diff --git a/resources/views/system/addedit.blade.php b/resources/views/system/addedit.blade.php index 919e61b..77e55b8 100644 --- a/resources/views/system/addedit.blade.php +++ b/resources/views/system/addedit.blade.php @@ -6,8 +6,8 @@ @section('content') @if ($o->exists) -

{{ $o->name }}@if($o->setup) *@endif

- @if($o->setup)* This Host@endif +

{{ $o->name }}@if($o->setup)*@endif

+ @if($o->setup)* This Host@endif @endif