<commit_before><?php

use app\assets\ParamSetGlobalAsset;
use app\assets\LayerGlobalAsset;

use yii\widgets\ActiveForm;
use yii\widgets\LinkPager;

use yii\Helpers\Url;
use yii\Helpers\Html;

ParamSetGlobalAsset::register( $this );
LayerGlobalAsset::register( $this );


/** -------------------------------------------------------
 * 判断是否出现 " 操作成功 " 的 tip 层
 * @var $session['isShowTip'] boolean  为 true 则出现 tip 层，false反之
 */
#if ( $session['isShowTip'] ){
#	echo " <script> window.onload = function(){ layer.msg('操作成功', { icon: 1, offset:'100px'}) } </script>";
#	$session['isShowTip'] = false;
#}

?>


<div class="all">
	<div class="bread-nav">
		<span>参数设置</span>  >
		<span>读者类型管理</span>
	</div>


<?php
/**----------------------------------------------------
 * 书架添加 
 */
?>
	<div class="input-box reader-type-input-box" >
		<?php $form = ActiveForm::begin();  ?> 
			<?= $form->field( $model, 'readerTypeName') ->textinput(['placeholder' => '读者类型名称', 'class' => 'form-control reader-type-name']) -> label( false ) ?>
			<?= $form->field( $model, 'readerTypeBorrowNumber') ->textinput(['placeholder' => '可借数量', 'class' => 'borrow-number form-control']) -> label( false ) ?>

			<?= Html::submitButton('新增', ['class' => 'btn btn-primary add-btn'])	?>		
		<?php ActiveForm::end()  ?>
	</div>

	<div>
		

	</div>


<?php
/** -----------------------------------------------------
 * 书架列表
 */
?>
	<div class="table-box">
		<table class="table table-hover table-bordered text-center">
			<thead>
				<tr class="active"o>
					<td><b>读者类型名称</b></td>
					<td><b>可借图书数量</b></td>
					<td><b>编辑</b></td>
					<td><b>删除</b></td>
				</tr>
			</thead>
			<tbody>

			</tbody>
		</table>
	</div><commit_msg>view层增加显示读者类型数据的功能段<commit_after><?php

use app\assets\ParamSetGlobalAsset;
use app\assets\LayerGlobalAsset;

use yii\widgets\ActiveForm;
use yii\widgets\LinkPager;

use yii\Helpers\Url;
use yii\Helpers\Html;

ParamSetGlobalAsset::register( $this );
LayerGlobalAsset::register( $this );


/** -------------------------------------------------------
 * 判断是否出现 " 操作成功 " 的 tip 层
 * @var $session['isShowTip'] boolean  为 true 则出现 tip 层，false反之
 */
#if ( $session['isShowTip'] ){
#	echo " <script> window.onload = function(){ layer.msg('操作成功', { icon: 1, offset:'100px'}) } </script>";
#	$session['isShowTip'] = false;
#}

?>


<div class="all">
	<div class="bread-nav">
		<span>参数设置</span>  >
		<span>读者类型管理</span>
	</div>


<?php
/**----------------------------------------------------
 * 书架添加 
 */
?>
	<div class="input-box reader-type-input-box" >
		<?php $form = ActiveForm::begin();  ?> 
			<?= $form->field( $model, 'readerTypeName') ->textinput(['placeholder' => '读者类型名称', 'class' => 'form-control reader-type-name']) -> label( false ) ?>
			<?= $form->field( $model, 'readerTypeBorrowNumber') ->textinput(['placeholder' => '可借数量', 'class' => 'borrow-number form-control']) -> label( false ) ?>

			<?= Html::submitButton('新增', ['class' => 'btn btn-primary add-btn'])	?>		
		<?php ActiveForm::end()  ?>
	</div>

	<div>
		

	</div>


<?php
/** -----------------------------------------------------
 * 书架列表
 */
?>
	<div class="table-box">
		<table class="table table-hover table-bordered text-center">
			<thead>
				<tr class="active"o>
					<td><b>读者类型名称</b></td>
					<td><b>可借图书数量</b></td>
					<td><b>编辑</b></td>
					<td><b>删除</b></td>
				</tr>
			</thead>
			<tbody>
				<?php foreach( $data as $key => $value ) {  ?>
					<tr>
					<td><?php echo $data[ $key ]['readerTypeName']; ?></td>
					<td><?php echo $data[ $key ]['readerTypeBorrowNumber']; ?></td>
						<td><a href="<?= Url::toRoute(['bookshelf/update-reader-type', 'id'=>$data[$key]['PK_readerTypeID'] ])?>" >编辑</a></td>
						<td><a href="<?= Url::toRoute(['bookshelf/del-reader-type', 'id'=>$data[$key]['PK_readerTypeID'] ])?>">删除</a></td> 
				<?php } ?>
			</tbody>
		</table>
	</div>
{'fraction_non_alphanumeric': 0.30544041450777204, 'fraction_numerical': 0.002072538860103627, 'mean_word_length': 2.670152091254753, 'pattern_counts': {'":': 0, '<': 116, '<?xml version=': 0, '>': 143, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5740735', 'n_tokens_mistral': 1604, 'n_tokens_neox': 1529, 'n_words': 249}