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.
109 lines
6.6 KiB
109 lines
6.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 $grains) {{print_r($grains)}} @foreach($grains as $grain) {{print_r($grain)}} @endforeach @endforeach</td>
|
|
<td class="hideable">Hops </td>
|
|
<td class="hideable">Yeasts </td>
|
|
<td class="hideable">Asjuncts </td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div role="tabpanel" class="tab-pane fade" id="processes" aria-labelledby="processes-tab"></div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection
|