wpfw_ewei_shopv2/plugin/invitation/template/web/index.html
2023-02-14 19:57:32 +08:00

99 lines
4.9 KiB
HTML

{template '_header'}
<div class="page-heading">
<span class="pull-right">
{ifp 'invitation.add'}
<a class='btn btn-primary btn-sm' href="{php echo webUrl('invitation/add')}"><i class="fa fa-plus"></i> 添加邀请卡</a>
{/if}
</span>
<h2>邀请卡管理 <small>(总数: <span class='text-danger'>{$total}</span>)</small></h2>
</div>
<form action="./index.php" method="get" class="form-horizontal" role="form">
<input type="hidden" name="c" value="site" />
<input type="hidden" name="a" value="entry" />
<input type="hidden" name="m" value="{EWEI_SHOP_V2_MODULE_NAME}" />
<input type="hidden" name="do" value="web" />
<input type="hidden" name="r" value="invitation" />
<div class="page-toolbar row m-b-sm m-t-sm">
<div class="col-sm-4">
<div class="input-group-btn">
<button class="btn btn-default btn-sm" type="button" data-toggle='refresh'><i class='fa fa-refresh'></i></button>
{ifp 'invitation.delete'}
<button class="btn btn-default btn-sm" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{php echo webUrl('invitation/delete')}"><i class='fa fa-trash'></i> 删除</button>
{/if}
</div>
</div>
<div class="col-sm-6 pull-right">
<select name="type" class='form-control input-sm select-sm'>
<option value="" {if $_GPC['type'] == ''} selected{/if}>类型</option>
<option value="0" {if $_GPC['type'] == '0'} selected{/if}>直播</option>
</select>
<div class="input-group">
<input type="text" class="input-sm form-control" name='keyword' value="{$_GPC['keyword']}" placeholder="请输入关键词"> <span class="input-group-btn">
<button class="btn btn-sm btn-primary" type="submit"> 搜索</button> </span>
</div>
</div>
</div>
</form>
<form action="" method="post" >
{if count($list)>0}
<table class="table table-hover table-responsive">
<thead>
<tr>
<th style="width:25px;"><input type='checkbox' /></th>
<th>名称</th>
<th style='width:100px; text-align: center;'>类型</th>
<th style='width:80px;'>扫描数</th>
<th style='width:80px;'>关注数</th>
<th style='width:80px;text-align: center;'>状态</th>
<th style="width: 230px;">操作</th>
</tr>
</thead>
<tbody>
{loop $list $row}
<tr>
<td>
<input type='checkbox' value="{$row['id']}"/>
</td>
<td>{$row['title']}</td>
<td style="text-align: center;">
{if $row['type']==0}
<span class='text text-navy'>直播间</span>
{/if}
</td>
<td>{$row['scan']}</td>
<td>{$row['follow']}</td>
<td style="text-align: center;">
<span class='label {if $row['status']==1}label-primary{else}label-default{/if}'
{ife 'leve.room' $item}
data-toggle='ajaxSwitch'
data-switch-value='{$row['status']}'
data-switch-value0='0|禁用|label label-default|{php echo webUrl('invitation/property',array('type'=>'status', 'value'=>1,'id'=>$row['id']))}'
data-switch-value1='1|启用|label label-primary|{php echo webUrl('invitation/property',array('type'=>'status', 'value'=>0,'id'=>$row['id']))}'
{/if}>{if $row['status']==1}启用{else}禁用{/if}</span>
</td>
<td>
{ifp 'invitation.log'}
<a class='btn btn-default btn-sm' href="{php echo webUrl('invitation/log', array('id' => $row['id']))}"><i class='fa fa-qrcode'></i> 扫描记录</a>
{/if}
{ifp 'invitation.edit|invitation.view'}
<a class='btn btn-default btn-sm' href="{php echo webUrl('invitation/edit', array('id' => $row['id']))}"><i class='fa fa-edit'></i> {ifp 'invitation.edit'}编辑{else}查看{/if}</a>
{/if}
{ifp 'invitation.delete'}
<a class='btn btn-default btn-sm' data-toggle='ajaxRemove' href="{php echo webUrl('invitation/delete', array('id' => $row['id']))}" data-confirm="确认删除此邀请卡吗?<br>删除后扫描记录将一并删除"><i class='fa fa-remove'></i> 删除</a>
{/if}
</td>
</tr>
{/loop}
</tbody>
</table>
{$pager}
{else}
<div class='panel panel-default'>
<div class='panel-body' style='text-align: center;padding:30px;'>
暂时没有任何邀请卡!
</div>
</div>
{/if}
</form>
{template '_footer'}