{include file="head.html"}
<div id="maincontent">
  <div class="wrap">
    <div class="crumbs"> <a href="__APP__/index/home">{lang='扩展'}</a> <a href="__URL__">{lang='扩展模型'}</a> </div>
    <hr />
    <div class="admin_main_tool">
      <div class="admin_main_function">
        <h2>{$info['name']} - {lang='字段管理'}</h2>
        <a href="javascript:void(0)" onclick="open_window('__URL__/manage_add-{$info['id']}','{lang='添加字段'}');" >{lang='添加字段'}</a>
        <div style="clear:both"></div>
      </div>
      
      <div style="clear:both"></div>
    </div>
    <table class="list_table table_style">
      <thead>
         <tr>
            <th width="10%"><div align="center">ID</div></th>
            <th width="20%"><div align="center">{lang='字段描述'}</div></th>
            <th width="20%"><div align="center">{lang='字段名'}</div></th>
            <th width="20%"><div align="center">{lang='类型'}</div></th>
            <th width="30%"><div align="center">{lang='添管理操作'}</div></th>
          </tr>
      </thead>      
      <?php if(is_array($list)) foreach ($list as $vo) { ?>
        <tr id="del_{$vo['id']}">
          <td align="center">{$vo['id']}</td>
          <td align="center">{$vo['name']}</td>
          <td align="center">{$vo['field']}</td>
          <td align="center">
          <?php 
          switch($vo['type']) {
          case 1:        
                echo module('common')->getlang('单行文本');
                break;
          case 2:        
                echo module('common')->getlang('多行文本');
                break;
          case 3:        
                echo module('common')->getlang('编辑器');
                break;
          case 4:        
                echo module('common')->getlang('下拉列表');
                break;
          case 5:        
                echo module('common')->getlang('上传框');
                break;
          case 6:        
                echo module('common')->getlang('数字');
                break;
          case 7:        
                echo module('common')->getlang('货币(保留2位小数)');
                break;
          case 8:        
                echo module('common')->getlang('时间');
                break;
          }
          ?>
          </td>
          <td align="center"><a href="javascript:void(0)" onclick="open_window('__URL__/manage_edit-{$vo['id']}','{lang='修改'}');">{lang='修改'}</a> | <a onclick="del('__URL__/manage_del-{$vo['id']}','{lang='确认要删除该字段吗？'}','{lang='操作提示'}',this)" href="javascript:void(0)">{lang='删除'}</a></td>
        </tr>
        <?php } ?>
    </table>
  </div>
</div>
</body></html>