70 lines
2.9 KiB
HTML
70 lines
2.9 KiB
HTML
{template '_header'}
|
|
<div class="page-heading">
|
|
{ifp 'shop.recommand.setstyle'}
|
|
<span class='pull-right' style="padding: 15px 10px;">
|
|
<strong>开启列表样式</strong>
|
|
<input class="js-switch small" id="goodsstyle" type="checkbox" {if !empty($goodsstyle)}checked{/if}
|
|
data-toggle='ajaxSwitch'
|
|
data-switch-value='{$goodsstyle}'
|
|
data-switch-value0='0|0|0|{php echo webUrl('shop/recommand/setstyle',array('goodsstyle'=>1))}'
|
|
data-switch-value1='1|0|0|{php echo webUrl('shop/recommand/setstyle',array('goodsstyle'=>0))}' />
|
|
</span>
|
|
{/if}
|
|
<h2>商品推荐 {ifp 'shop.recommand.main'}<small>拖动可排序</small>{/if}</h2>
|
|
</div>
|
|
<form action="" method="post" class="form-validate">
|
|
{ifp 'shop.recommand.main'}
|
|
<div class="alert alert-success">提示: 请在下方选择要显示的商品; 不选择则将不显示; 右上角开启列表显示则使用列表样式,不开启则使用默认方块样式显示。</div>
|
|
{/if}
|
|
<div class="form-group">
|
|
<div class="col-sm-9 col-xs-12">
|
|
{ifp 'shop.recommand.main'}
|
|
<?php echo tpl_selector('goodsid',
|
|
array(
|
|
'preview'=>true,
|
|
'readonly'=>true,
|
|
'multi'=>1,
|
|
'value'=>$item['title'],
|
|
'url'=>webUrl('goods/query'),
|
|
'items'=>$goods,
|
|
'buttontext'=>'选择商品',
|
|
'placeholder'=>'请选择商品')
|
|
)
|
|
?>
|
|
{else}
|
|
<div class="input-group multi-img-details container ui-sortable">
|
|
{loop $goods $item}
|
|
<div data-name="goodsid" data-id="426" class="multi-item">
|
|
<img src="{php echo tomedia($item['thumb'])}" class="img-responsive img-thumbnail">
|
|
<div class="img-nickname">{$item['title']}</div>
|
|
</div>
|
|
{/loop}
|
|
</div>
|
|
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
|
|
<table class='table'>
|
|
<tr>
|
|
<td>
|
|
{ifp 'shop.recommand.main'}
|
|
<input type="submit" class="btn btn-primary" value="保存">
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
</form>
|
|
<script language="javascript">
|
|
require(['jquery.ui'],function(){
|
|
$('.multi-img-details').sortable();
|
|
})
|
|
</script>
|
|
{template '_footer'}
|
|
|
|
|