public function actionResetJob($type)
 {
     assert('is_string($type) && $type != ""');
     $jobClassName = $type . 'Job';
     try {
         $jobInProcess = JobInProcess::getByType($type);
         $jobInProcess->delete();
         $messageBoxContent = HtmlNotifyUtil::renderHighlightBoxByMessage(Zurmo::t('JobsManagerModule', 'The job {jobName} has been reset.', array('{jobName}' => $jobClassName::getDisplayName())));
         $this->processListAction($messageBoxContent);
     } catch (NotFoundException $e) {
         $messageBoxContent = HtmlNotifyUtil::renderHighlightBoxByMessage(Zurmo::t('JobsManagerModule', 'The job {jobName} was not found to be stuck and therefore was not reset.', array('{jobName}' => $jobClassName::getDisplayName())));
         $this->processListAction($messageBoxContent);
     }
 }
Beispiel #2
0
 protected function renderHighlightBox()
 {
     $message = '<strong>' . $this->selectedRecordCount . '</strong>&#160;' . LabelUtil::getUncapitalizedRecordLabelByCount($this->selectedRecordCount) . ' ' . Yii::t('Default', 'selected for updating.');
     return HtmlNotifyUtil::renderHighlightBoxByMessage($message);
 }
 protected function renderRemovalNoticeContent()
 {
     if ($this->canAllItemsBeRemoved()) {
         return;
     }
     $message = Zurmo::t('Core', 'Some values cannot be removed because they are currently in use. Try changing the records that use them first.');
     $content = HtmlNotifyUtil::renderHighlightBoxByMessage($message);
     return $content;
 }
 protected function renderAlertMessage()
 {
     if (!empty($this->alertMessage)) {
         return HtmlNotifyUtil::renderAlertBoxByMessage($this->alertMessage);
     }
 }