<div class="container my-5">

<div class="row">
      <div class="col-md-12">
      
        <!--Accordion wrapper-->
        <?php foreach ($categories as $category) {
        	?>
        	<div class="accordion md-accordion" id="accordionEx_<?php echo $category->category_id; ?>" role="tablist" aria-multiselectable="true">
			<div class="card border-top border-bottom-0 border-left border-right border-light">

            <!-- Card header -->
            <div class="card-header border-bottom border-light" role="tab" id="headingOne1_<?php echo $category->category_id; ?>">
              <a data-toggle="collapse" style="text-decoration: none;" data-parent="#accordionEx_<?php echo $category->category_id; ?>" href="#collapseOne1_<?php echo $category->category_id; ?>" aria-expanded="true"
                aria-controls="collapseOne1_<?php echo $category->category_id; ?>">
                <h5 class="black-text font-weight-normal mb-0">
                  <?php echo $category->name; ?> &nbsp; <i class="fas fa-angle-down rotate-icon"></i>
                </h5>
              </a>
            </div>

            <!-- Card body -->
            <div id="collapseOne1_<?php echo $category->category_id; ?>" class="collapse" role="tabpanel" aria-labelledby="headingOne1_<?php echo $category->category_id; ?>"
              data-parent="#accordionEx_<?php echo $category->category_id; ?>">
              <div class="card-body">
                <?php echo $category->description; ?>
                <hr>
                <a href="<?php echo adminurl('/ICSFleet/category_edit/').$category->category_id; ?>" class="btn btn-sm btn-xs btn-primary">Edit</a>
                <form action="<?php echo adminurl('ICSFleet/category_process'); ?>" method="POST">
                							<input type="hidden" name="category_id" value="<?php echo $category->category_id; ?>" />
                							<input type="hidden" name="action" value="delete" />
                							<input type="hidden" name="name" value="<?php echo $category->name; ?>" />
                							<input type="submit" value="Delete" onclick="if (!confirm('Are you sure you wish to delete this Category? This is not undo-able')) { return false }" class="btn btn-sm btn-danger" />
                						</form>
              </div>
            </div>

          </div>

        </div>
        	
        	<?php
        }
        ?>
        <!-- Accordion wrapper -->
        
      </div>
    </div>

  
</div>