<h2>《<?php echo $book->bookname;?>》</h2>
<?php echo CHtml::link('列表模式', array('/admin/chapters/list','id'=>$book->bookid));?> | <?php $this->renderPartial('_search', array('book'=>$book));?>

<br/>
<div class="clist">
<ul>
<?php foreach ($chapters as $chapter):?>
	<li><?php echo $chapter->chaptername;?></li>
<?php endforeach;?>
</ul>
</div>
<style>
.clist {
	float: left;
    width: 100%;
}
.clist li {
	border: 1px solid #DFDFDF;
	background-color:white;
	width: 340px;
	height: 26px;
	line-height: 26px;
	padding:4px 10px;
	margin-left:1px;
	float: left;
}
</style>
<br/>
<br/>
<h3>章节排序</h3>
<form action="<?php echo $this->createUrl('chapters/sort', array('id'=>$book->bookid));?>" method="post">
将<select name="fromid">
    <?php foreach ($chapters as $chapter):?>
        <option value="<?php echo $chapter['sort'];?>"><?php echo $chapter['chaptername'];?></option>
    <?php endforeach;?>
</select>
移动到
<select name="toid">
    <option value="0">--最前面--</option>
    <?php foreach ($chapters as $chapter):?>
        <option value="<?php echo $chapter['sort'];?>"><?php echo $chapter['chaptername'];?></option>
    <?php endforeach;?>
</select>之后
<?php echo CHtml::submitButton('移动');?>
</form>
<?php
$this->widget('application.extensions.fancybox.EFancyBox', array(
    'target'=>'a.update,a.create',
    'config'=>array(
            'titleShow' => false,
            'scrolling' => false,
            'mouseEnabled' => false,
            'gallery' => false,    
        ),
    )
);
?>