예제 #1
0
 /**
  * Listen to milestone save event and return correct agile component
  *
  * @Listener(module="project", identifier="runMilestone::post")
  *
  * @param \thebuggenie\core\framework\Event $event
  */
 public function milestoneSave(framework\Event $event)
 {
     $board = entities\AgileBoard::getB2DBTable()->selectById(framework\Context::getRequest()->getParameter('board_id'));
     if ($board instanceof entities\AgileBoard) {
         $component = framework\Action::returnComponentHTML('agile/milestonebox', array('milestone' => $event->getSubject(), 'board' => $board, 'include_counts' => true));
         $event->setReturnValue($component);
         $event->setProcessed();
     }
 }
예제 #2
0
 public function runIssueMoreactions(framework\Request $request)
 {
     try {
         $issue = tables\Issues::getTable()->getIssueById((int) $request['issue_id']);
         if ($request['board_id']) {
             $board = agile\entities\AgileBoard::getB2DBTable()->selectById((int) $request['board_id']);
         }
         $times = !isset($board) || $board->getType() != agile\entities\AgileBoard::TYPE_KANBAN;
         $estimator_mode = isset($request['estimator_mode']) ? $request['estimator_mode'] : null;
         return $this->renderJSON(array('menu' => $this->getComponentHTML('main/issuemoreactions', compact('issue', 'times', 'board', 'estimator_mode'))));
     } catch (\Exception $e) {
         throw $e;
     }
 }
예제 #3
0
 /**
  * Header "Agile" menu and board list
  *
  * @Listener(module="core", identifier="templates/headermainmenu::projectmenulinks")
  *
  * @param \thebuggenie\core\framework\Event $event
  */
 public function headerMenuProjectLinks(framework\Event $event)
 {
     if (framework\Context::isProjectContext()) {
         $boards = \thebuggenie\modules\agile\entities\AgileBoard::getB2DBTable()->getAvailableProjectBoards(framework\Context::getUser()->getID(), framework\Context::getCurrentProject()->getID());
         framework\ActionComponent::includeComponent('agile/headermenuprojectlinks', array('project' => $event->getSubject(), 'boards' => $boards));
     }
 }