From 51ee7c2ef34fd5e81d56f18f26790f966e873da2 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Thu, 20 Sep 2018 20:37:21 -0300 Subject: [PATCH] Changing home layout from FLOAT to GRID --- resources/views/home.blade.php | 41 +++++++++-------- resources/views/home/unusedItem.blade.php | 12 ++--- resources/views/home/usedItem.blade.php | 56 +++++++++++------------ 3 files changed, 53 insertions(+), 56 deletions(-) diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 6398800..78c2fe8 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -8,34 +8,37 @@
Your items
@if (session('status')) - + @endif @forelse ($items as $item) - @if (!$loop->first) -
- @endif -
+ @if (!$loop->first) +
+ @endif +
+
@if ($item->product->url) - - @endif + + @endif - {{$item->name}} ({{$item->product->name}}) + {{$item->name}} ({{$item->product->name}}) - @if ($item->product->url) - - @endif - - @if ($item->used_by) - @include('home.usedItem') - @else - @include('home.unusedItem') + @if ($item->product->url) + @endif
+
+ @if ($item->used_by) + @include('home.usedItem') + @else + @include('home.unusedItem') + @endif +
+
@empty -

There are no items shared with you yet. Share an item!

+

There are no items shared with you yet. Share an item!

@endforelse
diff --git a/resources/views/home/unusedItem.blade.php b/resources/views/home/unusedItem.blade.php index 2d4d8b6..3aefc6e 100644 --- a/resources/views/home/unusedItem.blade.php +++ b/resources/views/home/unusedItem.blade.php @@ -1,7 +1,5 @@ - -
- {{ csrf_field() }} - - -
-
\ No newline at end of file +
+ {{ csrf_field() }} + + +
\ No newline at end of file diff --git a/resources/views/home/usedItem.blade.php b/resources/views/home/usedItem.blade.php index 5a5b4c3..dcfe35f 100644 --- a/resources/views/home/usedItem.blade.php +++ b/resources/views/home/usedItem.blade.php @@ -1,35 +1,31 @@ @if ($item->used_by == \Auth::id()) - -
- {{ csrf_field() }} - @method('DELETE') - - -
-
- {{\Carbon\Carbon::parse($item->updated_at)->diffForHumans()}} +
+ {{\Carbon\Carbon::parse($item->updated_at)->diffForHumans()}} +
+ {{ csrf_field() }} + @method('DELETE') + + +
@else - -
- {{ csrf_field() }} - - @if ($item->waiting_user_id == \Auth::id()) - @method('DELETE') - - @elseif (!$item->waiting_user_id) - - @endif -
-
- - - {{str_limit($users[$item->used_by], 15, '...')}} - @if ($item->waiting_user_id && $item->waiting_user_id != \Auth::id()) - > {{str_limit($users[$item->waiting_user_id], 15, '...')}} - @endif - ({{$item->updated_at->diffForHumans()}}) - - +
+ + {{str_limit($users[$item->used_by], 15, '...')}} + @if ($item->waiting_user_id && $item->waiting_user_id != \Auth::id()) + > {{str_limit($users[$item->waiting_user_id], 15, '...')}} + @endif + ({{$item->updated_at->diffForHumans()}}) + +
+ {{ csrf_field() }} + + @if ($item->waiting_user_id == \Auth::id()) + @method('DELETE') + + @elseif (!$item->waiting_user_id) + + @endif +
@endif \ No newline at end of file