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
1.9 KiB
54 lines
1.9 KiB
@extends('hops')
|
|
|
|
@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> -> {{ __('Hop List') }}<span class="backlink"><a href="{{url()->previous()}}">Go Back</a></span></div>
|
|
|
|
<div class="card-body">
|
|
@if (Auth::user()->isAdmin())
|
|
<a href="{{ route('hops.create') }}" class="btn btn-primary">Add Hop</a>
|
|
<hr />
|
|
@endif
|
|
<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">Hop Name</th>
|
|
<th scope="col">Profile</th>
|
|
<th scope="col">Bittering?</th>
|
|
<th scope="col">Aroma?</th>
|
|
@if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
@foreach ($hops as $hop)
|
|
<tr>
|
|
<td><a href="/hop/{{$hop->id}}">{{$hop->name}}</a> </td>
|
|
<td>{{str_replace(' ,',',',str_replace('"',' ',str_replace(',',', ',str_replace('}', '', str_replace('{','',$hop->profile)))))}} </td>
|
|
<td>@if($hop->bitter == 1) yes @else no @endif </td>
|
|
<td>@if($hop->aroma == 1) yes @else no @endif </td>
|
|
@if (Auth::user()->isAdmin())
|
|
<td><a href="{{ route('hops.edit',$hop->id)}}" class="btn btn-primary">Edit</a></td>
|
|
<td><form action="{{ route('hops.destroy', $hop->id)}}" method="post">
|
|
@csrf
|
|
@method('DELETE')
|
|
<button class="btn btn-danger" type="submit">Delete</button>
|
|
</form></td>
|
|
@endif
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection
|