2018-09-14 15:52:07 +00:00
|
|
|
@if ($item->used_by == \Auth::id())
|
|
|
|
<span class="float-right">
|
2018-09-15 03:22:57 +00:00
|
|
|
<form action="/take" method="POST">
|
2018-09-14 15:52:07 +00:00
|
|
|
{{ csrf_field() }}
|
2018-09-15 03:22:57 +00:00
|
|
|
@method('DELETE')
|
2018-09-14 15:52:07 +00:00
|
|
|
<input type="hidden" name="item" value="{{$item->id}}">
|
|
|
|
<button type="submit" class="btn btn-sm btn-danger">Return It</button>
|
|
|
|
</form>
|
|
|
|
</span>
|
|
|
|
<span class="float-right mr-3"><em>{{\Carbon\Carbon::parse($item->updated_at)->diffForHumans()}}</em></span>
|
2018-09-15 03:22:57 +00:00
|
|
|
|
|
|
|
|
2018-09-14 15:52:07 +00:00
|
|
|
@else
|
|
|
|
<span class="float-right">
|
|
|
|
<form action="/alert" method="POST">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
<input type="hidden" name="item" value="{{$item->id}}">
|
2018-09-15 05:09:07 +00:00
|
|
|
@if ($item->waiting_user_id == \Auth::id())
|
|
|
|
@method('DELETE')
|
|
|
|
<button type="submit" class="btn btn-sm btn-outline-danger">Cancel Alert</button>
|
|
|
|
@elseif (!$item->waiting_user_id)
|
|
|
|
<button type="submit" class="btn btn-sm btn-outline-secondary">Alert me</button>
|
|
|
|
@endif
|
2018-09-14 15:52:07 +00:00
|
|
|
</form>
|
|
|
|
</span>
|
|
|
|
<span class="float-right mr-3">
|
2018-09-15 05:09:07 +00:00
|
|
|
<em>
|
|
|
|
{{str_limit($users[$item->used_by], 15, '...')}}
|
|
|
|
@if ($item->waiting_user_id && $item->waiting_user_id != \Auth::id())
|
|
|
|
<strong>> {{str_limit($users[$item->waiting_user_id], 15, '...')}}</strong>
|
|
|
|
@endif
|
|
|
|
<small>({{$item->updated_at->diffForHumans()}})</small>
|
|
|
|
</em>
|
2018-09-14 15:52:07 +00:00
|
|
|
</span>
|
|
|
|
@endif
|