@@ 279-291 (lines=13) @@ | ||
276 | * |
|
277 | * @return \yii\web\Response |
|
278 | */ |
|
279 | public function actionPriorityUp($id) |
|
280 | { |
|
281 | $options[$id] = ['id' => $id, 'priority' => 'high']; |
|
282 | if ($this->_ticketChange($options)) { |
|
283 | \Yii::$app->getSession()->setFlash('success', |
|
284 | \Yii::t('hipanel/ticket', 'Priority has been changed to high')); |
|
285 | } else { |
|
286 | \Yii::$app->getSession()->setFlash('error', |
|
287 | \Yii::t('hipanel/ticket', 'Some error occurred! Priority has not been changed to high')); |
|
288 | } |
|
289 | ||
290 | return $this->redirect(Yii::$app->request->referrer); |
|
291 | } |
|
292 | ||
293 | /** |
|
294 | * @param $id |
|
@@ 298-309 (lines=12) @@ | ||
295 | * |
|
296 | * @return \yii\web\Response |
|
297 | */ |
|
298 | public function actionPriorityDown($id) |
|
299 | { |
|
300 | $options[$id] = ['id' => $id, 'priority' => 'medium']; |
|
301 | if ($this->_ticketChange($options)) { |
|
302 | \Yii::$app->getSession()->setFlash('success', |
|
303 | \Yii::t('hipanel/ticket', 'Priority has been changed to medium')); |
|
304 | } else { |
|
305 | \Yii::$app->getSession()->setFlash('error', \Yii::t('hipanel/ticket', 'Something goes wrong!')); |
|
306 | } |
|
307 | ||
308 | return $this->redirect(Yii::$app->request->referrer); |
|
309 | } |
|
310 | ||
311 | /** |
|
312 | * Numerous ticket changes in one method, like BladeRoot did :). |