<?php echo $header; ?>
<div class="container-fluid">
    <div class="row">
        <div class="col-lg-8">
            <h1 class="page-header">
                <?php echo $this->lang->line('cat_header'); ?>
            </h1>            
        </div>
        <div class="col-lg-4">
            <div class="input-group searchContainer">
                <input type="text" class="form-control" id="searchString">
                <span class="input-group-btn">
                    <button class="btn btn-default" type="button" id="searchBtn" onClick="doCategorySearch();"><span
                            class="fa fa-search"></span></button>
                </span>
            </div><!-- /input-group -->
        </div>
        <div class="col-lg-12">
            <ol class="breadcrumb">
                <li>
                    <i class="fa fa-dashboard"></i>
                    <a href="<?php echo BASE_URL; ?>/admin"><?php echo $this->lang->line('nav_dash'); ?></a>
                </li>
                <li class="active">
                    <i class="fa fa-fw fa-newspaper-o"></i>
                    <a href="<?php echo BASE_URL; ?>/admin/posts"><?php echo $this->lang->line('nav_posts_all'); ?></a>
                </li>
            </ol>
        </div>
    </div>
</div>
<div class="container-fluid">
  	<div class="row">
      	<div class="col-md-12">
			<table class="table table-striped table-bordered">
                <thead>
                  <tr>
                    <th> ID </th>
                    <th> <?php echo $this->lang->line('cat_table_category'); ?> </th>
                    <th class="td-actions"> </th>
                  </tr>
                </thead>
                <tbody id="categoryContainer">
                    <?php 
					foreach ($categories as $c) {
						echo '<tr>';
                        echo '<td>'.$c['categoryID'].'</td>';
                        echo '<td>'.$c['categoryTitle'].'</td>';
						echo '<td class="td-actions"><a href="'.BASE_URL.'/admin/posts/categories/edit/'.$c['categoryID'].'" class="btn btn-small btn-success"><i class="fa fa-pencil"> </i></a> <a data-toggle="modal" data-target="#ajaxModal" class="btn btn-danger btn-small" href="'.BASE_URL.'/admin/posts/categories/delete/'.$c['categoryID'].'"><i class="fa fa-remove"></i></a></td>';
						echo '</tr>';
					} ?>
                </tbody>
                <div class="text-center" id="loadingSpinner">
                    <i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
                </div>
              </table>
              <?php echo $this->pagination->create_links(); ?>
         </div>
          <!-- /colmd12 -->
      </div>
      <!-- /row --> 
    </div>
    <!-- /container --> 
<?php echo $footer; ?>