{action->getFrom assign=from}
{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}
<!-- ↑エラーメッセージ -->

<!-- ↓検索,並び替え 07/05/03 tominaga add-->
{if $action.sort=='date'}
     {assign var="s_date" value='-date'}
{else}
     {assign var="s_date" value='date'}
{/if}
{if $action.sort=='title'}
     {assign var="s_title" value='-title'}
{else}
     {assign var="s_title" value='title'}
{/if}
{if $action.sort=='releasediv'}
     {assign var="s_releasediv" value='-releasediv'}
{else}
     {assign var="s_releasediv" value='releasediv'}
{/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_news_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_news_list&listsize={$action.listsize}&sort={$s_date}&srcdispnum={$action.srcdispnum}&srcword={$action.srcword}">日付</a>&nbsp;&nbsp;
  <a href="{$scriptName}?action=admin_portalmanage_news_list&listsize={$action.listsize}&sort={$s_title}&srcdispnum={$action.srcdispnum}&srcword={$action.srcword}">タイトル</a>&nbsp;&nbsp;
  <a href="{$scriptName}?action=admin_portalmanage_news_list&listsize={$action.listsize}&sort={$s_releasediv}&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}件の記事&nbsp;&nbsp;</td>
    <td align="right">
          <form action="{$scriptName}" method="GET">
            <input type="hidden" name="action" value="admin_portalmanage_news_regist">
            <input type="hidden" name="kubun"  value="1">
            <input type="hidden" name="from"   value="{$from}">
            <input type="submit" value="記事の追加">
            </form>
     </td>
  </tr>
</table>
<br />

<!-- ↑ページナビ、データ件数、追加ボタン（上） -->

<!-- ↓お知らせ -->
  <table border="0" cellspacing="0" cellpadding="0" class="hyou">
  <tr>
    <th>日付</th>
    <th>タイトル</th>
    <th>本文</th>
    <th>公開区分</th>
    <th>操作</th>
  </tr>
{foreach from=$action.data key="key" item="news" name="row"}
  <tr>
    <!-- 07/05/04 tominag delete
      <td class="name">{if $news.delflg == 'f'}<input type="checkbox" name="newscd[]" value="{$news.newscd}"/>{/if}</td>
    -->
    <td>{$news.date}</td>
    <td>{$news.title}</td>
    <td>{$news.body}</td>
    <td>{if $news.releasediv == 0}未公開{elseif $news.releasediv == 1}公開{/if}</td>
    <td>
    <input type="button" onclick="location.href='{$scriptName}?action=admin_portalmanage_news_regist&newscd={$news.newscd}&kubun=2&from={$from}'" value="変更">
    {if $news.delflg == 'f' }
        <input type="button" onclick="location.href='{$scriptName}?action=admin_portalmanage_news_delete&newscd[]={$news.newscd}&from={$from}'" value="削除">
    {/if}</td>
  </tr>
{foreachelse}
  データがありません<br>
{/foreach}
</table>
<!-- ↑お知らせ -->

<!-- ↓ページナビ、データ件数、追加ボタン（下）07/05/03 tominaga add -->
  <table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>{$pager}&nbsp;&nbsp;
          {$action.cnt}件の記事&nbsp;&nbsp;
    </td>
    <td align="right">
          <form action="{$scriptName}" method="GET">
            <input type="hidden" name="action" value="admin_portalmanage_news_regist">
            <input type="hidden" name="kubun"  value="1">
            <input type="hidden" name="from"   value="{$from}">
            <input type="submit" value="記事の追加">
          </form>
        </td>
  </tr>
</table>
<!-- ↑ページナビ、データ件数、追加ボタン（下） -->

<!-- ↑リスト -->

<!-- 07/05/03 tominaga delete
  <input type="hidden" name="action" value="admin_portalmanage_news_delete">
  <input type="submit" value="選択した項目を削除">
  </form>
  <form name="form2" action="{$scriptName}" method="POST">
  <input type="hidden" name="action" value="admin_portalmanage_news_regist">
  <input type="hidden" name="kubun" value="1">
  <input type="submit" value="新規登録">
  </form>
  <form name="form3" action="{$scriptName}" method="POST">
  <input type="hidden" name="kubun" value="1">
  <input type="submit" value="メニューへ">
  </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"}
