Code Duplication    Length = 13-13 lines in 2 locations

backend/views/post/index.php 1 location

@@ 118-130 (lines=13) @@
115
116
                        return '';
117
                    },
118
                    'delete' => function ($url, $model) {
119
                        /* @var $model \common\models\search\Post */
120
                        if ($model->getPermission()) {
121
                            return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [
122
                                'title' => Yii::t('yii', 'Delete'),
123
                                'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),
124
                                'data-method' => 'post',
125
                                'data-pjax' => '0',
126
                            ]);
127
                        }
128
129
                        return '';
130
                    },
131
                ],
132
            ],
133
        ],

backend/views/user/index.php 1 location

@@ 117-129 (lines=13) @@
114
115
                        return '';
116
                    },
117
                    'delete' => function ($url, $model) {
118
                        /* @var $model \common\models\User */
119
                        if ($model->checkPermission()) {
120
                            return Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [
121
                                'title' => Yii::t('writesdown', 'Delete'),
122
                                'data-confirm' => Yii::t('writesdown', 'Are you sure you want to delete this item?'),
123
                                'data-method' => 'post',
124
                                'data-pjax' => '0',
125
                            ]);
126
                        }
127
128
                        return '';
129
                    },
130
                ],
131
            ],
132
        ],