My beer compendium
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.
 
 
 
 
 
 

130 lines
8.6 KiB

@extends('search')
@section('main')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card">
@include('inc.navbar')
<div class="card-header"><a href="/home">Home</a> -> {{ __('Search Results') }}<span class="backlink"><a href="{{url()->previous()}}">Go Back</a></span></div>
<div class="card-body">
@if ($table == "summarie")
<div role="tabpanel">
<div class="nav nav-tabs" role="tablist" id="nav-tab">
<a href="#overview" class="nav-link active" aria-controls="nav-overview" role="tab" data-toggle="tab" aria-selected="true">Overview</a>
<a href="#stats" class="nav-link" aria-controls="nav-stats" role="nav-stats" data-toggle="tab" aria-selected="false">Stats</a>
<a href="#ingredients" class="nav-link" aria-controls="nav-ingredients" role="nav-ingredients" data-toggle="tab" aria-selected="false">Ingredients</a>
<a href="#processes" class="nav-link" aria-controls="nav-processes" role="nav-processes" data-toggle="tab" aria-selected="false">Processes</a>
</div>
<div class="tab-content">
<div role="tabpanel" class="tab-pane fade show active" id="overview" aria-labelledby="overview-tab">
<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">@sortablelink('name', 'Beer')</th>
<th scope="col">Brewery</th>
<th scope="col" class="hideable">Style</th>
</tr>
</thead>
<tbody>
@foreach ($results as $result)
<tr>
<td><a href="/beer/{{$result->beer_id}}">{{$result->name}}</a> </td>
<td><a href="/brewery/{{$result->brewery_id}}">{{$result->brewery}}</a> </td>
<td class="hideable">{{$result->type}} </td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div role="tabpanel" class="tab-pane fade" id="stats" aria-labelledby="stats-tab">
<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">@sortablelink('name', 'Beer')</th>
<th scope="col">ABV</th>
<th scope="col" class="hideable">OG</th>
<th scope="col" class="hideable">FG</th>
<th scope="col" class="hideable">IBU</th>
<th scope="col" class="hideable">EBC</th>
<th scope="col" class="hideable">SRM</th>
<th scope="col" class="hideable">pH</th>
</tr>
</thead>
<tbody>
@foreach ($results as $result)
<tr>
<td><a href="/beer/{{$result->beer_id}}">{{$result->name}}</a> </td>
<td>{{$result->abv}} </td>
<td class="hideable">{{$result->og}} </td>
<td class="hideable">{{$result->fg}} </td>
<td class="hideable">{{$result->ibu}} </td>
<td class="hideable">{{$result->ebc}} </td>
<td class="hideable">{{$result->srm}} </td>
<td class="hideable">{{$result->ph}} </td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div role="tabpanel" class="tab-pane fade" id="ingredients" aria-labelledby="ingredients-tab">
<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">@sortablelink('name', 'Beer')</th>
<th scope="col">Grains</th>
<th scope="col" class="hideable">Hops</th>
<th scope="col" class="hideable">Yeast</th>
<th scope="col" class="hideable">Adjuncts</th>
</tr>
</thead>
<tbody>
@foreach ($results as $result)
<tr>
<td><a href="/beer/{{$result->beer_id}}">{{$result->name}}</a> </td>
<td class="hideable">@foreach($result->grains as $grain)<a href="/grain/{{$grain['id']}}">{{$grain['name']}}</a><span style="float:right;">({{$grain['grain_bill']}}%)</span><br/> @endforeach</td>
<td class="hideable">@foreach($result->hops as $hop)<a href="/hop/{{$hop['id']}}">{{$hop['name']}}</a><br/>@endforeach </td>
<td class="hideable">@foreach($result->yeasts as $yeast)<a href="/yeast/{{$yeast['id']}}">{{$yeast['name']}}</a><br/>@endforeach </td>
<td class="hideable">@foreach($result->adjuncts as $adjunct)<a href="/adjunct/{{$adjunct['id']}}">{{$adjunct['name']}}</a><br/>@endforeach </td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div role="tabpanel" class="tab-pane fade" id="processes" aria-labelledby="processes-tab">
<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">@sortablelink('name', 'Beer')</th>
<th scope="col">Mash</th>
<th scope="col" class="hideable">Hop Additions</th>
<th scope="col" class="hideable">Fermentation</th>
</tr>
</thead>
<tbody>
@foreach ($results as $result)
<tr>
<td><a href="/beer/{{$result->beer_id}}">{{$result->name}}</a> </td>
<td class="hideable">@foreach($result->mashes as $mash)Stage: {{$mash['stage']}} at {{$mash['temp']}}°C @if($mash['duration']) for {{$mash['duration']}}m @endif<br/> @endforeach</td>
<td class="hideable">{{$result->boil}}m boil with hop additions at: <br/> @foreach($result->hopadditions as $hopaddition) {{$hopaddition->timing}} @endforeach</td>
<td class="hideable">@foreach($result->fermentations as $fermentation)Stage: , {{$fermentation['temp']}}°C @if($fermentation['duration'])note: {{$fermenation['duration']}}@endif @endforeach </td>
</tr>
@endforeach
</div>
</div>
@endif
</div>
</div>
</div>
</div>
</div>
@endsection