Initial commit,修正
This commit is contained in:
Executable
+93
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @Author: fm453
|
||||
* @Date: 2018-11-23 12:17:02
|
||||
* @Last Modified by: fm453
|
||||
* @Last Modified time: 2020-09-12 21:21:50
|
||||
* @Email: fm453@lukegzs.com
|
||||
*/
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
use yii\helpers\Url;
|
||||
use yii\widgets\LinkPager;
|
||||
|
||||
$this->title = '轿车品牌列表';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
?>
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a class="btn btn-info btn-sm" href="<?= Url::toRoute('carbrand/new')?>">新增品牌</a>
|
||||
</div>
|
||||
<div class="col-sm-3 pull-right">
|
||||
<form action="<?=Url::current(['pid' => Yii::$app->session->get('pid')], false);?>" method="post">
|
||||
<input type="hidden" name="_csrf-backend" value="<?= Yii::$app->getRequest()->getCsrfToken();?>" />
|
||||
<div class="input-group">
|
||||
<input class="input-sm form-control" type="text" placeholder="请输入品牌名" name="title" value="<?=$search['title']?>">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>品牌</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach($brands as $vo):?>
|
||||
<tr>
|
||||
<td><?=$vo['id']?></td>
|
||||
<td><?=$vo['title']?></td>
|
||||
<td>
|
||||
<?php if($vo['status_code']==1){?>
|
||||
<label class="btn btn-info btn-xs"><?=isset($status[$vo['status_code']]) ? $status[$vo['status_code']] : '未知'?></label>
|
||||
<?php }else{?>
|
||||
<label class="btn btn-default btn-xs"><?=isset($status[$vo['status_code']]) ? $status[$vo['status_code']] : '未知'?></label>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<a class="btn btn-primary btn-xs" href="<?=Url::toRoute(['carbrand/ajax','id'=>$vo['id'],'do'=>'show'])?>" mini="ajax">显示</a>
|
||||
<a class="btn btn-default btn-xs" href="<?=Url::toRoute(['carbrand/ajax','id'=>$vo['id'],'do'=>'hide'])?>" mini="ajax">隐藏</a>
|
||||
</p>
|
||||
<a class="btn btn-primary btn-xs" href="<?=Url::toRoute(['carbrand/edit','id'=>$vo['id']])?>"><i class="fa fa-edit"></i>编辑</a>
|
||||
<a title="点击将删除" href="<?=Url::toRoute(['carbrand/delete','id'=>$vo['id']])?>" class="btn btn-xs btn-danger" mini="act"><i class="fa fa-trash bigger-120"></i>删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--分页-->
|
||||
<div class="f-r">
|
||||
<?= LinkPager::widget([
|
||||
'pagination'=>$pager,
|
||||
'firstPageLabel' => '首页',
|
||||
'nextPageLabel' => '下一页',
|
||||
'prevPageLabel' => '上一页',
|
||||
'lastPageLabel' => '末页',
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>品牌信息</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="alert alert-info">
|
||||
此处录入轿车品牌的信息
|
||||
</div>
|
||||
<form role="form" class="form-horizontal m-t" method="post" action="<?=Url::toRoute('carbrand/save')?>" >
|
||||
<input type="hidden" name="_csrf-backend" value="<?=Yii::$app->getRequest()->getCsrfToken();?>" />
|
||||
<input type="hidden" name="id" value="<?=isset($detail['id'])?$detail['id']:0;?>">
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label">品牌:</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="title" name="title" placeholder="品牌名称" autocomplete="off" value="<?=isset($detail['title'])?$detail['title']: ''?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label">状态:</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<?php foreach($status as $vo=>$ko):?>
|
||||
<div class="radio radio-primary radio-inline">
|
||||
<input type="radio" <?=((isset($detail['status_code'])&&$detail['status_code']==$vo)||(!isset($detail['status_code'])&&$vo==1))?'checked':'';?> value="<?=$vo?>" id="status_code" name="status_code">
|
||||
<label for="status_code"><?=$ko?></label>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="form-group draggable">
|
||||
<div class="col-sm-12 col-sm-offset-3">
|
||||
<button class="btn btn-primary" type="submit">保存内容</button>
|
||||
<button class="btn btn-white" type="submit">取消</button>
|
||||
<a class="btn btn-info" href="<?=Url::toRoute('list')?>">全部品牌</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+88
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @Author: fm453
|
||||
* @Date: 2018-11-23 12:17:02
|
||||
* @Last Modified by: fm453
|
||||
* @Last Modified time: 2020-09-12 19:24:27
|
||||
* @Email: fm453@lukegzs.com
|
||||
*/
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\bootstrap\ActiveForm;
|
||||
use yii\helpers\Url;
|
||||
use yii\widgets\LinkPager;
|
||||
|
||||
$this->title = '轿车品牌列表';
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
?>
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a class="btn btn-info btn-sm" href="<?= Url::toRoute('carbrand/new')?>">新增品牌</a>
|
||||
</div>
|
||||
<div class="col-sm-3 pull-right">
|
||||
<form action="<?=Url::current(['pid' => Yii::$app->session->get('pid')], false);?>" method="post">
|
||||
<input type="hidden" name="_csrf-backend" value="<?= Yii::$app->getRequest()->getCsrfToken();?>" />
|
||||
<div class="input-group">
|
||||
<input class="input-sm form-control" type="text" placeholder="请输入品牌名" name="title" value="<?=$search['title']?>">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>品牌</th>
|
||||
<th>状态</th>
|
||||
<th><a class="btn btn-primary btn-xs" onclick="parent.selectCarBrand('','','<?=$callback?>');">清除选择</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php foreach($brands as $vo):?>
|
||||
<tr>
|
||||
<td><?=$vo['id']?></td>
|
||||
<td><?=$vo['title']?></td>
|
||||
<td>
|
||||
<?php if($vo['status_code']==1){?>
|
||||
<label class="btn btn-info btn-xs"><?=isset($status[$vo['status_code']]) ? $status[$vo['status_code']] : '未知'?></label>
|
||||
<?php }else{?>
|
||||
<label class="btn btn-default btn-xs"><?=isset($status[$vo['status_code']]) ? $status[$vo['status_code']] : '未知'?></label>
|
||||
<?php }?>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-primary btn-xs" onclick="parent.selectCarBrand('<?=$vo['title']?>','<?=$vo['id']?>','<?=$callback?>');">选择</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!--分页-->
|
||||
<div class="f-r">
|
||||
<?= LinkPager::widget([
|
||||
'pagination'=>$pager,
|
||||
'firstPageLabel' => '首页',
|
||||
'nextPageLabel' => '下一页',
|
||||
'prevPageLabel' => '上一页',
|
||||
'lastPageLabel' => '末页',
|
||||
]) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user