master.php 2.06 KB
<?php
use yii\helpers\Html;
use backend\widgets\LinkPager;
use backend\widgets\YHGImage\Common\Images as CommonImages;

$this->title = $this->params['main_title'].'-'.$this->params['sub_title'];
?>

<div class="panel panel-default">
    <div class="panel-body">
        <form action="" class="form-inline" method="get" >
            <div>
                <?=$filter?>
            </div>
        </form>
    </div>
</div>
<div class="form-group">
    <label>
        <a href="/live/addmaster" class="btn btn-primary">+ 添加主播</a>
    </label>
</div>
<div class="row">
    <div class="col-md-12">
        <div class="table-responsive">
            <table class="table table-dark mb30">
                <thead>
                <tr>
                    <th>主播ID</th>
                    <th>主播名称</th>
                    <th>主播标签</th>
                    <th>主播头像</th>
                    <th>直播次数</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach($list as $v):?>
                    <tr>
                        <td><?php echo $v->master_id;?></td>
                        <td><?php echo $v->name;?></td>
                        <td><?php echo $v->meta;?></td>
                        <td><img height="70" src="<?=CommonImages::getImageUrl($v->pic, 70, 70, 2)?>"></td>
                        <td><?php echo $v->live_nums;?></td>
                        <td>
                            <a class="btn btn-primary" href="/live/editmaster/<?php echo $v->master_id;?>">编辑</a>
                            <a class="btn btn-danger" onclick="return confirm('删除该主播?')" href="/live/delmaster/<?php echo $v->master_id;?>">删除</a>
                        </td>
                    </tr>

                <?php endforeach;?>
                </tbody>
            </table>
        </div>
        <!-- table-responsive -->
        <?php echo LinkPager::widget(['pagination' => $pagination]);?>
    </div>
    <!-- col-md-12 -->
</div>

<script type="text/javascript">

</script>