<!-- Begin Page Content -->
<div class="container-fluid">

    <!-- Page Heading -->
    <div class="row column_title">
        <div class="col-md-12">
            <div class="page_title">
                <h2>Instruments List</h2>
            </div>
        </div>
    </div>

    <!-- DataTales Example -->
    <div class="card shadow mb-4">
        <?php if ($permissions != "ReadOnly") { ?>
        <div class="card-header py-3 ml-auto">
            <button type="button" onclick="location.href='<?= base_url() . 'Instrumentalist/addpodcast' ?>'" class="btn btn-primary">Add Instrument</button>
        </div>
        <?php } ?>

        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-bordered" id="songTable" width="100%" cellspacing="0">
                    <thead class="thead-dark">
                        <tr>
                            <th>Name</th>

                            <th>Image</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php
            if (!empty($podcasts)) {
              $count = 1;
              foreach ($podcasts as $id => $podcast) {
            ?>
                        <tr>
                            <td><?php echo $podcast['name']; ?></td>
                            <td>
                                <?php if ($podcast['imageUrl'] != "") { ?>
                                <img class="img-thumbnail" width="100" height="100" src="<?php echo $podcast['imageUrl']; ?>">
                                <?php } else { ?>
                                <img class="img-thumbnail" src="http://placehold.jp/100x100.png">
                                <?php } ?>
                            </td>
                            <td>

                                <?php if ($permissions != "ReadOnly") { ?>

                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>Instrumentalist/editPodcast/<?php echo $id; ?>">
                                    <button class="btn btn-info btn-block mt-2">Edit</button>
                                </a>
                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>Instrumentalist/deletePodcast/<?php echo $id; ?>">
                                    <button class="btn btn-danger btn-block mt-2">Delete</button>
                                </a>
                                <?php } ?>

                            </td>

                        </tr>
                        <?php }
            } ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

</div>
<!-- /.container-fluid -->