From 2f50a72cb8276429ce384c5c331bdab4578d80bb Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Sat, 27 Jan 2018 19:36:06 +0800 Subject: [PATCH] Restructure views and layout for customer detail page --- resources/views/customers/partials/nav-tabs.blade.php | 7 +++++++ resources/views/customers/show.blade.php | 14 ++------------ resources/views/layouts/customer.blade.php | 16 ++++++++++++++++ 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 resources/views/customers/partials/nav-tabs.blade.php create mode 100755 resources/views/layouts/customer.blade.php diff --git a/resources/views/customers/partials/nav-tabs.blade.php b/resources/views/customers/partials/nav-tabs.blade.php new file mode 100644 index 0000000..0e0abe1 --- /dev/null +++ b/resources/views/customers/partials/nav-tabs.blade.php @@ -0,0 +1,7 @@ + + +
diff --git a/resources/views/customers/show.blade.php b/resources/views/customers/show.blade.php index bfcb784..4501da6 100755 --- a/resources/views/customers/show.blade.php +++ b/resources/views/customers/show.blade.php @@ -1,16 +1,6 @@ -@extends('layouts.app') +@extends('layouts.customer') -@section('title', trans('customer.show')) - -@section('content') -

-
- {!! link_to_route('customers.edit', trans('customer.edit'), [$customer->id], ['id' => 'edit-customer-' . $customer->id, 'class' => 'btn btn-warning']) !!} - {!! link_to_route('customers.index', trans('customer.back_to_index'), [], ['class' => 'btn btn-default']) !!} -
- - {{ $customer->name }} {{ trans('customer.show') }} -

+@section('content-customer')
diff --git a/resources/views/layouts/customer.blade.php b/resources/views/layouts/customer.blade.php new file mode 100755 index 0000000..6909ab2 --- /dev/null +++ b/resources/views/layouts/customer.blade.php @@ -0,0 +1,16 @@ +@extends('layouts.app') + +@section('title', trans('customer.show')) + +@section('content') +

+
+ {!! link_to_route('customers.edit', trans('customer.edit'), [$customer->id], ['id' => 'edit-customer-' . $customer->id, 'class' => 'btn btn-warning']) !!} + {!! link_to_route('customers.index', trans('customer.back_to_index'), [], ['class' => 'btn btn-default']) !!} +
+ + {{ $customer->name }} {{ trans('customer.show') }} +

+@include('customers.partials.nav-tabs') +@yield('content-customer') +@endsection