<?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/bootstrap-datepicker/css/bootstrap-datepicker3.min.css')); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/select2/css/select2.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/select2/css/select2-bootstrap.min.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/bootstrap-select/1.12.2/bootstrap-select.min.css')); ?>"/>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/global/plugins/bootstrap-select/bootstrap-select.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 e(route('manage::new_energy::index')); ?>">能源管理</a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="<?php echo e(route('manage::new_energy::setting')); ?>">能源參數設定</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">
						<div class="table-toolbar">
							<div class="row">
								<div class="col-md-6">
		                            <div class="btn-group">
										<a id="btn_query" href="javascript:;" class="btn green">
										新增資料 <i class="fa fa-plus"></i>
										</a>
		                            </div>
								</div>
							</div>
						</div>
						<table class="table table-striped table-bordered table-hover" id="table_data">
    						<thead>
        						<tr>
        							<th>
        								對應名稱
        							</th>
        							<th>
        								資料類型
        							</th>
        							<th>
        								資料單位
        							</th>
        						</tr>
    						</thead>
    						<tbody>
    							<?php foreach($data as $one): ?>
    							<tr class="odd gradeX">
                                    <td>
                                        <?php echo e($one->type_name); ?>

                                    </td>
    								<td>
    									<?php echo e($one->value_type); ?>

    								</td>
    								<td>
    									<?php echo e($one->unit); ?>

    								</td>
    							</tr>
    							<?php endforeach; ?>
    						</tbody>
						</table>
					</div>
				</div>
				<!-- END EXAMPLE TABLE PORTLET-->
			</div>
		</div>
	</div>
</div>

<div class="modal fade draggable-modal" id="modal_query" tabindex="-1" role="basic" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header bg-blue-madison">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title font-white">新增資料</h4>
            </div>
            <form id="form_query" action="<?php echo e(route('manage::new_energy::store')); ?>" method="post" class="form-horizontal">
                <div class="modal-body">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-md-3 control-label">對應名稱<span class="required" aria-required="true"> * </span></label>
                            <div class="col-md-9">
                                <input type="text" name="type_name" class="form-control" required="required" placeholder="請輸入對應名稱">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">資料類型<span class="required" aria-required="true"> * </span></label>
                            <div class="col-md-9">
                                <input type="text" name="value_type" class="form-control" required="required" placeholder="請輸入資料類型">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">資料單位<span class="required" aria-required="true"> * </span></label>
                            <div class="col-md-9">
                                <input type="text" name="unit" class="form-control" required="required" placeholder="請輸入資料單位">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                    <button type="button" class="btn gray" data-dismiss="modal"><?php echo app('translator')->get('messages.close'); ?></button>
                    <button type="submit" class="btn blue">送出</button>
                </div>
            </form>
        </div>
    </div>
</div>
<?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/datatables/media/js/jquery.dataTables.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.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/bootstrap-datepicker/js/bootstrap-datepicker.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-datepicker/locales/bootstrap-datepicker.zh-TW.min.js')); ?>"></script>

<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-fileinput/bootstrap-fileinput.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-fileinput/additional-methods.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/select2/js/select2.min.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('assets/global/plugins/bootstrap-select/1.12.2/bootstrap-select.min.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js_page_level'); ?>
<script>
$(document).ready(function(){
	var table = $('#table_data');
    var oTable = table.dataTable({
        // Internationalisation. For more info refer to http://datatables.net/manual/i18n
        "language": {
            "aria": {
                "sortAscending": ": activate to sort column ascending",
                "sortDescending": ": activate to sort column descending"
            },
            "emptyTable": "<?php echo app('translator')->get('messages.datatable_no_data'); ?>",
            "info": "<?php echo app('translator')->get('messages.display_from'); ?> _START_ <?php echo app('translator')->get('messages.display_to'); ?> _END_ <?php echo app('translator')->get('messages.then_total'); ?> _TOTAL_ <?php echo app('translator')->get('messages.records'); ?>",
            "infoEmpty": "<?php echo app('translator')->get('messages.no_match'); ?>",
            "infoFiltered": "(<?php echo app('translator')->get('messages.from'); ?> _MAX_ <?php echo app('translator')->get('messages.records_filter'); ?>)",
            "lengthMenu": "<?php echo app('translator')->get('messages.show'); ?> _MENU_ <?php echo app('translator')->get('messages.records'); ?>",
            "search": "<?php echo app('translator')->get('messages.quick_filter'); ?>:",
            "zeroRecords": "<?php echo app('translator')->get('messages.no_data'); ?>",
            "paginate": {
                "previous":"<?php echo app('translator')->get('messages.last_page'); ?>",
                "next": "<?php echo app('translator')->get('messages.next_page'); ?>",
                "last": "<?php echo app('translator')->get('messages.lastest'); ?>",
                "first": "<?php echo app('translator')->get('messages.most_previous'); ?>"
            }
        },
        "aaSorting": [[0,'asc']],
        "lengthMenu": [
            [10, 20, 50, -1],
            [10, 20, 50, "All"] // change per page values here
        ],
        // set the initial value
        "pageLength": 10,            
        "pagingType": "bootstrap_full_number",
    });

    $(document).on('click','#btn_query',function(){
        $('#modal_query').modal('show');
    });

    $(document).on('click','.btn_edit',function(){
    });

    $(document).on('click','.btn_del',function(){
    });
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.manage', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>