{include file="admin/header.html"}
{include file="admin/gnavi.html"}

<div id="container">

{include file="admin/menu/submenu_data.html"}

<!-- ↓段組み メイン側 -->
<div id="main">

<h3>ジャンルの設定</h3>

<!--↓エラーメッセージ -->
{errorList->getMessages assign=errmsg}
{if $errmsg}
  <ul class="alert">
{foreach from=$errmsg item=msg}
    <li>{$msg|escape}</li>
{/foreach}
  </ul>
{/if}
<!--↑エラーメッセージ -->

<!-- ↓アイテム -->
  <form method="POST">
  <table border="0" cellspacing="0" cellpadding="0" class="hyou">
{if $action.actionnm == "update"}
    <tr>
      <th>コード</th>
      <td>{$action.code}</td>
    </tr>
{/if}
    <tr>
      <th>親ジャンル</th>
      <td>
{action->setParentGenre assign=parents}
      <select name="pcd">
        <option value="">親ジャンルにする</option>
{foreach from=$parents item=parent}
{if $action.code!=$parent.genrecd}
        <option value="{$parent.genrecd}" {if $action.pcd==$parent.genrecd}selected=="selected"{/if}>{$parent.genrenm}</option>
{/if}
{/foreach}
      </select>
      </td>
    </tr>
    <tr>
      <th>名称</th>
      <td><input type="text" name="name" value="{$action.name}"></td>
    </tr>
    <tr>
      <th>表示順</th>
      <td><input type="text" name="dispsort" value="{$action.dispsort}"></td>
    </tr>

    <tr>
      <td colspan="2" align="center">
        <input type="submit" name="dispatch_admin_datamanage_genre_{$action.actionnm}_check" value="確認">&nbsp;&nbsp;&nbsp;
        <input type="submit" name="dispatch_admin_datamanage_genre_list" value="一覧に戻る">
      </td>
    </tr>
  </table>
<!-- ↑アイテム -->

  <input type="hidden" name="code" value="{$action.code}">
  <input type="hidden" name="v" value="{$action.v}">
  <input type="hidden" name="srcword" value="{$action.srcword}">
  <input type="hidden" name="srcdispnum" value="{$action.srcdispnum}">
  <input type="hidden" name="updcnt" value="{$action.updcnt}">
  </form>

<div class="pagetop" title="ページトップへ"><a href="#top">ページトップへ</a></div>

</div>
<!--End of main-->

<div class="cr"></div>
</div>
<!--End of container-->

{include file="admin/footer.html"}
