<?php
/**
 * あるカテゴリに属するページ一覧を表示するページ
 *
 * Copyright (c) 2010-2011 SetucoCMS Project.(http://sourceforge.jp/projects/setucocms)
 * All Rights Reserved.
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * @category   Setuco
 * @package    Default
 * @subpackage View_Script_Page
 * @license    http://www.opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
 * @copyright  Copyright (c) 2010 SetucoCMS Project.(http://sourceforge.jp/projects/setucocms)
 * @link
 * @version
 * @since      File available since Release 0.1.0
 * @param      entries カテゴリに属するページのデータを収めた配列
 * @param      category カテゴリのデータ
 * @author     akitsukada
 */
?>
<?php if (count($this->entries) > 0): ?>
    <p><?php echo "カテゴリー「{$this->escape($this->category['name'])}」" ?>のページ一覧</p>
    <?php foreach($this->entries as $id => $entry): ?>
    <!-- entry START -->
    <div class="entry">
        <div class="entryHead">
            <h2><a href="<?php echo $this->baseUrl('page/show/id/' . $entry['id']) ?>"><?php echo $this->escape($entry['title']) ?></a></h2>
            <p><?php echo $entry['update_date'] ?></p>
        </div>
        <dl class="category">
            <dt>カテゴリー：</dt>
                <dd><a href="<?php echo $this->baseUrl('page/category/id/' . $this->category['id']) ?>" ><?php echo $this->escape($this->category['name']) ?></a></dd>
        </dl>
        <div class="entryBody">
            <?php echo $this->escape($entry['contents'] . "\n") ?>
            <p><a href="<?php  echo $this->baseUrl('page/show/id/' . $entry['id']) ?>">続きを読む</a></p>
        </div>
        <p class="backTop"><a href="#wrapper">ページの先頭に戻る</a></p>
    </div>
    <!-- entry END -->
    <?php endforeach ?>
    <?php echo $this->paginator //ページャーの表示 ?>
<?php else: ?>
    <p>カテゴリー「<?php echo $this->escape($this->category['name']) ?>」にはページがありません。</p>
<?php endif ?>