Add alert when no bower.json file exists.
This commit is contained in:
parent
1087ddf9ef
commit
a8b60e0112
@ -25,7 +25,7 @@ use yii\widgets\DetailView;
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<div class="col-sm-10">
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
@ -45,7 +45,7 @@ use yii\widgets\DetailView;
|
||||
],
|
||||
]) ?>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-sm-2">
|
||||
<?= Html::a(Html::img($model->screenshot, [
|
||||
'class' => 'thumbnail',
|
||||
'style' => 'max-width:100%',
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use app\components\Git;
|
||||
use yii\bootstrap\Alert;
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
@ -15,9 +16,20 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
<h1>
|
||||
<?= Html::encode($this->title) ?>
|
||||
<?= Html::a('Update', ['update', 'name' => $model->name], ['class' => 'btn btn-primary pull-right']) ?>
|
||||
<?= Html::a('Update bower.json', ['update', 'name' => $model->name], ['class' => 'btn btn-primary pull-right']) ?>
|
||||
</h1>
|
||||
|
||||
<?php
|
||||
if (!$model->bower) {
|
||||
echo Alert::widget([
|
||||
'options' => [
|
||||
'class' => 'alert-danger',
|
||||
],
|
||||
'body' => 'This mod has no ' . Html::a('bower.json', ['/docs/bower-json-format']) . ' file. Please consider adding one to the <a href="' . Git::getUrl($model->url) . '">repository</a>.',
|
||||
]);
|
||||
}
|
||||
?>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
|
Loading…
x
Reference in New Issue
Block a user