chaoyu/view/manager/category/add.html

150 lines
7.8 KiB
HTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<div class="layui-card layui-col-md12">
<div class="layui-card-body">
<form class="layui-form" data-action="{:url('manager.category/add')}">
<input type="hidden" name="_token" value="{$_token ?? ''}"/>
<div class="layui-form-item">
<label class="layui-form-label">上级</label>
<div class="layui-form-mid">
{$parent.title??'顶级分类'}
<input type="hidden" name="top" value="{$parent.title??'顶级分类'}" />
<input type="hidden" name="item[parent_id]" value="{$parent.id??0}" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">名称</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[title]" placeholder="填写栏目名称" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">英文名称</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[title_en]" placeholder="填写栏目名称" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">模型</label>
<div class="layui-input-block">
<select name="item[model_id]" >
{volist name="models" id="v"}
<option data-template="{$v.template}" value="{$v.id}">{$v.name}</option>
{/volist}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">链接</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[url]" placeholder="栏目外链地址,没有则不填写" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">封面图</label>
<div class="layui-input-block">
{:widget('manager.upload/image')}
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">打开方式</label>
<div class="layui-input-block">
<select lay-filter="aihao" name="item[style]" >
<option value="_self">当前页面</option>
<option value="_blank">新页面</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">是否显示</label>
<div class="layui-input-block">
<input type="radio" checked="checked" name="item[state]" value="1" title="是" />
<input type="radio" name="item[state]" value="0" title="否" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">是否首页</label>
<div class="layui-input-block">
<input type="radio" name="item[is_index]" value="1" title="是" />
<input type="radio" checked="checked" name="item[is_index]" value="0" title="否" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">菜单显示</label>
<div class="layui-input-block">
<input type="radio" name="item[is_menu]" value="1" title="是" checked="checked"/>
<input type="radio" name="item[is_menu]" value="0" title="否" />
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">列表模板</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[template_list]" placeholder="栏目列表模板,没有可不填" />
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">详情模板</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[template_detail]" placeholder="栏目详情模板,没有可不填" />
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">描述</label>
<div class="layui-input-block">
<textarea placeholder="栏目描述500字以内" name="item[description]" class="layui-textarea" onkeyup="limitContentLength(this, 500)"></textarea>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">英文描述</label>
<div class="layui-input-block">
<textarea placeholder="栏目描述500字以内" name="item[description_en]" class="layui-textarea" onkeyup="limitContentLength(this, 500)"></textarea>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">栏目封面尺寸</label>
<div class="layui-form-mid layui-word-aux">宽:</div>
<div class="layui-input-inline" >
<input class="layui-input" type="text" name="item[width]" value="0" style="width:100%"/>
</div>
<div class="layui-form-mid layui-word-aux">px</div>
<div class="layui-form-mid">X</div>
<div class="layui-form-mid layui-word-aux">高:</div>
<div class="layui-input-inline" >
<input class="layui-input" type="text" name="item[height]" value="0" style="width:100%"/>
</div>
<div class="layui-form-mid layui-word-aux">px</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">图片最佳尺寸</label>
<div class="layui-form-mid layui-word-aux">宽:</div>
<div class="layui-input-inline" >
<input class="layui-input" type="text" name="item[img_width]" value="0" style="width:100%"/>
</div>
<div class="layui-form-mid layui-word-aux">px</div>
<div class="layui-form-mid">X</div>
<div class="layui-form-mid layui-word-aux">高:</div>
<div class="layui-input-inline" >
<input class="layui-input" type="text" name="item[img_height]" value="0" style="width:100%"/>
</div>
<div class="layui-form-mid layui-word-aux">px</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">列表页数量</label>
<div class="layui-input-block">
<input class="layui-input" type="text" name="item[number]" placeholder="列表页数量默认20" />
</div>
</div>
<div class="layui-clear"></div>
<hr style="margin: 30px 0;">
<div class="layui-form-item">
<div class="text-center">
<button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="submitAll">保存</button>
</div>
</div>
</form>
</div>
</div>