private function displayTransitionDetails(TrackerManager $engine, Codendi_Request $request, PFUser $current_user, Transition $transition) { $hp = Codendi_HTMLPurifier::instance(); $this->displayHeader($engine); if ($transition->getFieldValueFrom()) { $from_label = $transition->getFieldValueFrom()->getLabel(); } else { $from_label = $GLOBALS['Language']->getText('workflow_admin', 'new_artifact'); } $to_label = $transition->getFieldValueTo()->getLabel(); echo '<h3>'; echo $GLOBALS['Language']->getText('workflow_admin', 'title_define_transition_details', array($hp->purify($from_label), $hp->purify($to_label))); echo '</h3>'; $form_action = TRACKER_BASE_URL . '/?' . http_build_query(array('tracker' => (int) $this->tracker->id, 'func' => Workflow::FUNC_ADMIN_TRANSITIONS, 'transition' => $transition->getId())); echo '<form action="' . $form_action . '" method="POST">'; echo '<table><tr><td>'; $section_conditions = new Widget_Static($GLOBALS['Language']->getText('workflow_admin', 'under_the_following_condition')); $section_conditions->setContent($transition->fetchConditions()); $section_conditions->display(); $actions = ''; $actions .= $transition->fetchPostActions(); $actions .= $this->post_action_factory->fetchPostActions(); $section_postactions = new Widget_Static($GLOBALS['Language']->getText('workflow_admin', 'following_action_performed')); $section_postactions->setContent($actions); $section_postactions->display(); $back_to_transitions_link = TRACKER_BASE_URL . '/?' . http_build_query(array('tracker' => (int) $this->tracker->id, 'func' => Workflow::FUNC_ADMIN_TRANSITIONS)); echo '<p>'; echo '<a href="' . $back_to_transitions_link . '">←' . $GLOBALS['Language']->getText('plugin_tracker_admin', 'clean_cancel') . '</a>'; echo ' '; echo '<input type="submit" name="workflow_details" value="' . $GLOBALS['Language']->getText('global', 'btn_submit') . '" />'; echo '</p>'; echo '</td></tr></table>'; echo '</form>'; $this->displayFooter($engine); }