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.
		
		
		
		
		
			
		
			
				
					
					
						
							117 lines
						
					
					
						
							4.3 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							117 lines
						
					
					
						
							4.3 KiB
						
					
					
				
								@extends('layouts.app')
							 | 
						|
								
							 | 
						|
								@section('content')
							 | 
						|
								<div class="container">
							 | 
						|
								    <div class="row justify-content-center">
							 | 
						|
								        <div class="col-md-8">
							 | 
						|
								            <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())
							 | 
						|
								          <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#addModal" type="button" name="button" >
							 | 
						|
								            Add Hop
							 | 
						|
								          </button>
							 | 
						|
								          <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>
							 | 
						|
								              </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>
							 | 
						|
								              </tr>
							 | 
						|
								            @endforeach
							 | 
						|
								            </tbody>
							 | 
						|
								          </table>
							 | 
						|
								                </div>
							 | 
						|
								            </div>
							 | 
						|
								        </div>
							 | 
						|
								    </div>
							 | 
						|
								</div>
							 | 
						|
								
							 | 
						|
								<!-- this code if for the modal -->
							 | 
						|
								<div class="modal fade bg-primary text-dark" tabindex="-1" role="dialog" id="addModal">
							 | 
						|
								  <div class="modal-dialog" role="document">
							 | 
						|
								    <div class="modal-content">
							 | 
						|
								      <div class="modal-header">
							 | 
						|
								        <h5 class="modal-title">Add Hop</h5>
							 | 
						|
								        <button type="button" class="close" data-dismiss="modal" aria-label="Close" >
							 | 
						|
								          <span aria-hidden="true">x</span>
							 | 
						|
								        </button>
							 | 
						|
								      </div>
							 | 
						|
								      <div class="modal-body">
							 | 
						|
								        <form class="" action="{{route('hops.store')}}" method="post">
							 | 
						|
								          {{csrf_field()}}
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Name</label>
							 | 
						|
								                <input type="text" class="form-control" name="name">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Bittering?</label>
							 | 
						|
										<input type="checkbox" class="form-control" name="bitter">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Aroma?</label>
							 | 
						|
										<input type="checkbox" class="form-control" name="aroma">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Profile</label>
							 | 
						|
										<textarea type="text" class="form-control" name="profile" ></textarea>
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Alpha-Acid %</label>
							 | 
						|
								                <input type="text" class="form-control" name="alpha_acid">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Beta-Acid %</label>
							 | 
						|
								                <input type="text" class="form-control" name="beta_acid">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Total Oil %</label>
							 | 
						|
								                <input type="text" class="form-control" name="total_oil">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Cohumulone %</label>
							 | 
						|
								                <input type="text" class="form-control" name="cohumulone">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Myrcene %</label>
							 | 
						|
								                <input type="text" class="form-control" name="myrcene">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Humulene %</label>
							 | 
						|
								                <input type="text" class="form-control" name="humulene">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Farnesene %</label>
							 | 
						|
								                <input type="text" class="form-control" name="farnesene">
							 | 
						|
								          </div>
							 | 
						|
								          <div class="form-group">
							 | 
						|
								            <label for="">Caryophyllene</label>
							 | 
						|
								                <input type="text" class="form-control" name="caryophyllene">
							 | 
						|
								          </div>
							 | 
						|
								          <input type="submit" name="submit" value="Submit" class="btn btn-success">
							 | 
						|
								        </form>
							 | 
						|
								      </div>
							 | 
						|
								    </div>
							 | 
						|
								  </div>
							 | 
						|
								</div>
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								@endsection
							 |