<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>
<?php init_head(); ?>
<div id="wrapper" >
  <div class="admin-title">
    <h1><?= $this->config->item('icons')['hr']; ?> 
    <?php echo html_entity_decode($title); ?></h1>
  </div>
  <div class="content">
      <div class="row">
          <div class="panel_s">
            <div class="panel-body">
                <div class="row">
                    <div class="col-md-12">
                        <?php if (has_permission('hr', '', 'create')) { ?>
                          <div class="card bd-0 shadow-base">
                            <div class="card-body pd-15">
                              <a href="<?php echo admin_url('hr/company/createDepartment'); ?>" class="btn btn-info mg-r-5">
                                  <?= _l('hr_new_department'); ?> </a>
                            </div>
                          </div>
                        <?php } ?>
                        <div class="card bd-0 shadow-base mg-t-15">
                          <div class="card-header">
                          </div>
                          <div class="card-body pd-15">
                            <?php
                            $table_data = array(
                              _l('name'),
                              _l('hr_department_head'),
                              _l('hr_location'),
                              _l('action'),
                            );

                            render_datatable($table_data,'departments');
                            ?>
                          </div>
                        </div>
                    </div>
                </div>
            </div>
          </div>
      </div>
  </div>
</div>


<?php show_footer(); ?><?php init_tail(); ?>
<script>
  initDataTable('.table-departments', admin_url + 'hr/tables_hr/table_departments', undefined,undefined, 'undefined');
</script>
</body>
</html>