@@ 307-319 (lines=13) @@ | ||
304 | * |
|
305 | * @return \yii\web\Response |
|
306 | */ |
|
307 | public function actionPriorityUp($id) |
|
308 | { |
|
309 | $options[$id] = ['id' => $id, 'priority' => 'high']; |
|
310 | if ($this->_ticketChange($options)) { |
|
311 | \Yii::$app->getSession()->setFlash('success', |
|
312 | \Yii::t('hipanel/ticket', 'Priority has been changed to high')); |
|
313 | } else { |
|
314 | \Yii::$app->getSession()->setFlash('error', |
|
315 | \Yii::t('hipanel/ticket', 'Some error occurred! Priority has not been changed to high')); |
|
316 | } |
|
317 | ||
318 | return $this->redirect(Yii::$app->request->referrer); |
|
319 | } |
|
320 | ||
321 | /** |
|
322 | * @param $id |
|
@@ 326-337 (lines=12) @@ | ||
323 | * |
|
324 | * @return \yii\web\Response |
|
325 | */ |
|
326 | public function actionPriorityDown($id) |
|
327 | { |
|
328 | $options[$id] = ['id' => $id, 'priority' => 'medium']; |
|
329 | if ($this->_ticketChange($options)) { |
|
330 | \Yii::$app->getSession()->setFlash('success', |
|
331 | \Yii::t('hipanel/ticket', 'Priority has been changed to medium')); |
|
332 | } else { |
|
333 | \Yii::$app->getSession()->setFlash('error', \Yii::t('hipanel/ticket', 'Something goes wrong!')); |
|
334 | } |
|
335 | ||
336 | return $this->redirect(Yii::$app->request->referrer); |
|
337 | } |
|
338 | ||
339 | /** |
|
340 | * Numerous ticket changes in one method, like BladeRoot did :). |