Subversion Repositories SmartDukaan

Rev

Rev 33443 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<style>
    .btn:hover, .btn:focus {
        color: grey;
        text-decoration: none;
    }

    .modal-dialog.modal-lg {
        left: 10%;
        right: auto;
        width: 80%;
    }

    .modal-content {
        background: white;
    }

    .border-highlight {
        border: 3px solid red;
    }

    td.highlight {
        background-color: yellowgreen !important;
    }
</style>


<section class="wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header">
                <i class="icon_document_alt"></i>Print Resources List
            </h3>
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><a
                        href="${rc.contextPath}/dashboard">Home</a></li>
                <li><i class="icon_document_alt"></i>Print Resource List</li>
            </ol>
        </div>
    </div>


    <div id="pending-order-table">
        <div class="row">
            <div class="col-lg-12">

                <table class="table table-border table-condensed table-bordered" id="all-print-resource">
                    <thead>
                    <tr>
                        <th>Title</th>
                        <th>Thumbnail</th>
                        <th>Start Date</th>
                        <th>End Date</th>
                        <th>Action</th>
                    </tr>
                    </thead>
                    <tbody>
                        #if(!$printResources.isEmpty())

                            #foreach($printResource in $printResources)
                            <tr>
                                <td>$printResource.getTitle()</td>
                                <td><img src="$printResource.getThumbnailUrl()" style="height: 40px;width: 80px;"></td>
                                <td>$printResource.getFormattedStartdDate()</td>
                                #if ($printResource.getFormattedEndDate())
                                    <td>$printResource.getFormattedEndDate()</td>
                                #else
                                    <td></td>
                                #end
                                <td>
                                    <a href="$printResource.getImgUrl()" class="btn btn-info btn-sm"
                                       data-url="$printResource.getImgUrl()" target="_blank">View Image</a>
                                    <button class="btn btn-info btn-sm change-end-date-btn"
                                            data-url="$printResource.getImgUrl()" data-printid="$printResource.getId()"
                                            data-toggle="modal" data-target="#dateChangeModel">Change End Date
                                    </button>
                                </td>
                            </tr>
                            #end
                        #end
                        #if($printResources.isEmpty())
                        <tr>
                            <td colspan="5">No data available in table</td>
                        </tr>
                        #end
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</section>


<div class="modal fade" id="dateChangeModel" role="dialog">
    <div class="modal-dialog modal-sm">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Change End Date</h4>
            </div>
            <div class="modal-body">
                <label>Select Date </label>
                <input type="date" class="change-date-input-mk form-control">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-info change-end-date-submit-mk" data-dismiss="modal">Submit
                </button>
            </div>
        </div>

    </div>
</div>

<script>

    $(document).ready(function () {
        var dtable = $('#all-print-resource').DataTable({});
    });
</script>