| @@ 68-80 (lines=13) @@ | ||
| 65 | * @param int $id of item |
|
| 66 | * @return void |
|
| 67 | */ |
|
| 68 | public function actionDelete($id) |
|
| 69 | { |
|
| 70 | try { |
|
| 71 | $result = $this->getModel()->delete($id); |
|
| 72 | Debugger::log('Destroying of meeting('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO); |
|
| 73 | $this->flashMessage('Položka byla úspěšně smazána', 'ok'); |
|
| 74 | } catch(Exception $e) { |
|
| 75 | Debugger::log('Destroying of meeting('. $id .') failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 76 | $this->flashMessage('Destroying of meeting failed, result: ' . $e->getMessage(), 'error'); |
|
| 77 | } |
|
| 78 | ||
| 79 | $this->redirect('Meeting:listing'); |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * @return void |
|
| @@ 143-156 (lines=14) @@ | ||
| 140 | * @param int $id |
|
| 141 | * @return void |
|
| 142 | */ |
|
| 143 | public function actionDelete($id) |
|
| 144 | { |
|
| 145 | try { |
|
| 146 | $result = $this->getVisitorService()->delete($id); |
|
| 147 | ||
| 148 | Debugger::log('Destroying of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO); |
|
| 149 | $this->flashMessage('Položka byla úspěšně smazána', 'ok'); |
|
| 150 | } catch(Exception $e) { |
|
| 151 | Debugger::log('Destroying of visitor('. $id .') failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 152 | $this->flashMessage('Destroying of visitor failed, result: ' . $e->getMessage(), 'error'); |
|
| 153 | } |
|
| 154 | ||
| 155 | $this->redirect('Visitor:listing'); |
|
| 156 | } |
|
| 157 | ||
| 158 | /** |
|
| 159 | * Prepare mass mail form |
|
| @@ 244-256 (lines=13) @@ | ||
| 241 | * @param integer $id |
|
| 242 | * @return void |
|
| 243 | */ |
|
| 244 | public function actionChecked($id) |
|
| 245 | { |
|
| 246 | try { |
|
| 247 | $result = $this->getModel()->checked($id, '1'); |
|
| 248 | Debugger::log('Check of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO); |
|
| 249 | $this->flashMessage('Položka byla úspěšně zkontrolována', 'ok'); |
|
| 250 | } catch(Exception $e) { |
|
| 251 | Debugger::log('Check of visitor('. $id .') failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 252 | $this->flashMessage('Check of visitor failed, result: ' . $e->getMessage(), 'error'); |
|
| 253 | } |
|
| 254 | ||
| 255 | $this->redirect('Visitor:listing'); |
|
| 256 | } |
|
| 257 | ||
| 258 | /** |
|
| 259 | * Set item as unchecked by id |
|
| @@ 264-276 (lines=13) @@ | ||
| 261 | * @param integer $id |
|
| 262 | * @return void |
|
| 263 | */ |
|
| 264 | public function actionUnchecked($id) |
|
| 265 | { |
|
| 266 | try { |
|
| 267 | $result = $this->getModel()->checked($id, 0); |
|
| 268 | Debugger::log('Uncheck of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO); |
|
| 269 | $this->flashMessage('Položka byla nastavena jako nekontrolována', 'ok'); |
|
| 270 | } catch(Exception $e) { |
|
| 271 | Debugger::log('Uncheck of visitor('. $id .') failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 272 | $this->flashMessage('Uncheck of visitor failed, result: ' . $e->getMessage(), 'error'); |
|
| 273 | } |
|
| 274 | ||
| 275 | $this->redirect('Visitor:listing'); |
|
| 276 | } |
|
| 277 | ||
| 278 | /** |
|
| 279 | * Prepare page for new item |
|