@extends('layouts.masterHome2')

@section('content')

    <br/>
    @if( auth()->user()->create_ )
    <a href="{{ url('/tab/create') }}"  class="btn" style="background-color:#2C4E71;color:#FFF;margin-left:10px">Create New Tabulation </a><br/><br/>
    @else
	    <span>&nbsp;&nbsp;</span>
    @endif

 
    
    <div class="card">
               
              <!-- /.card-header -->
              <div class="card-body">
                <table id="example1" class="table table-bordered table-striped">
                  <thead>
                  
                 <tr >
                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> اسم التبويب    </th>

                  <th style="text-align:center;vertical-align: middle;background-color:#2C4E71;color:#FFF;border-color:#0000003c;border-width: 2px;"> Actions   </th>
                  

                 </tr>
                 </thead>
              <tbody>
                           
                @foreach( $tabs as $tab )   
                 
                 

                 
                <tr>
                 
                  <td style="text-align:center; word-break: break-word; font-weight:900;border-color:#0000003c;font-size:18px" >{{$tab->name}} </td>

                  <td style="text-align:center; width:50px;word-break: break-word;" > 
                  @if( auth()->user()->edit_ )
                  <a   href='{{url("/tab/edit/$tab->id")}}'  > <i class="fa fa-edit" style="font-size:18px"></i>  </a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  @else
	                  <span>&nbsp;&nbsp;</span>
                  @endif
                 
                </td>

                </tr>
               @endforeach
                </tbody>
                </table>
              </div>
              <!-- /.card-body -->
            </div>  

@endsection
