  <?php 
    $this->load->view('templates/header');
  ?>
    <script>
        var link = "master";
        var sub_link = "city";
    </script>
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
       CITY
        <small>Master</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Forms</a></li>
        <li class="active">City Master</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-2 col-md-offset-10">
                 <button type="button" class="btn btn-primary" onClick="add_update_city_popup(0);" title="add city" style="width: 100%;">Add City</button>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">     
                <div class="box">
                    <div class="box-body">
                        <table class="table table-bordered table-striped master_table">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>City Name</th>
                                    <th>Edit</th>    
                                    <th>Delete</th>    
                                </tr>
                            </thead>
                            <tbody>
                        <?php
                            foreach ($city_data as $key => $value):
                        ?>
                                <tr>
                                    <td><?php echo $key+1?></td>
                                    <td><?php echo $value['city_name']?></td>
                                    <td><span class="glyphicon glyphicon-pencil" style="cursor:pointer;" onClick="add_update_city_popup(<?php echo $value['city_id']?>)"></span></td>
                                    <td><span class="glyphicon glyphicon-trash" onClick="delete_master_item(<?php echo $value['city_id']?>,'city_delete');"></span></td>
                                </tr> 
                        <?php
                            endforeach;
                        ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <?php 
    $this->load->view('templates/footer');
   ?>
    <script src="<?php echo assets('js/master.js')?>"></script> 
 
  