qa-ifish7/web/Application/Admin/View/CatField/index.html

81 lines
3.8 KiB
HTML

<include file="Inc:header"/>
<style>
.systemfield{ color:#ff0000;}
.systemfield:hover{ text-decoration: underline;}
.table-bordered .icon-ok{ color:#468847}
.table-bordered .icon-remove{ color:#ff0000}
</style>
<div class="container-fluid">
<div class="main_head">
<div class="main_h1"><h1>{$pagetitle}({$Think.config.DB_PREFIX}cat)</h1></div>
<div class="main_add">
<a class="btn btn-inverse" href="{:U('add',array('table_id'=>$table_id))}">添加字段</a>
</div>
</div>
<div style="text-align:right; float:right"></div>
<div class="row-fluid">
<div class="span12">
<div class="widget-box" style="border-left:0px;">
<div class="widget-content nopadding">
<form method="post" action="__SELF__" onsubmit="return save_form2(this);" class="modelIndex">
<input type="hidden" name="modelid" value="{$modelid}">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th width="5%">排序</th>
<th width="15%" style="text-align: left;">字段名</th>
<th width="10%" style="text-align: left;">别名</th>
<th width="15%" style="text-align: left;">字段类型</th>
<th width="10%" style="text-align: left;">表单类型</th>
<th width="5%">主表</th>
<th width="5%">唯一</th>
<th width="12%">操作</th>
</tr>
</thead>
<tbody>
<foreach name="data" item="v" >
<tr>
<td style="text-align: center;"><input type='text' value="{$v.sort}" name="sort[]" autocomplete="off" class="" style="width:30px;height:10px; margin:0px;"><input type='hidden' value="{$v.field_id}" name="filed_id[]"></td>
<td class="center {:in_array($v[field],$systemfield_inc)?'systemfield':''}" title="{:in_array($v[field],$systemfield_inc)?'系统字段':''}" style="text-align: left;">{$v.field}</td>
<td class="center" style="text-align: left;">{$v.name}</td>
<td class="center" style="text-align: left;">{$fieldtype_inc[$v[fieldtype]]}</td>
<td class="center" style="text-align: left;">{$formtype_inc[$v[formtype]]}</td>
<td class="center">{$v['issystem']?"<i class='icon-ok'></i>":"<i class='icon-remove'></i>"}</td>
<td class="center">{$v['isunique']?"<i class='icon-ok'></i>":"<i class='icon-remove'></i>"}</td>
<td class="center">
<?php
if(in_array($v[field],$systemfield_inc)){
?>
<a href="{:U("editor",array("field_id"=>$v[field_id]))}" class="btn btn-danger btn-mini">修改系统字段</a>
<?php
}else{
?>
<a href="{:U("editor",array("field_id"=>$v[field_id]))}" class="btn btn-primary btn-mini">修改</a>
<a href="{:U('delete',array("field_id"=>$v[field_id]))}" class="btn btn-danger btn-mini ajax_del">删除</a>
<?php
}
?>
</td>
</tr>
</foreach>
</tbody>
</table>
</form>
</div>
</div>
<div class="widget-bottom">
<button class="btn btn-success" onclick="$('.modelIndex').attr('action','{:U('sort')}');$('.modelIndex').submit();" type="button">修改顺序</button>
</div>
</div>
</div>
</div>
<include file="Inc/footer"/>