Browse Source

first iteration of search functionality - likely to fail hard

master
jk 3 years ago
parent
commit
ac0add1620
  1. 30
      resources/views/search/results.blade.php

30
resources/views/search/results.blade.php

@ -25,7 +25,7 @@
<tr>
<th scope="col">@sortablelink('name', 'Beer')</th>
<th scope="col">Brewery</th>
<th scope="col" class="hideable">@sortablelink('type', 'Style')</th>
<th scope="col" class="hideable">Style</th>
</tr>
</thead>
<tbody>
@ -71,7 +71,33 @@
</tbody>
</table>
</div>
<div role="tabpanel" class="tab-pane fade" id="ingredients" aria-labelledby="ingredients-tab"></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>{{$result->abv}} </td>
<td class="hideable">@foreach ($result->grains as $grain) <a href="/grain/{{$grain->id}}">{{$grain->name}}</a><br/>@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

Loading…
Cancel
Save