You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.8 KiB
83 lines
2.8 KiB
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8">
|
|
<div class="card">
|
|
@include('inc.navbar')
|
|
<div class="card-header"><a href="/home">Home</a> -> {{ __('Hop Additions') }}<span class="backlink"><a href="{{url()->previous()}}">Go Back</a></span></div>
|
|
|
|
<div class="card-body">
|
|
@if (Auth::user()->isAdmin())
|
|
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#addModal" type="button" name="button" >
|
|
Add Hop Addition
|
|
</button>
|
|
<hr/>
|
|
@endif
|
|
<table class="table table-striped table-dark" id="table-programs">
|
|
<!-- This piece of code is for error messages display purposes -->
|
|
@include('inc.messages')
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">Beer ID</th>
|
|
<th scope="col">Hop ID</th>
|
|
<th scope="col">Amount</th>
|
|
<th scope="col">Timing</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
@foreach ($hopadditions as $hopaddition)
|
|
<tr>
|
|
<td>{{$hopaddition->beer_id}} </td>
|
|
<td>{{$hopaddition->hop_id}} </td>
|
|
<td>{{$hopaddition->amount}} </td>
|
|
<td>{{$hopaddition->timing}} </td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- this code if for the modal -->
|
|
<div class="modal fade bg-primary text-dark" tabindex="-1" role="dialog" id="addModal">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">Add Hop Addition</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" >
|
|
<span aria-hidden="true">x</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form class="" action="{{route('hopadditions.store')}}" method="post">
|
|
{{csrf_field()}}
|
|
<div class="form-group">
|
|
<label for="">Beer ID</label>
|
|
<input type="text" class="form-control" name="beer_id">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Hop ID</label>
|
|
<input type="text" class="form-control" name="hop_id" >
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Amount</label>
|
|
<input type="text" class="form-control" name="amount">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Timing</label>
|
|
<input type="text" class="form-control" name="timing">
|
|
</div>
|
|
<input type="submit" name="submit" value="Submit" class="btn btn-success">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection
|