-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #311 from Lenkaaa/feature/AddDoubleRedirectFinder
add double redirect finder
- Loading branch information
Showing
5 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
application/modules/seo/views/manage/redirect-doubles-finder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?php | ||
|
||
use yii\grid\GridView; | ||
use yii\helpers\Url; | ||
use yii\widgets\Pjax; | ||
use yii\helpers\Html; | ||
|
||
/** | ||
* @var $id | ||
* @var yii\web\View $this | ||
* @var yii\data\ActiveDataProvider $dataProvider | ||
*/ | ||
|
||
$this->title = Yii::t('app', 'Doubles Redirects'); | ||
|
||
?> | ||
|
||
<h1><?= Html::encode($this->title) ?></h1> | ||
|
||
<?php Pjax::begin() ?> | ||
|
||
<?= GridView::widget([ | ||
'id' => 'redirects', | ||
'dataProvider' => $dataProvider, | ||
'layout' => "{items}\n{summary}\n{pager}", | ||
'columns' => [ | ||
[ | ||
'class' => 'yii\grid\CheckboxColumn', | ||
'options' => [ | ||
'width' => '10px', | ||
], | ||
], | ||
[ | ||
'class' => 'yii\grid\DataColumn', | ||
'attribute' => 'type', | ||
'filter' => \app\modules\seo\models\Redirect::getTypes(), | ||
], | ||
'from', | ||
[ | ||
'class' => 'app\backend\components\ActionColumn', | ||
'urlCreator' => function ($action, $model, $key, $index) { | ||
$params = ['Redirect[from]' => $model->from]; | ||
$params[0] = '/seo/manage/redirect'; | ||
return Url::toRoute($params); | ||
}, | ||
'buttons' => [ | ||
[ | ||
'url' => 'all', | ||
'icon' => 'list', | ||
'class' => 'btn-primary', | ||
'label' => Yii::t('app', 'Show all'), | ||
], | ||
], | ||
], | ||
|
||
], | ||
'tableOptions' => [ | ||
'class' => 'table table-striped table-condensed table-hover', | ||
] | ||
]); ?> | ||
|
||
<?php Pjax::end(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters