Guest User

karyawan.blade.php

a guest
May 28th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.58 KB | None | 0 0
  1. @extends('template')
  2. @section('main')
  3. <div id="karyawan">
  4.   <h2>Data Karyawan</h2>
  5.   <div class=row>
  6.     <div class="col-md-8">
  7.   <div class="tombol-nav">
  8.     <div>
  9.       <a href="karyawan/create" class="btn btn-primary">Tambah Karyawan</a>
  10.     </div>
  11.     </div>
  12.   </div>
  13.     <div class="col-md-4">
  14.                 {!! Form::open(['method'=>'GET','url'=>'cari','role'=>'search'])  !!}
  15.                 <div class="input-group custom-search-form">
  16.                     <input type="text" class="form-control" name="search" placeholder="Search...">
  17.                     <span class="input-group-btn">
  18.                             <button class="btn btn-default" type="submit"><i class="fa fa-search"></i> Search </button>
  19.                          </span>
  20.                  </div>
  21.                  {!! Form::close() !!}
  22.             </div>
  23.           </div><br>
  24.  
  25.   <table class="table">
  26.     <thead>
  27.       <tr>
  28.         <th>No</th>
  29.         <th>NIP</th>
  30.         <th>Nama</th>
  31.         <th>Tanggal Lahir</th>
  32.         <th>Jenis Kelamin</th>
  33.         <th>Foto</th>
  34.         <th>Tanggal Input</th>
  35.       </tr>
  36.     </thead>
  37.     @if($karyawan_list->count())
  38.     <?php $no=1; ?>
  39.     <tbody>
  40.       @foreach($karyawan_list as $karyawan)
  41.       <tr>
  42.         <td>{{ $no++ }}</td>
  43.         <td>{{ $karyawan->nip }}</td>
  44.         <td>{{ $karyawan->nama }}</td>
  45.         <td>{{ $karyawan->tgl_lahir }}</td>
  46.         <td>{{ $karyawan->gender }}</td>
  47.         <td><img src="{{ asset('fotoupload/'.$karyawan->foto)  }}" style="max-height:70px;max-width:70px;margin-top:2px;"></td>
  48.         <td>{{ $karyawan->created_at }}</td>
  49.         <td>
  50.           <div class="box-button">
  51.             {{ link_to('karyawan/'.$karyawan->id, 'Detail',['class'=>'btn btn-success btn-sm'])}}
  52.           </div>
  53.           <div class="box-button">
  54.             {{ link_to('karyawan/'.$karyawan->id.'/edit', 'Edit',['class'=>'btn btn-warning btn-sm'])}}
  55.           </div>
  56.           <div class="box-button">
  57.             {!! Form::open(['method'=>'DELETE','action'=>['KaryawanController@destroy', $karyawan->id]]) !!}
  58.             {!! Form::submit('Hapus',['class'=>'btn btn-danger btn-sm']) !!}
  59.             {!! Form::close() !!}
  60.           </div>
  61.         </td>
  62.       </tr>
  63.       @endforeach
  64.     </tbody>
  65.     @else
  66.     <tr><td>Data Tidak Ada</td></tr>
  67.     @endif
  68.   </table>
  69.   <div class="table-nav">
  70.   {{-- Menampilkan jumlah data --}}
  71.   <div class="jumlah-data">
  72.     <strong>Jumlah Karyawan : {{ $jumlah_karyawan }}</strong>
  73.   </div>
  74.   <div class="paging">
  75.     {{ $karyawan_list->links() }}
  76.   </div>
  77. </div>
  78. </div>
  79. @stop
  80. @section('footer')
  81. @include('footer')
  82. @stop
Add Comment
Please, Sign In to add comment