mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-23 20:10:52 +00:00
Changing home layout from FLOAT to GRID
This commit is contained in:
parent
36b62ffc8b
commit
51ee7c2ef3
@ -17,7 +17,8 @@
|
||||
@if (!$loop->first)
|
||||
<hr class="m-3">
|
||||
@endif
|
||||
<div class="my-4 p-2">
|
||||
<div class="row align-items-center p-2">
|
||||
<div class="col col-xs-auto">
|
||||
@if ($item->product->url)
|
||||
<a href="{{$item->product->url}}" class="link-unstyled" target="_blank" rel="noopener noreferrer">
|
||||
@endif
|
||||
@ -27,13 +28,15 @@
|
||||
@if ($item->product->url)
|
||||
</a>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="align-self-end text-right">
|
||||
@if ($item->used_by)
|
||||
@include('home.usedItem')
|
||||
@else
|
||||
@include('home.unusedItem')
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<p>There are no items shared with you yet. <a href="/product">Share an item!</a></p>
|
||||
@endforelse
|
||||
|
@ -1,7 +1,5 @@
|
||||
<span class="float-right">
|
||||
<form action="/take" method="POST">
|
||||
<form action="/take" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" name="item" value="{{$item->id}}">
|
||||
<button type="submit" class="btn btn-sm btn-success">Take It</button>
|
||||
</form>
|
||||
</span>
|
||||
</form>
|
@ -1,35 +1,31 @@
|
||||
@if ($item->used_by == \Auth::id())
|
||||
<span class="float-right">
|
||||
<form action="/take" method="POST">
|
||||
<form action="/take" method="POST" class="form-inline">
|
||||
<em class="pr-sm-2 ml-auto">{{\Carbon\Carbon::parse($item->updated_at)->diffForHumans()}}</em>
|
||||
<div class="w-100 d-xm-block d-sm-none"></div>
|
||||
{{ csrf_field() }}
|
||||
@method('DELETE')
|
||||
<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>
|
||||
<button type="submit" class="btn btn-sm btn-danger ml-auto">Return It</button>
|
||||
</form>
|
||||
|
||||
|
||||
@else
|
||||
<span class="float-right">
|
||||
<form action="/alert" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" name="item" value="{{$item->id}}">
|
||||
@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
|
||||
</form>
|
||||
</span>
|
||||
<span class="float-right mr-3">
|
||||
<em>
|
||||
<form action="/alert" method="POST" class="form-inline">
|
||||
<em class="pr-sm-2 ml-auto">
|
||||
{{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>
|
||||
</span>
|
||||
<div class="w-100 d-xm-block d-sm-none"></div>
|
||||
{{ csrf_field() }}
|
||||
<input type="hidden" name="item" value="{{$item->id}}">
|
||||
@if ($item->waiting_user_id == \Auth::id())
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger ml-auto">Cancel Alert</button>
|
||||
@elseif (!$item->waiting_user_id)
|
||||
<button type="submit" class="btn btn-sm btn-outline-secondary ml-auto">Alert me</button>
|
||||
@endif
|
||||
</form>
|
||||
@endif
|
Loading…
Reference in New Issue
Block a user