<?php $__env->startSection('header'); ?>
    <style>
        #header {
            background:#8d1c22;
        }

        .form-inline {
            margin:10px;
        }
        #content .table {
            font-size:12px;
        }

        .head-table {
            width:100%;
        }
    </style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
   <div class="row-fluid">
        <div class="span9">
        </div>
        <div>
            <h4 class="nametag">部落客管理系統</h4>
                <br><br><br>
	<h5><?php echo Session::get('message'); ?></h5>

    <div>
        <a href="<?php echo route($_CONST["CONTROLLER_ROUTE"].'.create'); ?>" class="btn btn-primary">新增</a>
        <table class="table table-bordered">
            <tr><th>發佈</th><th>部落客ID</th><th>部落客名稱</th><th>部落客簡介</th><th>部落客FB</th><th>部落客IG</th><th>部落客照片</th><th>按讚數</th><th>FOLLOW 數</th><th>操作</th></tr>
            <?php foreach($bloggers as $blogger): ?>
            <tr>
                <td><?php echo Form::checkbox('publish', 'yes');; ?></td>
                <td><?php echo e($blogger->id); ?></td>
                <td><?php echo e($blogger->name); ?></td>
                <td><?php echo e($blogger->description); ?></td>
                <td>
                    <a href="<?php echo action($_CONST["CONTROLLER_ACTION"].'@getDisable', $blogger->id); ?>" class="btn btn-success" ><i class="icon-ok-circle"></i>啟用中</a>
                </td>
                <td>
                    <?php if($blogger->isActive): ?>
                    <a href="<?php echo action($_CONST["CONTROLLER_ACTION"].'@getDisable', $blogger->id); ?>" class="btn btn-success" ><i class="icon-ok-circle"></i>啟用中</a>
                    <?php else: ?>
                    <a href="<?php echo action($_CONST["CONTROLLER_ACTION"].'@getEnable', $blogger->id); ?>" class="btn btn-danger"><i class="icon-ban-circle"></i>停用中</a>
                    <?php endif; ?>
                </td>
		<td><?php echo e($blogger->photo); ?></td>
                <td><?php echo e($blogger->like_num); ?></td>
                <td><?php echo e($blogger->follow_num); ?></td>
                <td>
                    <a href="<?php echo route($_CONST["CONTROLLER_ROUTE"].'.edit', $blogger->id); ?>" class="btn btn-primary">修改</a>
                    <?php echo Form::open(array('route'=>array($_CONST["CONTROLLER_ROUTE"].'.destroy', $blogger->id),
                        'method' => 'delete','style'=>'display:inline')
                    ); ?>

                    <?php echo Form::submit('刪除', array("class"=>"delete btn btn-large btn-danger"));; ?>

                    <?php echo Form::close(); ?>

                </td>
            </tr>
            <?php endforeach; ?>
        </table>
    </div>

    </div> <!-- div -->
</div> <!-- .row-fluid -->
<?php $__env->stopSection(); ?>

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