<div class="content-wrapper">

    <section class="content-header">
        <?php echo $this->partial('layout/breadcrumb'); ?>
        <h1 class="pull-right">
            <a href="<?php echo $this->url('goods-tag-group', ['action'=> 'add']);?>" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> <?php echo $this->translate('添加标签组'); ?></a>
            <?php echo $this->HelpUrl('goodsTagGroup'); ?>
        </h1>
    </section>

    <section class="content">
        <?php echo $this->partial('layout/messages'); ?>

        <div class="row">
            <div class="col-xs-12">
                <form method="post" action="<?php echo $this->url('goods-tag-group', ['action' => 'updateAllSort']);?>" name="edit-all-form" id="edit-all-form">
                <div class="box shop-box">
                    <div class="box-body table-responsive no-padding">
                        <table class="table shop-table table-hover">
                            <thead>
                            <tr class="shop-bg-thead">
                                <th width="20%"><?php echo $this->translate('标签组名称'); ?></th>
                                <th width="10%"><?php echo $this->translate('标签组标记'); ?></th>
                                <th width="10%"><?php echo $this->translate('用于商品规格'); ?></th>
                                <th width="5%"><?php echo $this->translate('排序'); ?></th>
                                <th width="8%"><?php echo $this->translate('操作'); ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if($this->tagGroupList) foreach ($this->tagGroupList as $value) { ?>
                                <tr>
                                    <td><?php echo $this->escapeHtml($value->getTagGroupName()); ?></td>
                                    <td><?php echo $this->escapeHtml($value->getTagGroupMark()); ?></td>
                                    <td><?php echo $this->goodsHelper()->goodsTagGroupIsSpec($value->getIsGoodsSpec()); ?></td>
                                    <td><input type="number" name="tagGroupSort[<?php echo $value->getTagGroupId(); ?>]" value="<?php echo $this->escapeHtml($value->getTagGroupSort()); ?>" class="form-control input-sm"></td>
                                    <td>
                                        <a href="<?php echo $this->url('goods-tag-group',
                                            ['action'=>'edit', 'id'=>$value->getTagGroupId()]); ?>"
                                           class="btn btn-xs btn-success"><i class="fa fa-pencil"></i> <?php echo $this->translate('编辑'); ?></a>

                                        <a href="javascript:;" onclick="deleteConfirm('<?php echo $this->translate('您确实要删除该标签组吗?'); ?>', '<?php echo $this->url('goods-tag-group', ['action'=>'delete', 'id'=>$value->getTagGroupId()], ['query' => ['qToken' => $this->adminHelper()->getCsrfValue()]]); ?>');" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i> <?php echo $this->translate('删除'); ?></a>
                                    </td>
                                </tr>
                            <?php } ?>
                            </tbody>
                        </table>
                    </div>
                    <div class="box-footer clearfix">
                        <button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-check"></i> <?php echo $this->translate('更新'); ?></button>
                    </div>
                </div>
                </form>
            </div>
        </div>

    </section>
</div>