function displayChooseSourceAndTarget($engine, $request, $current_user, $source_field_id) { $hp = Codendi_HTMLPurifier::instance(); $this->tracker->displayAdminItemHeader($engine, 'dependencies'); echo '<p>' . $GLOBALS['Language']->getText('plugin_tracker_field_dependencies', 'inline_help') . '</p>'; echo '<form action="' . TRACKER_BASE_URL . '/?" method="GET">'; echo '<input type="hidden" name="tracker" value="' . (int) $this->tracker->id . '" />'; echo '<input type="hidden" name="func" value="admin-dependencies" />'; //source $source_field = $this->form_element_factory->getFormElementById($source_field_id); if (!$source_field) { echo '<select name="source_field" onchange="this.form.submit()">'; echo '<option value="0">' . $GLOBALS['Language']->getText('plugin_tracker_field_dependencies', 'choose_source_field') . '</option>'; $sources = $this->getAllSourceFields(null); foreach ($sources as $id => $field) { echo '<option value="' . $id . '">'; echo $hp->purify($field->getLabel(), CODENDI_PURIFIER_CONVERT_HTML); echo '</option>'; } echo '</select>'; } else { echo '<input type="hidden" name="source_field" value="' . $source_field_id . '" />'; echo $source_field->getLabel(); } echo ' → '; //target $disabled = ''; if (!$source_field) { $disabled = 'disabled="disabled" readonly="readonly"'; } echo '<select name="target_field" ' . $disabled . '>'; echo '<option value="0">' . $GLOBALS['Language']->getText('plugin_tracker_field_dependencies', 'choose_target_field') . '</option>'; if ($source_field) { $sources = $this->getAllTargetFields($source_field_id); foreach ($sources as $id => $field) { echo '<option value="' . $id . '">'; echo $hp->purify($field->getLabel(), CODENDI_PURIFIER_CONVERT_HTML); echo '</option>'; } } echo '</select>'; echo ' <input type="submit" name="choose_source" value="' . $GLOBALS['Language']->getText('global', 'btn_submit') . '" />'; echo '</form>'; //Shortcut $sources_targets = $this->getRuleFactory()->getInvolvedFieldsByTrackerId($this->tracker->id); if (count($sources_targets)) { $dependencies = array(); foreach ($sources_targets as $row) { if ($source = $this->form_element_factory->getFormElementById($row['source_field_id'])) { if ($target = $this->form_element_factory->getFormElementById($row['target_field_id'])) { $d = '<a href="' . TRACKER_BASE_URL . '/?' . http_build_query(array('tracker' => (int) $this->tracker->id, 'func' => 'admin-dependencies', 'source_field' => $row['source_field_id'], 'target_field' => $row['target_field_id'])) . '">'; $d .= $source->getLabel() . ' → ' . $target->getLabel(); $d .= '</a>'; $dependencies[] = $d; } } } if ($dependencies) { echo '<p>' . $GLOBALS['Language']->getText('plugin_tracker_field_dependencies', 'choose_existing_dependency') . '</p>'; echo '<ul><li>' . implode('</li><li>', $dependencies) . '</li></ul>'; } echo '</ul>'; } $this->tracker->displayFooter($engine); }
public function displaySemanticFooter(Tracker_Semantic $semantic, TrackerManager $tracker_manager) { $this->tracker->displayFooter($tracker_manager); die; }
private function displayFooter(Tracker_IDisplayTrackerLayout $layout) { $this->tracker->displayFooter($layout); }
protected function displayFooter($engine) { echo '</div>'; echo '</div>'; $this->tracker->displayFooter($engine); }