123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288 |
- {include file="public/layout" /}
- <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;">
- <div id="append_parent"></div>
- <div id="ajaxwaitid"></div>
- <div class="page">
- {include file="field/attribute_bar" /}
- <div class="flexigrid">
- <div class="mDiv">
- <div class="ftitle">
- <h3>
- 留言模型 - 字段列表
- </h3>
- <h5>(共{$pager->totalRows}条数据)</h5>
- </div>
- <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
- <form id="searchForm" class="navbar-form form-inline" action="{:url('Field/attribute_index')}" method="get" onsubmit="layer_loading('正在处理');">
- {$searchform.hidden|default=''}
- <div class="sDiv">
- <div class="sDiv2">
- {gt name='$typeidNum' value='1'}
- <select name="typeid" class="select" style="margin:0px 5px;">
- <option value="">--全部栏目--</option>
- {$select_html|default=''}
- </select>
- {/gt}
- </div>
- <div class="sDiv2">
- <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="字段搜索...">
- <input type="submit" class="btn" value="搜索">
- </div>
- <!-- <div class="sDiv2">
- <input type="button" class="btn" value="重置" onClick="window.location.href='{:url('Field/attribute_index', array("typeid"=>$Request.param.typeid))}';">
- </div> -->
- </div>
- </form>
- </div>
- <div class="hDiv">
- <div class="hDivBox">
- <table cellspacing="0" cellpadding="0" style="width: 100%">
- <thead>
- <tr>
- {eq name='$main_lang' value='$admin_lang'}
- <th class="sign w40" axis="col0">
- <div class="tc">选择</div>
- </th>
- {/eq}
- <th abbr="article_title" axis="col3" class="w40">
- <div class="tc">ID</div>
- </th>
- <th abbr="article_title" axis="col3" class="">
- <div style="text-align: left; padding-left: 10px;" class="">字段标题</div>
- </th>
- <th abbr="article_time" axis="col6" class="w100">
- <div class="tc">属性类型</div>
- </th>
- <th abbr="article_time" axis="col6" class="w100">
- <div class="tc">所属栏目</div>
- </th>
- <th abbr="article_title" axis="col3" class="w100">
- <div class="tc">后台列表显示</div>
- </th>
- <th axis="col1" class="w180">
- <div class="tc">操作</div>
- </th>
- </tr>
- </thead>
- </table>
- </div>
- </div>
- <div class="bDiv" style="height: auto;">
- <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
- <table>
- <tbody>
- {empty name="list"}
- <tr>
- <td class="no-data" align="center" axis="col0" colspan="50">
- <i class="fa fa-exclamation-circle"></i>没有符合条件的记录
- </td>
- </tr>
- {else/}
- {volist name="list" id="vo" key="k"}
- <tr>
- {eq name='$main_lang' value='$admin_lang'}
- <td class="sign">
- <div class="tc w40">
- <input type="checkbox" name="ids[]" value="{$vo.attr_id}">
- </div>
- </td>
- {/eq}
- <td class="sort">
- <div class="tc w40">
- {$vo.attr_id}
- </div>
- </td>
- <td style="width: 100%">
- <div style="text-align: left; padding-left: 10px;">
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_edit'|is_check_access" value="1"}
- <a href="{:url('Field/attribute_edit',array('id'=>$vo['attr_id']))}">{$vo.attr_name}</a>
- {else /}
- {$vo.attr_name}
- {/eq}
- </div>
- </td>
- <td align="center" class="">
- <div class="w100 tc">
- {$attrInputTypeArr[$vo['attr_input_type']]|default=''}
- </div>
- </td>
- <td class="">
- <div class="w100 tc">{$vo.typename|default='<i class="red">数据出错!</i>'}</div>
- </td>
- <td>
- <div class="tc w100">
- {if condition="$vo['is_showlist'] eq 1"}
- <span class="yes" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('guestbook_attribute','attr_id','{$vo.attr_id}','is_showlist',this);"{/eq} ><i class="fa fa-check-circle"></i>是</span>
- {else /}
- <span class="no" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('guestbook_attribute','attr_id','{$vo.attr_id}','is_showlist',this);"{/eq} ><i class="fa fa-ban"></i>否</span>
- {/if}
- </div>
- </td>
- <td>
- <div class="w180 tc">
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_edit'|is_check_access" value="1"}
- <a href="{:url('Field/attribute_edit',array('id'=>$vo['attr_id']))}" class="btn blue"><i class="fa fa-pencil-square-o"></i>编辑</a>
- {/eq}
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_del'|is_check_access" value="1"}
- {eq name='$main_lang' value='$admin_lang'}
- <a class="btn red" href="javascript:void(0);" data-url="{:url('Field/attribute_del')}" data-id="{$vo.attr_id}" data-deltype="pseudo" onClick="delfun(this);"><i class="fa fa-trash-o"></i>删除</a>
- {/eq}
- {/eq}
- <a class="btn blue" href="javascript:void(0);" onclick="copyToClipBoard('{$vo.fieldname}', '{$vo.attr_id}', {$vo.attr_input_type|default='0'})">标签调用</a>
- </div>
- </td>
- </tr>
- {/volist}
- {/empty}
- </tbody>
- </table>
- </div>
- <div class="iDiv" style="display: none;"></div>
- </div>
- <div class="tDiv">
- <div class="tDiv2">
- {eq name='$main_lang' value='$admin_lang'}
- <div class="fbutton checkboxall">
- <input type="checkbox" onclick="javascript:$('input[name*=ids]').prop('checked',this.checked);">
- </div>
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_del'|is_check_access" value="1"}
- <div class="fbutton">
- <a onclick="batch_del(this, 'ids');" data-url="{:url('Field/attribute_del')}" data-deltype="pseudo">
- <div class="add" title="批量删除">
- <span><i class="fa fa-close"></i>批量删除</span>
- </div>
- </a>
- </div>
- {/eq}
- {eq name="$Think.const.CONTROLLER_NAME.'@attribute_add'|is_check_access" value="1"}
- <div class="fbutton">
- <a href="javascript:void(0);" onclick="attribute_add(this);" data-href="{:url('Field/attribute_add', array('typeid'=>$Request.param.typeid))}">
- <div class="add" title="新增属性">
- <span class="red"><i class="fa fa-plus"></i>新增属性</span>
- </div>
- </a>
- </div>
- <script type="text/javascript">
- function attribute_add(obj)
- {
- var count = "{$arctypeCount|default='0'}";
- count = parseInt(count);
- if (0 == count) {
- layer.alert('请先建立留言栏目,并关联留言模型后再操作!', {icon: 5, title:false});
- } else {
- var href = $(obj).data('href');
- window.location.href = href;
- }
- }
- </script>
- {/eq}
- {/eq}
- </div>
- <div style="clear:both"></div>
- </div>
- <!--分页位置-->
- {$page}
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function(){
- // 表格行点击选中切换
- $('#flexigrid > table>tbody >tr').click(function(){
- $(this).toggleClass('trSelected');
- });
- // 点击刷新数据
- $('.fa-refresh').click(function(){
- location.href = location.href;
- });
- $('#searchForm select[name=typeid]').change(function(){
- $('#searchForm').submit();
- });
- });
- /**
- * 代码调用js
- * @param id id
- * @param limit 条数
- */
- function copyToClipBoard(fieldname, attr_id, attr_input_type) {
- if (0 == attr_input_type) { // 单行文本
- var liststr = "<input type='text' id='"+fieldname+"' name='{$"+"field."+fieldname+"}'>";
- var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;"><dd>属性提示文字:</dd>';
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{$'+'field.itemname_'+attr_id+'}"></dd>';
- contentdiv += '<dd>表单调用代码:</dd>';
- contentdiv += '<dd><input type="text" style="width:400px;" value="' + liststr + '" /></dd>';
- height = '250px';
- }
- else if (1 == attr_input_type) { // 下拉框
- var liststr = "<select name='{$"+"field."+fieldname+"}' id='"+fieldname+"'>\r\n <option value='无'>无</option>\r\n {eyou:volist name='$"+"field.options_"+attr_id+"' id='vo'}\r\n <option value='{$"+"vo.value}'>{$"+"vo.value}</option>\r\n {/eyou:volist"+"}\r\n</select>";
- var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;"><dd>属性提示文字:</dd>';
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{$'+'field.itemname_'+attr_id+'}"></dd>';
- contentdiv += '<dd>表单调用代码:</dd>';
- contentdiv += '<dd><textarea rows="4" cols="60" style="width:400px;height:110px;">' + liststr + '</textarea></dd>';
- height = '330px';
- }
- else if (2 == attr_input_type) { // 多行文本
- var liststr = "<textarea id='"+fieldname+"' name='{$"+"field."+fieldname+"}'></textarea>";
- var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;"><dd>属性提示文字:</dd>';
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{$'+'field.itemname_'+attr_id+'}"></dd>';
- contentdiv += '<dd>表单调用代码:</dd>';
- contentdiv += '<dd><input type="text" style="width:400px;" value="' + liststr + '" /></dd>';
- height = '300px';
- }
- else if (3 == attr_input_type) { // 单选框
- var liststr = "{eyou:volist name='$"+"field.options_"+attr_id+"' id='vo'}\r\n <label><input type='radio' id='"+fieldname+"' name='{$"+"field."+fieldname+"}' value='{$"+"vo.value}'>{$"+"vo.value}</label>\r\n{/eyou:volist"+"}";
- var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;"><dd>属性提示文字:</dd>';
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{$'+'field.itemname_'+attr_id+'}"></dd>';
- contentdiv += '<dd>表单调用代码:</dd>';
- contentdiv += '<dd><textarea rows="4" cols="60" style="width:400px;height:80px;">' + liststr + '</textarea></dd>';
- height = '300px';
- }
- else if (4 == attr_input_type) { // 多选框
- var liststr = "{eyou:volist name='$"+"field.options_"+attr_id+"' id='vo'}\r\n <label><input type='checkbox' name='{$"+"field."+fieldname+"}' value='{$"+"vo.value}'>{$"+"vo.value}</label>\r\n{/eyou:volist"+"}";
- var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;"><dd>属性提示文字:</dd>';
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{$'+'field.itemname_'+attr_id+'}"></dd>';
- contentdiv += '<dd>表单调用代码:</dd>';
- contentdiv += '<dd><textarea rows="4" cols="60" style="width:400px;height:80px;">' + liststr + '</textarea></dd>';
- height = '300px';
- }
- else if (5 == attr_input_type) { // 上传图片
- var liststr = "<input type='file' name='{$"+"field."+fieldname+"}' value=''>";
- var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;"><dd>属性提示文字:</dd>';
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{$'+'field.itemname_'+attr_id+'}"></dd>';
- contentdiv += '<dd>表单调用代码:</dd>';
- contentdiv += '<dd><input type="text" style="width:400px;" value="' + liststr + '" /></dd>';
- contentdiv += '<dd style="border-top: dotted 1px #E7E7E7; color:red; ">特别注意:请在前台模板的留言标签里追加 {$'+'field.formhidden} 到 <form >表单里,<a href="JavaScript:void(0);" onclick="click_to_eyou_1575506523('+"'https://www.eyoucms.com/plus/view.php?aid=8378','单张图类型教程说明'"+')">详细说明</a>。</dd>'
- height = '300px';
- } else if (8 == attr_input_type) { // 上传附件
- var liststr = "<input type='file' name='{$"+"field."+fieldname+"}' value=''>";
- var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;"><dd>属性提示文字:</dd>';
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{$'+'field.itemname_'+attr_id+'}"></dd>';
- contentdiv += '<dd>表单调用代码:</dd>';
- contentdiv += '<dd><input type="text" style="width:400px;" value="' + liststr + '" /></dd>';
- contentdiv += '<dd style="border-top: dotted 1px #E7E7E7; color:red; ">特别注意:请在前台模板的留言标签里追加 {$'+'field.formhidden} 到 <form >表单里。</dd>'
- height = '300px';
- }
- else {
- var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px;"><dd>属性提示文字:</dd>'
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{$'+'field.itemname_'+attr_id+'}"></dd>'
- contentdiv += '<dd>字段名称:</dd>'
- contentdiv += '<dd><input type="text" style=" width:400px;margin-bottom:10px;" value="{$'+'field.'+fieldname+'}"></dd>'
- height = '250px';
- }
- contentdiv += '<dd style="border-top: dotted 1px #E7E7E7; color: #F60;">请将相应标签复制并粘贴到对应模板文件中!</dd></dl></div>'
- layer.open({
- title: '标签调用',
- type: 1,
- skin: 'layui-layer-demo',
- area: ['480px', height], //宽高
- content: contentdiv
- });
- }
- </script>
- {include file="public/footer" /}
|