<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title> new document </title>
  <meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
  <link href="admin/styles/general.css" rel="stylesheet" type="text/css" />
  {script src="ecmall,ajax,validator,ui.datagrid"}
  <script type="text/javascript" src="?act=jslang"></script>
  <script type="text/javascript">
    Event.observe(window, 'load', function() {
      var grid = new ui.DataGrid($("data-grid"));
      grid.action = "modify";
    });
  </script>
 </head>

 <body>
  <ul id="container">
    <li id="header">
      <h1>{$lang.list_attribute}</h1>
      <div class="link">[<a href="admin.php?app=attribute&amp;act=add&amp;type_id={$type_id}">{$lang.add_attribute}</a>] [<a href="admin.php?app=goodstype&amp;act=view">{$lang.back_goodstype}</a>]</div>
      <div id="desc">
        <span>{$stats}</span>
      </div>
    </li>
    <li id="wrapper">
      <table class="grid" cellspacing="0" id="data-grid">
        <tr>
          <th class="first-cell" readOnly="false" columnName="attr_name" dataType="string" required="true"><input type="checkbox" class="checkAll" /> {sort_link by=attr_name text=$lang.attr_name}</th>
          <th>{sort_link by=input_type text=$lang.input_type}</th>
          <th width="30%">{sort_link by=value_range text=$lang.value_range}</th>
          <th readOnly="false" columnName="sort_order" dataType="int" >{sort_link by=sort_order text=$lang.sort_order}</th>
          <th>{$lang.handler}</th>
        </tr>
        {foreach from=$list.data item=info}
        <tr id="{$info.attr_id}">
          <td class="first-cell"><input type="checkbox" name="id" value="{$info.attr_id}" /> <span>{$info.attr_name|escape}</span></td>
          <td>{$lang.input_type_list[$info.input_type]}</td>
          <td>{$info.value_range|default:N/A}</td>
          <td><span>{$info.sort_order}</span></td>
          <td><a href="admin.php?app=attribute&amp;act=edit&amp;id={$info.attr_id}">{$lang.edit}</a> | <a href="admin.php?app=attribute&amp;act=drop&amp;id={$info.attr_id}" onclick="return confirm('{$lang.drop_confirm}')">{$lang.delete}</a></td>
        </tr>
        {foreachelse}
        <tr><td colspan="5" class="no-records">{$lang.no_records}</td></tr>
        {/foreach}
        <tr>
          <td colspan="12">
            <ul id="batch-links">
              <li class="batch-link" action="batch" param="drop|{$type_id}">{$lang.delete}</li>
            </ul>
          </td>
        </tr>
      </table>
    </li>
    {include file="admin/templates/footer.html"}
  </ul>
 </body>
</html>