Browse Source

playing with mobile display for tables

master
jk 3 years ago
parent
commit
e43621b990
  1. 22
      resources/views/adjunctadditions/index.blade.php
  2. 18
      resources/views/breweries/index.blade.php
  3. 18
      resources/views/fermentations/index.blade.php
  4. 14
      resources/views/grainbills/index.blade.php
  5. 14
      resources/views/hopadditions/index.blade.php
  6. 22
      resources/views/hops/index.blade.php
  7. 18
      resources/views/mashes/index.blade.php

22
resources/views/adjunctadditions/index.blade.php

@ -21,26 +21,26 @@
<th scope="col">Adjunct</th>
<th scope="col">Beer</th>
<th scope="col">Amount</th>
<th scope="col">Timing</th>
<th scope="col">Alternative</th>
<th scope="col">Notes</th>
@if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif
<th scope="col" class="hideable">Timing</th>
<th scope="col" class="hideable">Alternative</th>
<th scope="col" class="hideable">Notes</th>
@if (Auth::user()->isAdmin())<th scope="col">Admin</th>@endif
<tbody>
@foreach ($adjunctadditions as $adjunctaddition)
<tr>
<td><a href="/adjunct/{{$adjunctaddition->adjunct_id}}">{{$adjunctaddition->name}}</a> </td>
<td><a href="/beer/{{$adjunctaddition->beer_id}}">{{$adjunctaddition->beer}}</a> </td>
<td>{{$adjunctaddition->amount}} </td>
<td>{{$adjunctaddition->timing}} </td>
<td><a href="/adjunct/{{$adjunctaddition->alternative}}">{{$adjunctaddition->alternativename}}</a> </td>
<td>{{$adjunctaddition->notes}} </td>
<td class="hideable">{{$adjunctaddition->timing}} </td>
<td class="hideable"><a href="/adjunct/{{$adjunctaddition->alternative}}">{{$adjunctaddition->alternativename}}</a> </td>
<td class="hideable">{{$adjunctaddition->notes}} </td>
@if (Auth::user()->isAdmin())
<td><a href="{{ route('adjunctadditions.edit',$adjunctaddition->id)}}" class="btn btn-primary">Edit</a></td>
<td><form action="{{ route('adjunctadditions.destroy', $adjunctaddition->id)}}" method="post">
<td><span id="buttons"><a href="{{ route('adjunctadditions.edit',$adjunctaddition->id)}}" class="btn btn-primary editbutton">Edit</a>
<form action="{{ route('adjunctadditions.destroy', $adjunctaddition->id)}}" method="post">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit">Delete</button>
</form></td>
<button class="btn btn-danger deletebutton" type="submit">Delete</button>
</form></span></td>
@endif
</tr>
@endforeach

18
resources/views/breweries/index.blade.php

@ -20,9 +20,9 @@
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">City\Region</th>
<th scope="col">Country</th>
@if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif
<th scope="col" class="hideable">City\Region</th>
<th scope="col" class="hideable">Country</th>
@if (Auth::user()->isAdmin())<th scope="col">Admin</th>@endif
</tr>
</thead>
@ -30,15 +30,15 @@
@foreach ($breweries as $brewery)
<tr>
<td><a href="/brewery/{{$brewery->id}}">{{$brewery->name}}</a> </td>
<td>{{$brewery->place}} </td>
<td>{{$brewery->country}} </td>
<td class="hideable">{{$brewery->place}} </td>
<td class="hideable">{{$brewery->country}} </td>
@if (Auth::user()->isAdmin())
<td><a href="{{ route('breweries.edit',$brewery->id)}}" class="btn btn-primary">Edit</a></td>
<td><form action="{{ route('breweries.destroy', $brewery->id)}}" method="post">
<td><span id="buttons"><a href="{{ route('breweries.edit',$brewery->id)}}" class="btn btn-primary editbutton">Edit</a>
<form action="{{ route('breweries.destroy', $brewery->id)}}" method="post">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit">Delete</button>
</form></td>
<button class="btn btn-danger deletebutton" type="submit">Delete</button>
</form></span></td>
@endif
</tr>
@endforeach

18
resources/views/fermentations/index.blade.php

@ -21,24 +21,24 @@
<th scope="col">Yeast</th>
<th scope="col">Beer</th>
<th scope="col">Temperature</th>
<th scope="col">Duration</th>
<th scope="col">Alternative</th>
@if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif
<th scope="col" class="hideable">Duration</th>
<th scope="col" class="hideable">Alternative</th>
@if (Auth::user()->isAdmin())<th scope="col">Admin</th>@endif
<tbody>
@foreach ($fermentations as $fermentation)
<tr>
<td><a href="/yeast/{{$fermentation->yeast_id}}">{{$fermentation->name}}</a> </td>
<td><a href="/beer/{{$fermentation->beer_id}}">{{$fermentation->beer}}</a> </td>
<td>{{$fermentation->temperature}} </td>
<td>{{$fermentation->duration}} </td>
<td>{{$fermentation->alternative}} </td>
<td class="hideable">{{$fermentation->duration}} </td>
<td class="hideable">{{$fermentation->alternative}} </td>
@if (Auth::user()->isAdmin())
<td><a href="{{ route('fermentations.edit',$fermentation->id)}}" class="btn btn-primary">Edit</a></td>
<td><form action="{{ route('fermentations.destroy', $fermentation->id)}}" method="post">
<td><span id="buttons"><a href="{{ route('fermentations.edit',$fermentation->id)}}" class="btn btn-primary editbutton">Edit</a>
<form action="{{ route('fermentations.destroy', $fermentation->id)}}" method="post">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit">Delete</button>
</form></td>
<button class="btn btn-danger deletebutton" type="submit">Delete</button>
</form></span></td>
@endif
</tr>
@endforeach

14
resources/views/grainbills/index.blade.php

@ -21,22 +21,22 @@
<th scope="col">Grain</th>
<th scope="col">Beer</th>
<th scope="col">Amount</th>
<th scope="col">% of Grain Bill</th>
@if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif
<th scope="col" class="hideable">% of Grain Bill</th>
@if (Auth::user()->isAdmin())<th scope="col">Admin</th>@endif
<tbody>
@foreach ($grainbills as $grainbill)
<tr>
<td><a href="/grain/{{$grainbill->grain_id}}">{{$grainbill->name}}</a> </td>
<td><a href="/beer/{{$grainbill->beer_id}}">{{$grainbill->beer}}</a> </td>
<td>{{$grainbill->amount}} </td>
<td>{{$grainbill->grain_bill}} </td>
<td class="hideable">{{$grainbill->grain_bill}} </td>
@if (Auth::user()->isAdmin())
<td><a href="{{ route('grainbills.edit',$grainbill->id)}}" class="btn btn-primary">Edit</a></td>
<td><form action="{{ route('grainbills.destroy', $grainbill->id)}}" method="post">
<td><span id="buttons"><a href="{{ route('grainbills.edit',$grainbill->id)}}" class="btn btn-primary editbutton">Edit</a>
<form action="{{ route('grainbills.destroy', $grainbill->id)}}" method="post">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit">Delete</button>
</form></td>
<button class="btn btn-danger deletebutton" type="submit">Delete</button>
</form></span></td>
@endif
</tr>
@endforeach

14
resources/views/hopadditions/index.blade.php

@ -21,8 +21,8 @@
<th scope="col">Beer</th>
<th scope="col">Hop</th>
<th scope="col">Amount</th>
<th scope="col">Timing</th>
@if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif
<th class="hideable" scope="col">Timing</th>
@if (Auth::user()->isAdmin())<th scope="col">Admin</th>@endif
</tr>
</thead>
@ -32,14 +32,14 @@
<td><a href="/beer/{{$hopaddition->beer_id}}">{{$hopaddition->beer}}</a> </td>
<td><a href="/hop/{{$hopaddition->hop_id}}">{{$hopaddition->hop}}</a> </td>
<td>{{$hopaddition->amount}} </td>
<td>{{$hopaddition->timing}} </td>
<td class="hideable">{{$hopaddition->timing}} </td>
@if (Auth::user()->isAdmin())
<td><a href="{{ route('hopadditions.edit',$hopaddition->id)}}" class="btn btn-primary">Edit</a></td>
<td><form action="{{ route('hopadditions.destroy', $hopaddition->id)}}" method="post">
<td><span id="buttons"><a href="{{ route('hopadditions.edit',$hopaddition->id)}}" class="btn btn-primary editbutton">Edit</a>
<form action="{{ route('hopadditions.destroy', $hopaddition->id)}}" method="post">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit">Delete</button>
</form></td>
<button class="btn btn-danger deletebutton" type="submit">Delete</button>
</form></span></td>
@endif
</tr>
@endforeach

22
resources/views/hops/index.blade.php

@ -19,10 +19,10 @@
<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
<th scope="col" class="hideable">Profile</th>
<th scope="col" class="hideable">Bittering?</th>
<th scope="col" class="hideable">Aroma?</th>
@if (Auth::user()->isAdmin())<th scope="col">Admin</th>@endif
</tr>
</thead>
@ -30,16 +30,16 @@
@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>
<td class="hideable">{{str_replace(' ,',',',str_replace('"',' ',str_replace(',',', ',str_replace('}', '', str_replace('{','',$hop->profile)))))}} </td>
<td class="hideable">@if($hop->bitter == 1) yes @else no @endif </td>
<td class="hideable">@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">
<td><span id="buttons"><a href="{{ route('hops.edit',$hop->id)}}" class="btn btn-primary editbutton">Edit</a>
<form action="{{ route('hops.destroy', $hop->id)}}" method="post">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit">Delete</button>
</form></td>
<button class="btn btn-danger deletebutton" type="submit">Delete</button>
</form></span></td>
@endif
</tr>
@endforeach

18
resources/views/mashes/index.blade.php

@ -21,24 +21,24 @@
<th scope="col">Beer</th>
<th scope="col">Temperature</th>
<th scope="col">Duration</th>
<th scope="col">Stage</th>
<th scope="col">Length of Boil</th>
@if (Auth::user()->isAdmin())<th colspan="2" scope="col">Admin</th>@endif
<th scope="col" class="hideable">Stage</th>
<th scope="col" class="hideable">Length of Boil</th>
@if (Auth::user()->isAdmin())<th scope="col">Admin</th>@endif
<tbody>
@foreach ($mashes as $mash)
<tr>
<td><a href="/beer/{{$mash->beer_id}}">{{$mash->beer}}</a> </td>
<td>{{$mash->temp}} </td>
<td>{{$mash->duration}} </td>
<td>{{$mash->stage}} </td>
<td>{{$mash->boil}} </td>
<td class="hideable">{{$mash->stage}} </td>
<td class="hideable">{{$mash->boil}} </td>
@if (Auth::user()->isAdmin())
<td><a href="{{ route('mashes.edit',$mash->id)}}" class="btn btn-primary">Edit</a></td>
<td><form action="{{ route('mashes.destroy', $mash->id)}}" method="post">
<td><span id="buttons"><a href="{{ route('mashes.edit',$mash->id)}}" class="btn btn-primary editbutton">Edit</a>
<form action="{{ route('mashes.destroy', $mash->id)}}" method="post">
@csrf
@method('DELETE')
<button class="btn btn-danger" type="submit">Delete</button>
</form></td>
<button class="btn btn-danger deletebutton" type="submit">Delete</button>
</form></span></td>
@endif
</tr>
@endforeach

Loading…
Cancel
Save