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.

49 lines
1.7 KiB

  1. @extends('fermentations')
  2. @section('main')
  3. <div class="container">
  4. <div class="row justify-content-center">
  5. <div class="col-md-12">
  6. <div class="card">
  7. @include('inc.navbar')
  8. <div class="card-header"><a href="/home">Home</a> -> {{ __('Fermentation Instructions') }}<span class="backlink"><a href="{{url()->previous()}}">Go Back</a></span></div>
  9. <div class="card-body">
  10. @if (Auth::user()->isAdmin())
  11. <a href="{{ route('fermentations.create') }}" class="btn btn-primary">Add Fermentation Step</a>
  12. <hr/>
  13. @endif
  14. <table class="table table-striped table-dark" id="table-programs">
  15. <!-- This piece of code is for error messages display purposes -->
  16. @include('inc.messages')
  17. <thead>
  18. <tr>
  19. <th scope="col">Yeast</th>
  20. <th scope="col">Beer</th>
  21. <th scope="col">Temperature</th>
  22. @if (Auth::user()->isAdmin())<th scope="col">Admin</th>@endif
  23. <tbody>
  24. @foreach ($fermentations as $fermentation)
  25. <tr>
  26. <td><a href="/yeast/{{$fermentation->yeast_id}}">{{$fermentation->name}}</a> </td>
  27. <td><a href="/beer/{{$fermentation->beer_id}}">{{$fermentation->beer}}</a> </td>
  28. <td>{{$fermentation->temperature}} </td>
  29. @if (Auth::user()->isAdmin())
  30. <td><span id="buttons"><a href="{{ route('fermentations.edit',$fermentation->id)}}" class="btn btn-primary editbutton">Edit</a>
  31. <form action="{{ route('fermentations.destroy', $fermentation->id)}}" method="post">
  32. @csrf
  33. @method('DELETE')
  34. <button class="btn btn-danger deletebutton" type="submit">Delete</button>
  35. </form></span></td>
  36. @endif
  37. </tr>
  38. @endforeach
  39. </tbody>
  40. </table>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. @endsection