Skip to content

Commit

Permalink
Display order type control and timeslot in mobile view only
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi committed Dec 9, 2020
1 parent 409c276 commit a226b42
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
19 changes: 12 additions & 7 deletions components/localbox/container.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
<div class="panel local-search">
<div class="panel-body">
<div class="row">
<div class="col-sm-{{ $hideSearch ? '12' : '4' }} mb-3 mb-sm-0">
<div id="local-timeslot">
@partial('@timeslot')
</div>
</div>
@if (!$hideSearch)
<div class="col-sm-8">
<div class="col-sm-12">
@partial('@searchbar')
</div>
@endif
<div class="col-sm-12{{ $hideSearch ? '' : ' mt-3 mt-sm-0' }} d-block d-sm-none">
<div class="local-timeslot">
@partial('@timeslot')
</div>
</div>
<div class="col-sm-12 mt-3 mt-sm-0 d-block d-sm-none">
<div class="local-control">
@partial('@control')
</div>
</div>
</div>
@if ($location->requiresUserPosition()
AND $location->userPosition()->hasCoordinates()
Expand All @@ -22,4 +27,4 @@
</div>

@partial($__SELF__.'::default')
</div>
</div>
8 changes: 4 additions & 4 deletions components/localbox/control.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
$collectionTime = make_carbon($location->collectionSchedule()->getOpenTime());
@endphp
<div
class="btn-group btn-group-toggle w-100 text-center order-type"
class="btn-group btn-group-toggle w-100 text-center"
data-toggle="buttons"
data-control="order-type-toggle"
data-handler="{{ $orderTypeEventHandler }}"
>
@if ($locationCurrent->hasDelivery())
<label
class="btn btn-light {{ $location->orderTypeIsDelivery() ? 'active' : '' }}">
class="btn btn-light w-50 {{ $location->orderTypeIsDelivery() ? 'active' : '' }}">
<input
type="radio"
name="order_type"
Expand All @@ -30,7 +30,7 @@ class="btn btn-light {{ $location->orderTypeIsDelivery() ? 'active' : '' }}">
</label>
@endif
@if ($locationCurrent->hasCollection())
<label class="btn btn-light {{ $location->orderTypeIsCollection() ? 'active' : '' }}">
<label class="btn btn-light w-50 {{ $location->orderTypeIsCollection() ? 'active' : '' }}">
<input
type="radio"
name="order_type"
Expand All @@ -52,7 +52,7 @@ class="small center-block">
@endif
</div>
@if ($location->orderTypeIsDelivery())
<p class="text-muted text-center">
<p class="text-muted text-center my-2">
@if ($minOrderTotal = $location->minimumOrder($cart->subtotal()))
@lang('igniter.local::default.text_min_total'): {{ currency_format($minOrderTotal) }}
@else
Expand Down
2 changes: 1 addition & 1 deletion components/locallist/list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ class="text-muted small"
</div>
</div>
</a>
@endforeach
@endforeach

0 comments on commit a226b42

Please sign in to comment.