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

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

    <button type="button" style="float: right" onclick="location.href='<?= base_url() . 'dashboard/addQuote' ?>'" class="btn btn-primary">Add Quote</button>
    <!-- DataTales Example -->
    <br><br><br>
    <div class="card shadow mb-4">

        <div class="card-header py-3 ml-auto">

        </div>

        <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>Quote</th>
                            <th>Created Date</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>

                        <?php
                        if (!empty($quotes)) {
                        foreach ($quotes as $id => $quote) {
                            $date = date('m-d-Y', ($quote['createdDate']/1000))
                        ?>
                        <tr>
                            <td><?php echo $quote['quote']; ?></td>
                            <td><?php echo $date; ?></td>
                            <td>

                                <a class="icon" style="text-decoration: none;" href="<?php echo base_url(); ?>dashboard/editquote/<?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(); ?>dashboard/deletequote/<?php echo $id; ?>">
                                    <button class="btn btn-danger btn-block mt-2">Delete</button>
                                </a>

                            </td>

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

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