Initial commit,修正
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
$this->title = isset($title) ? $title : '提示';
|
||||
$content = isset($content) ? $content : '';
|
||||
$class = isset($class) ? $class : 'info';
|
||||
$class = in_array($class,['danger','warning','success','info']) ? $class : 'info';
|
||||
$buttons = isset($buttons) ? $buttons : [['title'=>'好的,我知道了','class'=>'primary','url'=>false]];
|
||||
|
||||
?>
|
||||
<div class="site-index" style="text-align: center;width:80%;margin-left:10%;">
|
||||
<div style="margin-top: 100px;">
|
||||
<h1><?=Html::encode($this->title) ?></h1><br>
|
||||
</div>
|
||||
<div class="alert alert-<?php echo $class;?> fade in" role="alert">
|
||||
<?php echo $content; ?>
|
||||
</div>
|
||||
<?php foreach($buttons as $btn){?>
|
||||
<a <?php if($btn['url']){?> href="<?php echo $btn['url'];?>" <?php }?> class="btn btn-<?php if($btn['class']){echo $btn['class'];}else{echo 'primary';}?>"><?php if($btn['title']){echo $btn['title'];}else{echo '点击按钮';}?></a>
|
||||
<?php }?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user