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.
110 lines
3.9 KiB
110 lines
3.9 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> -> {{ __('Beer List') }}<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 Beer
|
|
</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">Name</th>
|
|
<th scope="col">Brewery</th>
|
|
<th scope="col">Style</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
@foreach ($summaries as $summary)
|
|
<tr>
|
|
<td><a href="/beer/{{$summary->beer_id}}">{{$summary->name}}</a> </td>
|
|
<td><a href="/brewery/{{$summary->brewery_id}}">{{$summary->brewery}}</a> </td>
|
|
<td>{{$summary->type}} </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 Beer</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('beers.store')}}" method="post">
|
|
{{csrf_field()}}
|
|
<div class="form-group">
|
|
<label for="">Name</label>
|
|
<input type="text" class="form-control" name="name">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Keywords</label>
|
|
<textarea type="text" class="form-control" name="keywords" ></textarea>
|
|
</div>
|
|
<div class="Type">
|
|
<label for="">Colour</label>
|
|
<input type="text" class="form-control" name="type">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">ABV %</label>
|
|
<input type="text" class="form-control" name="abv">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Original Gravity (OG)</label>
|
|
<input type="text" class="form-control" name="og">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Final Gravity (FG)</label>
|
|
<input type="text" class="form-control" name="fg">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Source</label>
|
|
<input type="text" class="form-control" name="source">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Notes</label>
|
|
<textarea type="text" class="form-control" name="notes"></textarea>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Brewery ID</label>
|
|
<input type="text" class="form-control" name="brewery_id">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Batch Size (L)</label>
|
|
<input type="text" class="form-control" name="batch">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="">Mine?</label>
|
|
<input type="checkbox" class="form-control" name="mine" checked>
|
|
</div>
|
|
<input type="submit" name="submit" value="Submit" class="btn btn-success">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@endsection
|