public function indexAction() { $list = $this->projectMapper->getAllIds(); $projectsList = array(); reset($list); foreach ($list as $id) { $thisProject = $this->projectMapper->findById($id); $actionsCount = count($this->projectMapper->GetAllActions($thisProject)); $projectsList[$id] = array('title' => $thisProject->GetTitle(), 'editLink' => '/projects/project/edit/?id=' . $id, 'beginDate' => C3op_Util_DateDisplay::FormatDateToShow($thisProject->GetBeginDate()), 'value' => C3op_Util_CurrencyDisplay::FormatCurrency($thisProject->GetValue()), 'linkActionCreate' => '/projects/action/create/?project=' . $id, 'linkProjectDetail' => '/projects/project/detail/?id=' . $id, 'linkReceivableCreate' => '/projects/receivable/create/?project=' . $id, 'linkProjectReceivables' => '/projects/project/receivables/?id=' . $id, 'actionsCount' => $actionsCount); } $this->view->projectsList = $projectsList; $this->view->createProjectLink = "/projects/project/create"; }
private function setDateValueToFormField(Zend_Form $form, $fieldName, $value) { $field = $form->getElement($fieldName); if ($value != '0000-00-00') { $field->setValue(C3op_Util_DateDisplay::FormatDateToShow($value)); } else { $field->setValue(""); } }
public function unacknowledgedAction() { $id = $this->checkIdFromGet(); $thisProject = $this->projectMapper->findById($id); $this->initActionMapper(); $list = $this->projectMapper->getAllUnacknowledgededActions($thisProject, $this->actionMapper); $unacknowledgededList = array(); reset($list); foreach ($list as $actionId) { $thisAction = $this->actionMapper->findById($actionId); $actionTitle = $thisAction->GetTitle(); $actionStart = C3op_Util_DateDisplay::FormatDateToShow($thisAction->GetRealBeginDate()); $unacknowledgededList[$actionId] = array('actionId' => $actionId, 'actionTitle' => $actionTitle, 'actionStart' => $actionStart); } $this->view->unacknowledgededList = $unacknowledgededList; }