<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
    <div class="page-content">
        <!-- BEGIN PAGE HEADER-->
        <h3 class="page-title">
            {$shcontrollname}
        </h3>
        <div class="page-bar">
            <ul class="page-breadcrumb">
                {$breadcrumbs}
            </ul>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <input type="hidden" id="loginUserName" name="loginUserName" value="{$loginUserName}">
        {if $isArchived == 0}
        <div class="row">
            <div class="col-md-12">
                <div class="portlet light bg-inverse">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="icon-equalizer font-red-sunglo"></i>
                            <span class="caption-subject font-red-sunglo bold uppercase">All requests</span>
                        </div>

                    </div>

                    <table class="table table-bordered table-hover" id="sample_2">
                        <thead class="idwdet">
                            <tr>
                                <th>No</th>
                                <th>Title</th>
                                <th>Date</th>
                                <th>Details</th>
                            </tr>
                        </thead>

                        <tbody>
                            {assign var=i value=1}
                            {foreach $allRequests as $request}
                            <tr>
                                <td>{$i}</td>
                                <td>{$request->title}</td>
                                <td>{$request->date}</td>
                                <td><a href="#" class="btn green btn-block requestDetails" data-requestid="{$request->id}" data-archived="0">Details </a></td>
                            </tr>
                            {capture assign=i}{$i+1}{/capture}
                            {/foreach}
                        </tbody>
                    </table>


                </div>
            </div>
        </div>
        {else if $isArchived == 1}
        <div class="row">
            <div class="col-md-12">
                <div class="portlet light bg-inverse">
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="icon-equalizer font-red-sunglo"></i>
                            <span class="caption-subject font-red-sunglo bold uppercase">All archived  requests</span>
                        </div>

                    </div>

                    <table class="table table-bordered table-hover"  id="sample_2">
                        <thead class="idwdet">
                            <tr>
                                <th>No</th>
                                <th>Title</th>
                                <th>Date</th>
                                <th>Details</th>
                            </tr>
                        </thead>

                        <tbody>
                            {assign var=i value=1}
                            {foreach $allRequests as $request}
                            <tr>
                                <td>{$i}</td>
                                <td>{$request->title}</td>
                                <td>{$request->date}</td>
                                <td><a href="#" class="btn green btn-block requestDetails" data-requestid="{$request->id}" data-archived="1">Details </a></td>
                            </tr>
                            {capture assign=i}{$i+1}{/capture}
                            {/foreach}
                        </tbody>
                    </table>






                </div>
            </div>
        </div>
        {/if}


    </div>
    <!-- END PAGE CONTENT-->
</div>

<!-- END CONTENT -->
<!----------------------------------------------------  Models --------------------------------------------------->
<div id="request_div"></div>
<div id="request_model" class="modal fade" tabindex="-1" data-width="1000">



    <div class="modal-body">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
        <div id="details">

        </div>

        <hr>


        <h2>Comments
            <span class="replayrecomment">
                <label for="dcomm"> Add comment </label>
            </span>
        </h2>

                                                    <div class="modal-footer">
                                                        <button type="button" data-dismiss="modal" class="btn btn-default" id="model_close">Close</button>
                                        </div>

            <hr>
            <h3>Leave a Comment</h3>

            <div class="post-comment">
                <div class="chat-form">
                    <div class="input-cont">
                        <textarea class="col-md-10 form-control" rows="1" id="dcomm"></textarea>
                    </div>
                    <div class="btn-cont" id="xxx">
                        <span class="arrow">
                        </span>
                        <a href="#" class="btn blue icn-only" id="add_comment" data-level="1">
                            <i class="fa fa-check icon-white"></i>
                        </a>
                    </div>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" data-dismiss="modal" class="btn btn-default">Close</button>
            </div>




        </div>

    </div>
</div>


