Browse Source

Restructure views and layout for customer detail page

pull/6/head
Nafies Luthfi 8 years ago
parent
commit
2f50a72cb8
  1. 7
      resources/views/customers/partials/nav-tabs.blade.php
  2. 14
      resources/views/customers/show.blade.php
  3. 16
      resources/views/layouts/customer.blade.php

7
resources/views/customers/partials/nav-tabs.blade.php

@ -0,0 +1,7 @@
<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="{{ Request::segment(3) == null ? 'active' : '' }}">
{!! link_to_route('customers.show', trans('customer.show'), [$customer]) !!}
</li>
</ul>
<br>

14
resources/views/customers/show.blade.php

@ -1,16 +1,6 @@
@extends('layouts.app')
@extends('layouts.customer')
@section('title', trans('customer.show'))
@section('content')
<h1 class="page-header">
<div class="pull-right">
{!! 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']) !!}
</div>
{{ $customer->name }} <small>{{ trans('customer.show') }}</small>
</h1>
@section('content-customer')
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="panel panel-default"> <div class="panel panel-default">

16
resources/views/layouts/customer.blade.php

@ -0,0 +1,16 @@
@extends('layouts.app')
@section('title', trans('customer.show'))
@section('content')
<h1 class="page-header">
<div class="pull-right">
{!! 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']) !!}
</div>
{{ $customer->name }} <small>{{ trans('customer.show') }}</small>
</h1>
@include('customers.partials.nav-tabs')
@yield('content-customer')
@endsection
Loading…
Cancel
Save