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.

60 lines
2.0 KiB

3 years ago
  1. @extends('layouts.app')
  2. @section('content')
  3. <div class="container">
  4. <div class="row justify-content-center">
  5. <div class="col-md-8">
  6. <div class="card">
  7. @include('inc.navbar')
  8. <div class="card-header"><a href="/home">Home</a> -> {{ __('Adjunct List') }}<span class="backlink"><a href="{{url()->previous()}}">Go Back</a></span></div>
  9. <div class="card-body">
  10. @if (Auth::user()->isAdmin())
  11. <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#addModal" type="button" name="button" >
  12. Add Adjunct
  13. </button>
  14. <hr />
  15. @endif
  16. <table class="table table-striped table-dark" id="table-programs">
  17. <!-- This piece of code is for error messages display purposes -->
  18. @include('inc.messages')
  19. <tbody>
  20. @foreach ($adjuncts as $adjunct)
  21. <tr>
  22. <td><a href="/adjunct/{{$adjunct->id}}">{{$adjunct->name}}</a> </td>
  23. </tr>
  24. @endforeach
  25. </tbody>
  26. </table>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. <!-- this code if for the modal -->
  33. <div class="modal fade bg-primary text-dark" tabindex="-1" role="dialog" id="addModal">
  34. <div class="modal-dialog" role="document">
  35. <div class="modal-content">
  36. <div class="modal-header">
  37. <h5 class="modal-title">Add Adjunct</h5>
  38. <button type="button" class="close" data-dismiss="modal" aria-label="Close" >
  39. <span aria-hidden="true">x</span>
  40. </button>
  41. </div>
  42. <div class="modal-body">
  43. <form class="" action="{{route('adjuncts.store')}}" method="post">
  44. {{csrf_field()}}
  45. <div class="form-group">
  46. <label for="">Name</label>
  47. <input type="text" class="form-control" name="name">
  48. </div>
  49. <input type="submit" name="submit" value="Submit" class="btn btn-success">
  50. </form>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. @endsection