Added echoareas and fileareas
This commit is contained in:
@@ -26,7 +26,27 @@
|
||||
|
||||
<div id="collapse_echoareas" class="accordion-collapse collapse" aria-labelledby="echoareas" data-bs-parent="#accordion_homepage">
|
||||
<div class="accordion-body">
|
||||
@if(FALSE)
|
||||
@if($o->echoareas->count())
|
||||
<p>This network provides the following Echomail areas:</p>
|
||||
<table class="table monotable" id="network">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Echoarea</th>
|
||||
<th>Description</th>
|
||||
<th>Last Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($o->echoareas->sortBy('name') as $oo)
|
||||
<tr>
|
||||
<td><a href="{{ url('ftn/echoarea/addedit',[$oo->id]) }}">{{ $oo->name }}</a></td>
|
||||
<td>{{ $oo->description }}</td>
|
||||
<td>{{ ($x=$oo->echomail()->orderBy('created_at','DESC')->first()) ? $x->created_at->format('Y-m-d H:i') : '-' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
This network doesnt have any Echomail areas (yet). Perhaps you would like to create one?
|
||||
@endif
|
||||
@@ -40,7 +60,27 @@
|
||||
|
||||
<div id="collapse_fileareas" class="accordion-collapse collapse" aria-labelledby="fileareas" data-bs-parent="#accordion_homepage">
|
||||
<div class="accordion-body">
|
||||
@if(FALSE)
|
||||
@if($o->fileareas->count())
|
||||
<p>This network provides the following File areas:</p>
|
||||
<table class="table monotable" id="network">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Filearea</th>
|
||||
<th>Description</th>
|
||||
<th>Last File Sent</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($o->fileareas->sortBy('name') as $oo)
|
||||
<tr>
|
||||
<td><a href="{{ url('ftn/filearea/addedit',[$oo->id]) }}">{{ $oo->name }}</a></td>
|
||||
<td>{{ $oo->description }}</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
This network doesnt have any File areas (yet). Perhaps you would like to create one?
|
||||
@endif
|
||||
|
115
resources/views/echoarea/addedit.blade.php
Normal file
115
resources/views/echoarea/addedit.blade.php
Normal file
@@ -0,0 +1,115 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
@if($o->exists) Update @else Add @endif Echoarea
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form class="row g-0 needs-validation" method="post" novalidate>
|
||||
@csrf
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="greyframe titledbox shadow0xb0">
|
||||
<h2 class="cap">@if($o->exists) Update @else Add @endif Echoarea</h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<label for="domain" class="form-label">Domain</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-tag-fill"></i></span>
|
||||
<select class="form-select @error('domain_id') is-invalid @enderror" id="domain" name="domain_id" required @cannot('admin',$o)disabled @endcannot>
|
||||
<option value=""> </option>
|
||||
@foreach (\App\Models\Domain::active()->cursor() as $oo)
|
||||
<option value="{{ $oo->id }}" @if(old('domain_id',$o->domain_id)==$oo->id)selected @endif>{{ $oo->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('domain_id')
|
||||
{{ $message }}
|
||||
@else
|
||||
A domain is required.
|
||||
@enderror
|
||||
</span>
|
||||
<span class="input-helper">Add a <a href="{{ url('ftn/domain/addedit') }}">NEW Domain</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<label for="name" class="form-label">Name</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-tag-fill"></i></span>
|
||||
<input type="text" class="form-control @error('name') is-invalid @enderror" id="name" placeholder="Name" name="name" value="{{ old('name',$o->name) }}" required @cannot('admin',$o)disabled @endcannot autofocus>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('name')
|
||||
{{ $message }}
|
||||
@else
|
||||
A name is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label for="active" class="form-label">Active</label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="active" id="active_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('active',$o->active ?? TRUE))checked @endif>
|
||||
<label class="btn btn-outline-success" for="active_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="active" id="active_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('active',$o->active ?? TRUE))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="active_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label for="public" class="form-label">Public</label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="public" id="public_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('public',$o->public ?? TRUE))checked @endif>
|
||||
<label class="btn btn-outline-success" for="public_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="public" id="public_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('public',$o->public ?? TRUE))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="public_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<label for="description" class="form-label">Description</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-file-text-fill"></i></span>
|
||||
<input type="text" class="form-control @error('description') is-invalid @enderror" id="description" placeholder="Description" name="description" value="{{ old('description',$o->description) }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('description')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="{{ url('ftn/echoarea') }}" class="btn btn-danger">Cancel</a>
|
||||
@can('admin',$o)
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
68
resources/views/echoarea/home.blade.php
Normal file
68
resources/views/echoarea/home.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('layouts.app')
|
||||
@section('htmlheader_title')
|
||||
Echoareas
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>About Echoareas</h2>
|
||||
<p>BBS Systems exchange public messages called <strong class="highlight">echomail</strong>. Echomail is grouped into <strong class="highlight">echoareas</strong> normally around a theme or a topic.</p>
|
||||
<p>Each echoarea has a unique <strong class="highlight">areatag</strong> which helps a receiving BBS to know where to file the message when it is received.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<p>This system is aware of the following echoareas:</p>
|
||||
|
||||
@if (\App\Models\Echoarea::count() == 0)
|
||||
@can('admin',(new \App\Models\Echoarea))
|
||||
<p>There are no echoareas setup, to <a href="{{ url('ftn/echoarea/addedit') }}">set up your first</a>.</p>
|
||||
@else
|
||||
<p class="pad">There are no echoareas - you need to ask an admin to create one for you.</p>
|
||||
@endcan
|
||||
@else
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Areatag</th>
|
||||
<th>Description</th>
|
||||
<th>Active</th>
|
||||
<th>Domain</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@can('admin',(new \App\Models\Echoarea))
|
||||
<tr>
|
||||
<td colspan="5"><a href="{{ url('ftn/echoarea/addedit') }}">Add New Echoarea</a></td>
|
||||
</tr>
|
||||
@endcan
|
||||
@foreach (\App\Models\Echoarea::orderBy('name')->with(['domain'])->get() as $oo)
|
||||
<tr>
|
||||
<td><a href="{{ url('ftn/echoarea/addedit',[$oo->id]) }}">{{ $oo->id }}</a></td>
|
||||
<td>{{ $oo->name }}</td>
|
||||
<td>{{ $oo->description }}</td>
|
||||
<td>{{ $oo->active ? 'YES' : 'NO' }}</td>
|
||||
<td>{{ $oo->domain->name }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$('table tr').click(function() {
|
||||
var href = $(this).find('a').attr('href');
|
||||
|
||||
if (href)
|
||||
window.location = href;
|
||||
});
|
||||
</script>
|
||||
@append
|
115
resources/views/filearea/addedit.blade.php
Normal file
115
resources/views/filearea/addedit.blade.php
Normal file
@@ -0,0 +1,115 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
@if($o->exists) Update @else Add @endif Filearea
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<form class="row g-0 needs-validation" method="post" novalidate>
|
||||
@csrf
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="greyframe titledbox shadow0xb0">
|
||||
<h2 class="cap">@if($o->exists) Update @else Add @endif Filearea</h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<label for="domain" class="form-label">Domain</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-tag-fill"></i></span>
|
||||
<select class="form-select @error('domain_id') is-invalid @enderror" id="domain" name="domain_id" required @cannot('admin',$o)disabled @endcannot>
|
||||
<option value=""> </option>
|
||||
@foreach (\App\Models\Domain::active()->cursor() as $oo)
|
||||
<option value="{{ $oo->id }}" @if(old('domain_id',$o->domain_id)==$oo->id)selected @endif>{{ $oo->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('domain_id')
|
||||
{{ $message }}
|
||||
@else
|
||||
A domain is required.
|
||||
@enderror
|
||||
</span>
|
||||
<span class="input-helper">Add a <a href="{{ url('ftn/domain/addedit') }}">NEW Domain</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<label for="name" class="form-label">Name</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-tag-fill"></i></span>
|
||||
<input type="text" class="form-control @error('name') is-invalid @enderror" id="name" placeholder="Name" name="name" value="{{ old('name',$o->name) }}" required @cannot('admin',$o)disabled @endcannot autofocus>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('name')
|
||||
{{ $message }}
|
||||
@else
|
||||
A name is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label for="active" class="form-label">Active</label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="active" id="active_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('active',$o->active ?? TRUE))checked @endif>
|
||||
<label class="btn btn-outline-success" for="active_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="active" id="active_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('active',$o->active ?? TRUE))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="active_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label for="public" class="form-label">Public</label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="public" id="public_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('public',$o->public ?? TRUE))checked @endif>
|
||||
<label class="btn btn-outline-success" for="public_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="public" id="public_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('public',$o->public ?? TRUE))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="public_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<label for="description" class="form-label">Description</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-file-text-fill"></i></span>
|
||||
<input type="text" class="form-control @error('description') is-invalid @enderror" id="description" placeholder="Description" name="description" value="{{ old('description',$o->description) }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('description')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="{{ url('ftn/filearea') }}" class="btn btn-danger">Cancel</a>
|
||||
@can('admin',$o)
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
68
resources/views/filearea/home.blade.php
Normal file
68
resources/views/filearea/home.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('layouts.app')
|
||||
@section('htmlheader_title')
|
||||
Fileareas
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>About Fileareas</h2>
|
||||
<p>BBS Systems exchange area able to exchange and distribute files. Files are grouped into <strong class="highlight">fileareas</strong> normally around a theme or type.</p>
|
||||
<p>Each filerea has a unique <strong class="highlight">filetag</strong> which helps a receiving BBS to know where to store the file when it is received.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<p>This system is aware of the following fileareas:</p>
|
||||
|
||||
@if (\App\Models\Filearea::count() == 0)
|
||||
@can('admin',(new \App\Models\Filearea))
|
||||
<p>There are no fileareas setup, to <a href="{{ url('ftn/filearea/addedit') }}">set up your first</a>.</p>
|
||||
@else
|
||||
<p class="pad">There are no fileareas - you need to ask an admin to create one for you.</p>
|
||||
@endcan
|
||||
@else
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Filetag</th>
|
||||
<th>Description</th>
|
||||
<th>Active</th>
|
||||
<th>Domain</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@can('admin',(new \App\Models\Filearea))
|
||||
<tr>
|
||||
<td colspan="5"><a href="{{ url('ftn/filearea/addedit') }}">Add New Filearea</a></td>
|
||||
</tr>
|
||||
@endcan
|
||||
@foreach (\App\Models\Filearea::orderBy('name')->with(['domain'])->get() as $oo)
|
||||
<tr>
|
||||
<td><a href="{{ url('ftn/filearea/addedit',[$oo->id]) }}">{{ $oo->id }}</a></td>
|
||||
<td>{{ $oo->name }}</td>
|
||||
<td>{{ $oo->description }}</td>
|
||||
<td>{{ $oo->active ? 'YES' : 'NO' }}</td>
|
||||
<td>{{ $oo->domain->name }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$('table tr').click(function() {
|
||||
var href = $(this).find('a').attr('href');
|
||||
|
||||
if (href)
|
||||
window.location = href;
|
||||
});
|
||||
</script>
|
||||
@append
|
@@ -5,7 +5,9 @@
|
||||
<dt>Network Admin</dt>
|
||||
<dd><a href="{{ url('ftn/domain') }}">Domains</a></dd>
|
||||
<dd><a href="{{ url('ftn/system') }}">Systems</a></dd>
|
||||
<dd><a href="{{ url('ftn/zone') }}" >Zones</a></dd>
|
||||
<dd><a href="{{ url('ftn/zone') }}">Zones</a></dd>
|
||||
<dd><a href="{{ url('ftn/echoarea') }}">Echoareas</a></dd>
|
||||
<dd><a href="{{ url('ftn/filearea') }}">Fileareas</a></dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
|
Reference in New Issue
Block a user