diff --git a/views/tickets/index.php b/views/tickets/index.php index 04aeb64..e94ff50 100644 --- a/views/tickets/index.php +++ b/views/tickets/index.php @@ -83,7 +83,7 @@ FontAwesomeAsset::register($this); }, 'delete' => function ($url, $model, $key) { if ($model->status !== Tickets::STATUS_CLOSED) { - return Html::a('', $url, [ + return Html::a('', ['delete', 'id' => $model->id, 'from' => 'index'], [ 'title' => '关闭工单', 'data-pjax' => '0', 'data-confirm' => '你确定要关闭这个工单吗?', diff --git a/views/tickets/view.php b/views/tickets/view.php index 81179e8..b3a1dd7 100644 --- a/views/tickets/view.php +++ b/views/tickets/view.php @@ -72,10 +72,10 @@ $this->registerCssFile('@web/css/tickets.css'); ], ]) ?>
- = Html::a('关闭工单', ['delete', 'id' => $model->id], [
+ = ($model->status===Tickets::STATUS_CLOSED)?'':Html::a('关闭工单', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
- 'confirm' => 'Are you sure you want to delete this item?',
+ 'confirm' => '您确定要关闭这个工单吗?问题已经解决了吗?',
'method' => 'post',
],
]) ?>
@@ -103,7 +103,36 @@ $core_js = <<