<?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    Admin
 * @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
 * @author     charlesvineyard
 */
?>
<?php $this->dojo()->requireModule('dijit._editor.plugins.ToggleDir')
->requireModule('dijit._editor.plugins.FullScreen')
->requireModule('dijit._editor.plugins.ViewSource')
->requireModule('dijit._editor.plugins.Print')
->requireModule('dijit._editor.plugins.NewPage')
?>
<!-- topicPath START -->
<div id="topicPath">
    <p>
        <a href="<?php echo $this->baseUrl('/admin') ?>">トップ</a>
        <img src="<?php echo $this->baseUrl('/images/admin/share/topicPath.gif') ?>" width="6" height="11" alt="の中の" />
    </p>
<?php if ($this->form->getElement('hidden_id') == null): // 新規作成の場合 ?>
    <p>ページの新規作成</p>
<?php else: // 編集の場合 ?>
    <p>
        <a href="<?php echo $this->baseUrl('/admin/page') ?>">ページの編集・削除</a>
        <img src="<?php echo $this->baseUrl('/images/admin/share/topicPath.gif') ?>" width="6" height="11" alt="の中の" />
    </p>
    <p><?php echo $this->escape($this->pageTitle) ?></p>
<?php endif ?>
</div>
<!-- topicpath END -->

<!-- section START -->
<div class="section">
<?php if ($this->form->getElement('hidden_id') == null): // 新規作成の場合 ?>
    <div class="hAreaL">
        <div class="hAreaR">
            <div class="hArea">
                <h3><img src="<?php echo $this->baseUrl('/images/admin/page/h_pageNew.jpg'); ?>" width="122" height="18" alt="ページの新規作成" /></h3>
            </div>
        </div>
    </div>
<?php else: // 編集の場合 ?>
    <div class="hAreaText">
        <h3 id="textType"><?php echo $this->escape($this->pageTitle) ?></h3>
    </div>
<?php endif ?>

<?php echo $this->partial('action-message.phtml', array('flashMessages' => $this->flashMessages)) ?>

<?php echo $this->partial('error-message.phtml', array('errorForm' => $this->form))?>

    <form action="<?php echo $this->form->getAction() ?>" method="post" enctype="MULTIPART/FORM-DATA">
        <ul class="inputStraight defaultOver">
            <li><?php echo $this->form->getElement('sub_draft1') ?></li>
            <li><?php echo $this->form->getElement('sub_open1') ?></li>
        </ul>
        <dl id="inputArea">
            <dt>
                <label for="page_title">
                    <span class="required">[必須]</span>ページタイトル
                </label>
            </dt>
            <dd>
                <?php echo $this->form->getElement('page_title') . "\n" ?>
            </dd>
            <dt>
                <label for="category_id">カテゴリー</label>
            </dt>
            <dd>
                <?php echo $this->form->getElement('category_id') . "\n" ?>
            </dd>
            <dt>
                <label for="page_contents">
                    <span class="required">[必須]</span>コンテンツ
                </label>
            </dt>
            <dd>
                <?php echo $this->form->getElement('page_contents') . "\n" ?>
            </dd>
            <dt>
                <label for="page_outline">ページの概要</label>
            </dt>
            <dd><?php echo $this->form->getElement('page_outline') . "\n" ?></dd>
            <dt>
                <label for="tag">タグ</label>（複数指定する場合はカンマ「,」で区切ってください）
            </dt>
            <dd>
                <?php echo $this->form->getElement('tag') . "\n" ?>
            </dd>
            <dt>
                <label for="create_date">作成日</label>
            </dt>
            <dd>
                <?php echo $this->form->getElement('create_date') . "\n" ?>
            </dd>
            <dt>
                <label for="create_time">作成時刻</label>
            </dt>
            <dd>
                <?php echo $this->form->getElement('create_time') . "\n" ?>
            </dd>
        </dl>
        <ul class="inputStraight defaultOver">
            <li><?php echo $this->form->getElement('sub_draft2') ?></li>
            <li><?php echo $this->form->getElement('sub_open2') ?></li>
        </ul>
        <?php if ($this->form->getElement('hidden_id') != null): // 新規作成でなく編集の場合 ?>
        <p><?php echo $this->form->getElement('hidden_id') ?></p>
        <?php endif ?>

    </form>
</div>
<!-- section END -->

