Web frontend work
This commit is contained in:
73
resources/views/zone/addedit.blade.php
Normal file
73
resources/views/zone/addedit.blade.php
Normal file
@@ -0,0 +1,73 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
@if($o->exists) Update @else Add @endif Zone
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
<div class="pb-3">
|
||||
<h2>@if($o->exists) Update @else Add @endif Zone</h2>
|
||||
|
||||
<form method="POST">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9 m-auto">
|
||||
<div class="bg-blue">
|
||||
<div class="row m-3">
|
||||
<label class="col-3" for="zone_id">Zone:</label>
|
||||
<input class="col-2" type="text" name="zone_id" value="{{ $o->zone_id }}">
|
||||
</div>
|
||||
|
||||
<div class="row m-3">
|
||||
<label class="col-3" for="name">Name:</label>
|
||||
<input class="col-9" type="text" name="name" value="{{ $o->name }}">
|
||||
</div>
|
||||
|
||||
<div class="row m-3">
|
||||
<label class="col-3" for="domain_id">Domain:</label>
|
||||
<select class="col-3" name="domain_id">
|
||||
<option value=""> </option>
|
||||
@foreach (\App\Models\Domain::active()->cursor() as $oo)
|
||||
<option value="{{ $oo->id }}" @if($o->domain_id==$oo->id)selected @endif>{{ $oo->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="row m-3">
|
||||
<label class="col-3" for="description">Description:</label>
|
||||
<input class="col-9" type="text" name="description" value="{{ $o->description }}">
|
||||
</div>
|
||||
|
||||
<div class="row m-3">
|
||||
<label class="col-3" for="active">Active:</label>
|
||||
<div class="form-group col-3">
|
||||
<div class="custom-control custom-radio mb-3">
|
||||
<input type="radio" class="custom-control-input" name="active" id="active_yes" value="1" required @if($o->active)checked @endif>
|
||||
<label class="custom-control-label" for="active_yes">Yes</label>
|
||||
</div>
|
||||
|
||||
<div class="custom-control custom-radio mb-3">
|
||||
<input type="radio" class="custom-control-input" name="active" id="active_no" value="0" required @if(! $o->active)checked @endif>
|
||||
<label class="custom-control-label" for="active_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-3">
|
||||
<label class="col-3" for="notes">Notes:</label>
|
||||
<textarea class="col-9" rows=3 cols=68 name="notes" placeholder="Notes...">{{ $o->notes }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="row m-3">
|
||||
<div class="col-12">
|
||||
<button type="submit" name="submit" class="btn btn-lg btn-success mr-0 float-right">@if ($o->exists)Save @else Add @endif</button>
|
||||
<a href="{{ url('/') }}" class="btn btn-lg btn-primary float-right">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
45
resources/views/zone/home.blade.php
Normal file
45
resources/views/zone/home.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('main-content')
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<table class="table table-bordered m-5">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Active</th>
|
||||
<th>Zone</th>
|
||||
<th>Domain</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="4"><a href="{{ url('ftn/zone/addedit') }}">Add New Zone</a></td>
|
||||
</tr>
|
||||
@foreach (\App\Models\Zone::cursor() as $oo)
|
||||
<tr>
|
||||
<td><a href="{{ url('ftn/zone/addedit',[$oo->id]) }}">{{ $oo->zone_id }}</a></td>
|
||||
<td>{{ $oo->active ? 'YES' : 'NO' }}</td>
|
||||
<td>{{ $oo->name }}</td>
|
||||
<td>{{ $oo->domain->name }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('table tr').click(function() {
|
||||
var href = $(this).find("a").attr("href");
|
||||
if(href) {
|
||||
window.location = href;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
Reference in New Issue
Block a user