{action->getPager assign=pager}

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

<div id="container">

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

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

<h3>おすすめ商品</h3>


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


<!-- ↓保持パラメータ -->
{action->getExtraParam assign=extparam}
<!-- ↑保持パラメータ -->

<!--↓検索,並び替え -->
{*
{if $action.sort=='maker'}
     {assign var="s_maker" value='-maker'}
{else}
     {assign var="s_maker" value='maker'}
{/if}
{if $action.sort=='label'}
     {assign var="s_label" value='-label'}
{else}
     {assign var="s_label" value='label'}
{/if}
*}
{if $action.sort=='title'}
     {assign var="s_title" value='-title'}
{else}
     {assign var="s_title" value='title'}
{/if}
{if $action.sort=='startdate'}
     {assign var="s_startdate" value='-startdate'}
{else}
     {assign var="s_startdate" value='startdate'}
{/if}
{if $action.sort=='closedate'}
     {assign var="s_closedate" value='-closedate'}
{else}
     {assign var="s_closedate" value='closedate'}
{/if}
{if $action.sort=='priority'}
     {assign var="s_priority" value='-priority'}
{else}
     {assign var="s_priority" value='priority'}
{/if}


  <form method="get" action="">
<table border="0" cellspacing="0" cellpadding="0" class="search-box">
 <tr>
   <td>
    <input type="text" name="srcword" value="{$action.srcword}" size="25">&nbsp;
    <input type="submit" name="dispatch_admin_portalmanage_recommend_list" value="検索">&nbsp;
    <select name="srcdispnum">
      <option value="12">表示件数</option>
      {foreach from=$action.srcdispnumlist item=srcdisp}
        <option value="{$srcdisp}" {if $srcdisp==$action.srcdispnum} selected{/if}>{$srcdisp}</option>
      {/foreach}
    </select>
    <span style="display: none;"><input type="text" name="dummy"></span>
   </td>
 </tr>
</table>
  </form>


<table border="0" cellspacing="0" cellpadding="0" class="border-non">
 <tr>
   <td>
   <strong>並び替え</strong>&nbsp;&nbsp;
{*
  <a href="{$scriptName}?action=admin_portalmanage_recommend_list&listsize={$action.listsize}&sort={$s_maker}&srcdispnum={$action.srcdispnum}&srcword={$action.srcword}">メーカー</a>&nbsp;&nbsp;
*}
  <a href="{$scriptName}?action=admin_portalmanage_recommend_list&listsize={$action.listsize}&sort={$s_title}&srcdispnum={$action.srcdispnum}&srcword={$action.srcword}">タイトル</a>&nbsp;&nbsp;
{*
  <a href="{$scriptName}?action=admin_portalmanage_recommend_list&listsize={$action.listsize}&sort={$s_label}&srcdispnum={$action.srcdispnum}&srcword={$action.srcword}">レーベル</a>&nbsp;&nbsp;
&nbsp;&nbsp;
*}
  <a href="{$scriptName}?action=admin_portalmanage_recommend_list&listsize={$action.listsize}&sort={$s_startdate}&srcdispnum={$action.srcdispnum}&srcword={$action.srcword}">表示開始日</a>&nbsp;&nbsp;
  <a href="{$scriptName}?action=admin_portalmanage_recommend_list&listsize={$action.listsize}&sort={$s_closedate}&srcdispnum={$action.srcdispnum}&srcword={$action.srcword}">表示終了日</a>&nbsp;&nbsp;
  <a href="{$scriptName}?action=admin_portalmanage_recommend_list&listsize={$action.listsize}&sort={$s_priority}&srcdispnum={$action.srcdispnum}&srcword={$action.srcword}">優先度</a>&nbsp;&nbsp;
   </td>
 </tr>
</table>


<form name="form1" action="{$scriptName}" method="POST">


<!-- ↓ページナビ、データ件数 -->
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
        {$pager}&nbsp;&nbsp;
        {$action.cnt}件のデータ
    </td>
  </tr>
</table>
<!-- ↑ページナビ、データ件数 -->



<table border="0" cellspacing="0" cellpadding="0" class="hyou">
  <tr>
{*    <th>メーカー</th>*}
    <th>タイトル</th>
{*    <th>レーベル</th>*}
    <th>表示期間</th>
    <th>優先度</th>
    <th>操作</th>
  </tr>
  
  {foreach from=$action.data item=recommend}
  <tr>
{*    <td>{$recommend.makernm}</td>*}
    <td>{$recommend.itemnm}</td>
{*    <td>{$recommend.labelnm}</td>*}
    <td>{$recommend.startdate}～{$recommend.closedate}</td>
    <td align="center">{$recommend.priority}</td>
    <td align="center">
    <input type="button" onclick="location.href='{$scriptName}?action=admin_portalmanage_recommend_regist&itemcd={$recommend.itemcd}&kubun=2&{$extparam}'" value="変更">
    {if $recommend.delflg == 'f' }
    <input type="button" onclick="location.href='{$scriptName}?action=admin_portalmanage_recommend_delete&itemcd={$recommend.itemcd}&{$extparam}'" value="削除">
    {/if}</td>
  </tr>
  {/foreach}
</table>



<!-- ↓ページナビ、データ件数 -->
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
        {$pager}&nbsp;&nbsp;
        {$action.cnt}件のデータ
    </td>
  </tr>
</table>
<!-- ↑ページナビ、データ件数 -->


</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"}
