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.

54 lines
2.0 KiB

  1. @extends('adjunctadditions')
  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> -> {{ __('Adjunct Additions') }}<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('adjunctadditions.create') }}" class="btn btn-primary">Add Adjunct Addition</a>
  12. @endif
  13. <table class="table table-striped table-dark" id="table-programs">
  14. <!-- This piece of code is for error messages display purposes -->
  15. @include('inc.messages')
  16. <thead>
  17. <tr>
  18. <th scope="col">Adjunct</th>
  19. <th scope="col">Beer</th>
  20. <th scope="col">Amount</th>
  21. <th scope="col">Timing</th>
  22. <th scope="col">Alternative</th>
  23. <th scope="col">Notes</th>
  24. @if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif
  25. <tbody>
  26. @foreach ($adjunctadditions as $adjunctaddition)
  27. <tr>
  28. <td><a href="/adjunct/{{$adjunctaddition->adjunct_id}}">{{$adjunctaddition->name}}</a> </td>
  29. <td><a href="/beer/{{$adjunctaddition->beer_id}}">{{$adjunctaddition->beer}}</a> </td>
  30. <td>{{$adjunctaddition->amount}} </td>
  31. <td>{{$adjunctaddition->timing}} </td>
  32. <td><a href="/adjunct/{{$adjunctaddition->alternative}}">{{$adjunctaddition->alternativename}}</a> </td>
  33. <td>{{$adjunctaddition->notes}} </td>
  34. @if (Auth::user()->isAdmin())
  35. <td><a href="{{ route('adjunctadditions.edit',$adjunctaddition->id)}}" class="btn btn-primary">Edit</a></td>
  36. <td><form action="{{ route('adjunctadditions.destroy', $adjunctaddition->id)}}" method="post">
  37. @csrf
  38. @method('DELETE')
  39. <button class="btn btn-danger" type="submit">Delete</button>
  40. </form></td>
  41. @endif
  42. </tr>
  43. @endforeach
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. @endsection