<!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,ui.datagrid,ajax,json,validator"}
  <script type="text/javascript" src="?act=jslang"></script>
  <script type="text/javascript">
  //<![CDATA[
    var myDataGrid = null;
    Event.observe(window, "load" ,function(){
      myDataGrid = new ui.DataGrid($("myDataGrid"));
      myDataGrid.action = "modify";
    });
  //]]>
  </script>
 </head>

 <body>
  <ul id="container">
    <li id="header">
      <h1>{$lang.nav_view}</h1>
      <div class="link">[<a href="admin.php?app=nav&amp;act=add">{$lang.nav_add}</a>]</div>
      <div id="desc"></div>
    </li>
    <li id="wrapper">
    <select id='myDropDownlist' style="display:none">
    <option value="top">{$lang.top}</option>
    <option value="middle">{$lang.middle}</option>
    <option value="bottom">{$lang.bottom}</option>
    </select>
     <table class="grid" cellspacing="0" cellpadding="4" id="myDataGrid">
        <tr>
          <th readOnly=false columnName="nav_name" dataType="string" required="false" class="first-cell">{$lang.name}</th>
          <th readOnly=false columnName="if_show" dataType="bool">{$lang.if_show}</th>
          <th readOnly=false columnName="open_new" dataType="bool">{$lang.if_blank}</th>
          <th readOnly=false columnName="sort_order" dataType="int" required="true">{$lang.sort_order}</th>
          <th readOnly=false columnName="nav_position" dataType="string" dropDownList="myDropDownlist">{$lang.position}</th>
          <th>{$lang.handler}</th>
        </tr>
        {foreach from=$list key=position item=items}
            {foreach from=$items item=nav}
            <tr id="{$nav.nav_id}">
              <td class="first-cell"><span>{$nav.nav_name|escape}</span></td>
              <td>{img_yesorno value=$nav.if_show dir=admin/images}</td>
              <td>{img_yesorno value=$nav.open_new dir=admin/images}</td>
              <td><span>{$nav.sort_order}</span></td>
              <td><span>{$lang.$position}</span></td>
              <td class="handlelist">
                 <a href="admin.php?app=nav&amp;act=edit&amp;id={$nav.nav_id}">{$lang.edit}</a> |
                 <a href="admin.php?app=nav&amp;act=drop&amp;id={$nav.nav_id}" onclick="{if $nav.is_app gt 0}alert('{$lang.nav_app_not_delete}');return false;{else}return confirm('{$lang.confirm_delete}');{/if}">{$lang.delete}</a>
              </td>
            </tr>
            {/foreach}
        {foreachelse}
          <tr><td colspan="6" class="no-records">{$lang.no_records}</td></tr>
        {/foreach}
      </table>
      <div id="page-list"></div>
    </li>
    {include file="admin/templates/footer.html"}
  </ul>
 </body>
</html>
