<?php $__env->startSection('css_page_level'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/select2/css/select2.min.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/select2/css/select2-bootstrap.min.css')); ?>"/>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('page-content-wrapper'); ?>
    <div class="page-content-wrapper" id="main">
        <div class="page-content">
            <!-- BEGIN PAGE HEADER-->
            <h3 class="page-title">
            <?php $setting = app('anlutro\LaravelSettings\Facade'); ?>
            <?php echo e($setting::get('system_name','全方位建築智慧化管理系統')); ?> <small><?php echo e($setting::get('company_name','新保科技')); ?></small>
            </h3>
            <div class="page-bar">
                <ul class="page-breadcrumb">
                    <li>
                        <i class="fa fa-home"></i>
                        <a href="<?php echo e(route('manage::index')); ?>"><?php echo app('translator')->get('messages.homepage'); ?></a>
                        <i class="fa fa-angle-right"></i>
                    </li>
                    <li>
                        <a href="#"><?php echo app('translator')->get('messages.electro_mechanical_manage'); ?></a>
                        <i class="fa fa-angle-right"></i>
                    </li>
                    <li>
                        <a href="#"><?php echo app('translator')->get('messages.electro_mechanical_list'); ?></a>
                    </li>
                </ul>
                <div class="page-toolbar">

                </div>
            </div>
            <!-- END PAGE HEADER-->
            <!-- BEGIN DASHBOARD STATS -->
            <div class="row">
                <div class="col-md-12">
                    <!-- BEGIN EXAMPLE TABLE PORTLET-->
                    <div class="portlet light bordered">
                        <div class="portlet-body">
                            <!-- Start Quick Filter -->
                            <div class="table-toolbar">
                                <div class="row" >
                                    <div class="col-md-12" style="margin-bottom:10px;">
<!--                                         <button id="btn_modal_add_intercom" class="btn green" >新增<i class="fa fa-plus"></i></button> -->
                                        <button id="btn_mass_delete" class="btn red" style="display:none;"><?php echo app('translator')->get('messages.del'); ?> <i class="fa fa-trash"></i></button>
                                    </div>
                                    
                                    <form id="form_page" name="form_page_url" action="<?php echo e(route('manage::intercom::index')); ?>" class="form-horizontal">
                                        <div class="col-md-6">
                                            <div class="dataTables_length" id="table_guest_length" >
                                                <label>顯示</label>
                                                <select onchange="$('#form_page').submit();" name="prepage" aria-controls="table_guest" class="form-control input-sm input-xsmall input-inline">
                                                    <option value="10" <?php echo e(Input::get('prepage')==10? 'selected':''); ?>>10</option>
                                                    <option value="20" <?php echo e(Input::get('prepage')==20? 'selected':''); ?>>20</option>
                                                    <option value="50" <?php echo e(Input::get('prepage')==50? 'selected':''); ?>>50</option>
                                                </select> 則
                                            </div>
                                        </div>
                                    </form>
                                                                       
                                </div>
                            </div>
                            <!-- End Quick Filter -->
                            <table class="table table-striped table-bordered table-hover" id="table_guest">
                                <thead>
                                    <tr>
<!--                                         <th>
                                            <input type="checkbox" id="chk_all" />
                                        </th> -->
                                        <th>
                                            檢查單名稱
                                        </th>
                                        <th>
                                            項目分類
                                        </th>
                                        <th>
                                            檢查地點
                                        </th>
                                        <th>
                                            價格
                                        </th>
                                        <th>
                                            到期日期
                                        </th>
                                        <th>
                                            動作
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $counter = 0;?>
                                    <?php foreach($electro_mechanical_checklists as $electro_mechanical_checklist): ?>
                                        <tr class="odd gradeX">
<!--                                             <td>
                                                <input class='chk_check' type="checkbox" value="<?php echo e($electro_mechanical_checklist->id); ?>">
                                            </td> -->
                                            <td>
                                                <a href="<?php echo e($url[$counter]); ?>"><?php echo e($electro_mechanical_checklist->name); ?></a>
                                                <?php $counter++;?>
                                            </td>
                                            <td>
                                                <?php echo e($electro_mechanical_checklist->class); ?>

                                            </td>
                                            <td>
                                                <?php echo e($electro_mechanical_checklist->place); ?>

                                            </td>
                                            <td>
                                                <?php echo e($electro_mechanical_checklist->cost); ?>

                                            </td>
                                            <td>
                                                <?php echo e($electro_mechanical_checklist->end_date); ?>

                                            </td>

                                            <td>
                                                <div class="btn-group">
                                                    <button class="btn btn-default btn-xs dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
                                                    <?php echo app('translator')->get('messages.action'); ?> <i class="fa fa-angle-down"></i>
                                                    </button>
                                                    <ul class="dropdown-menu pull-right" role="menu">
<!--                                                         <li>
                                                            <a class="btn_intercom_edit" href="javascript:;">
                                                            <i class="fa fa-pencil"></i>
                                                            <?php echo app('translator')->get('messages.edit'); ?> </a>
                                                        </li> -->
                                                        <li>
                                                            <a class="btn_QRcode_print" target="_blank" href="<?php echo e(action('Manage\ElectroMechanical\ElectroMechanicalController@printQRcodeByListID',['id'=>$electro_mechanical_checklist->id])); ?>" >
                                                            <i class="fa fa-print"></i>
                                                            列印QRcode </a>
                                                        </li>
                                                        <li>
                                                            <a class="btn_delete" href="javascript:;" data-id="<?php echo e($electro_mechanical_checklist->id); ?>">
                                                            <i class="fa fa-trash-o"></i>
                                                            停用 </a>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </td>
                                        </tr>
                                    <?php endforeach; ?>
                                </tbody>

                            </table>
                        </div>
                        <div class="row">
                            <div class="col-md-5 col-xs-5">
                                <div class="dataTables_info" id="table_list_info" role="status" aria-live="polite">
                                    <p>顯示第 <?php echo e($electro_mechanical_checklists->firstItem()); ?> 到第 <?php echo e($electro_mechanical_checklists->lastItem()); ?> 則 共有 <?php echo e($electro_mechanical_checklists->total()); ?> 則</p>
                                </div>
                            </div>
                            <div class="col-md-7 col-xs-7">
                                <div class="pull-right" id="table_list_paginate">
                                    <?php echo $electro_mechanical_checklists->appends(Input::all())->render(); ?>

                                </div>
                            </div>
                        </div>
                    </div>  
                    <!-- END EXAMPLE TABLE PORTLET-->
                </div>
            </div>
        </div>
    </div>

    <input type="hidden" id="_token" name="_token" value="<?php echo e(csrf_token()); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('plugins_page_level'); ?>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/jquery-validation/js/jquery.validate.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/jquery-validation/js/additional-methods.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootbox/bootbox.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/select2/js/select2.full.min.js')); ?>" ></script>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('js_page_level'); ?>
<script>
//2017-02-03 全選 start
$('document').ready(function(){
    $('#chk_all').click(function(){
        if($(this).is(':checked')){
            $('.chk_check').attr("checked",true);
        }
        else{
            $('.chk_check').attr("checked",false);
        }
        $.uniform.update();
    })
});
//end

    
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.manage', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>