@extends('layouts.master')
  @section('page_title')
      @if(isset($page_title))
          {{ $page_title }}
      @endif
  @endsection
@section('css')
@endsection
@section('content')
  <div class="">
      <div class="page-title">
        <div class="title_left">
          <div class="title_left">
            <ol class="breadcrumb">
              <li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
              <li class="active">Branch Offices</li>
            </ol>
          </div>
        </div>

        <div class="title_right">
          <div class="row">
            <form method="GET" action="{!! url('senderids') !!}">
              <div class="col-md-5 col-sm-5 col-xs-12 form-group">
                <div style="margin-top:1px; margin-right:-90px;" class="top_search">
                </div>
              </div>
              <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search" style="margin-top: -2px;">
                <div class="input-group">
                  <input type="text" name="keyword" class="form-control" id="keywordField" placeholder="Keyword here...">
                  <span class="input-group-btn">
                    <button type="submit" class="btn btn-primary" style="color: #fff;" type="button">Go!</button>
                  </span>
                </div>
              </div>
            </form>
          </div>
          <div class="row">
              <div class="col-sm-12">
              <div class="pull-right"></div>
              </div>
          </div>
        </div>
      </div>

      <div class="clearfix"></div>
      <div class="row">
        @include('commons.notifications')
        <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
          <div class="x_title">
            <h2> Branch Offices</h2>
            <div class="pull-right">
                <a class="btn btn-primary btn-sm" href="{!! url('officelocations/create') !!}"><i class="fa fa-plus-circle"></i> New Branch Office</a>
            </div>
            <div class="clearfix"></div>
          </div>

          <div class="x_content">
            <div id="" class="row">
              @if($offices_arr->isEmpty() == false)
              @foreach($offices_arr as $row)
              <div class="col-md-4 col-sm-4 col-xs-12 profile_details">
                <div class="well profile_view">
                  <div class="col-sm-12">
                    <!-- <h4 class="brief"><i>{{ $row->country }}</i></h4> -->
                    <div class="leftd col-xs-12">
                      <div class="text-centers">
                        <img src="<?php echo $row->flag_url; ?>" alt="" class="img-circles img-responsives" width="60" height="30">
                      </div>
                      <h4>Country : {{ $row->country }}</h4>
                      <h4>Manager : {{ $row->country_manager_info->name }}</h4>
                      <p><strong>Physical Address </strong>: {{ $row->physical_address or '' }} {{ $row->block_number or '' }}</p>
                      <p><strong>Postal Address </strong>: {{ $row->postal_address or '' }}</p>
                      
                      <p><strong>City/Town </strong>: {{ $row->city_town or '' }}</p>
                      <p><strong>Country </strong>: {{ $row->country or '' }}</p>
                      <ul class="list-unstyled">
                        <!-- <li><i class="fa fa-buildings"></i>Country Code: </li> -->
                        <li><i class="fa fa-phone"></i> Phone #: {{ $row->office_phone }} </li>
                      </ul>
                    </div>
                    <!-- <div class="right col-xs-5 text-center">
                      <img src="<?php echo $row->flag_url; ?>" alt="" class="img-circles img-responsives" width="100" height="60">
                    </div> -->
                  </div>
                  <div class="col-xs-12 bottom text-center bg-danger">
                    <!-- url('clients/'. $showclient->id . '/edit') -->
                    <a href="{{ url('officelocations/'. $row->id .'/edit') }}" class="btn btn-link"><i class="fa fa-edit"></i> Edit</a>
                    <a href="{{ url('officelocations/showfiles', $row->id) }}" class="btn btn-link"><i class="fa fa-file"></i> Documents</a>
                  </div>
                </div>
              </div>
              @endforeach
              @else
                <div class="col-md-12">
                  <p>No Records</p>
                </div>
              @endif
            </div>
          </div>
        </div>
      </div>
    </div>
</div>

@endsection

@section('javascript')
<script type="text/javascript">
  $(document).ready(function(){
  
    
  });

</script>
@endsection
