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 '&nbsp;';
     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);
 }
 function site_admin_disk_widget_hook()
 {
     $wDisk = new Widget_Static('Disk Usage');
     $wDisk->setContent('
         <ul>
           <li>' . $GLOBALS['Language']->getText('plugin_statistics', 'disk_usage_report', array($this->getPluginPath() . "/disk_usage.php")) . '</li>
           <li>' . $GLOBALS['Language']->getText('plugin_statistics', 'add_disk_quota', array($this->getPluginPath() . "/project_quota.php")) . '</li>
           <li>' . $GLOBALS['Language']->getText('plugin_statistics', 'projects_over_quota', array($this->getPluginPath() . "/project_over_quota.php")) . '</li>
         </ul>');
     $wDisk->display();
 }
function show_features_boxes()
{
    global $HTML, $Language;
    $return = "";
    $w = new Widget_Static($GLOBALS['sys_name'] . ' ' . $Language->getText('include_features_boxes', 'stats'));
    $w->setContent(show_sitestats());
    $w->display();
    $w = new Widget_Static($Language->getText('include_features_boxes', 'top_download_yesterday'));
    $w->setContent(show_top_downloads());
    $w->display();
    $w = new Widget_Static($Language->getText('include_features_boxes', 'newest_releases'));
    $w->setContent(show_newest_releases());
    $w->setRssUrl('/export/rss_sfnewreleases.php');
    $w->display();
    $w = new Widget_Static($Language->getText('include_features_boxes', 'newest_projects'));
    $w->setContent(show_newest_projects());
    $w->setRssUrl('/export/rss_sfprojects.php?type=rss&option=newest');
    $w->display();
    $w = new Widget_Static($Language->getText('include_features_boxes', 'most_active_week'));
    $w->setContent(show_highest_ranked_projects());
    $w->display();
}
 /**
  * Display the HTML for "field usage" admininistration
  *
  * @return void
  */
 public function displayFactories(Tracker $tracker)
 {
     $hp = Codendi_HTMLPurifier::instance();
     $klasses = $this->classnames;
     $special_klasses = $this->special_classnames;
     $all_klasses = array_merge($klasses, $special_klasses);
     EventManager::instance()->processEvent('tracker_formElement_classnames', array('classnames' => &$all_klasses));
     $w = new Widget_Static($GLOBALS['Language']->getText('plugin_tracker_formelement_admin', 'fields'));
     $w->setContent($this->fetchFactoryButtons($klasses, $tracker));
     $w->display();
     $w = new Widget_Static($GLOBALS['Language']->getText('plugin_tracker_formelement_admin', 'dynamic_fields'));
     $w->setContent($this->fetchFactoryButtons($special_klasses, $tracker));
     $w->display();
     $w = new Widget_Static($GLOBALS['Language']->getText('plugin_tracker_formelement_admin', 'structural_elements'));
     $w->setContent($this->fetchFactoryButtons(array_merge($this->group_classnames, $this->staticfield_classnames), $tracker));
     $w->display();
 }
Exemple #5
0
 public function displayAdminFormElements(Tracker_IDisplayTrackerLayout $layout, $request, $current_user)
 {
     $hp = Codendi_HTMLPurifier::instance();
     $items = $this->getAdminItems();
     $title = $items['editformElements']['title'];
     $this->displayAdminFormElementsHeader($layout, $title, array());
     echo '<h2>' . $title . '</h2>';
     echo '<form name="form1" method="POST" action="' . TRACKER_BASE_URL . '/?tracker=' . (int) $this->id . '&amp;func=admin-formElements">';
     echo '<table cellspacing="4" cellpadding="0"><tr valign="top"><td>';
     echo '<div class="tracker-admin-palette">';
     $this->formElementFactory->displayFactories($this);
     $w = new Widget_Static($GLOBALS['Language']->getText('plugin_tracker_formelement_admin', 'unused_elements'));
     $unused_elements_content = '';
     $unused_elements_content = $GLOBALS['Language']->getText('plugin_tracker_formelement_admin', 'unused_elements_desc');
     $unused_elements_content .= '<div class="tracker-admin-palette-content"><table>';
     foreach (Tracker_FormElementFactory::instance()->getUnusedFormElementForTracker($this) as $f) {
         $unused_elements_content .= $f->fetchAdminAdd();
     }
     $unused_elements_content .= '</table></div>';
     $w->setContent($unused_elements_content);
     $w->display();
     echo '</div>';
     echo '</td><td>';
     echo $this->fetchAdminFormElements();
     echo '</td></tr></table>';
     echo '</form>';
     $this->displayFooter($layout);
 }
 protected function displayTransitionDetails(TrackerManager $engine, Codendi_Request $request, User $current_user, Transition $transition)
 {
     $hp = Codendi_HTMLPurifier::instance();
     $this->tracker->displayAdminItemHeader($engine, 'editworkflow');
     echo '<h3>' . $GLOBALS['Language']->getText('workflow_admin', 'title') . '</h3>';
     if ($transition->getFieldValueFrom()) {
         $from_label = $transition->getFieldValueFrom()->getLabel();
     } else {
         $from_label = $GLOBALS['Language']->getText('workflow_admin', 'new_artifact');
     }
     $to_label = $transition->getFieldValueTo()->getLabel();
     echo '<p>';
     echo $GLOBALS['Language']->getText('workflow_admin', 'title_define_transition_details', array($from_label, $to_label));
     echo '</p>';
     $form_action = TRACKER_BASE_URL . '/?' . http_build_query(array('tracker' => (int) $this->tracker->id, 'func' => 'admin-workflow', 'transition' => $transition->getTransitionId()));
     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($this->fetchWorkflowPermissions($transition));
     $section_conditions->display();
     $tpaf = $this->getPostActionFactory();
     $actions = '';
     $actions .= $transition->fetchPostActions();
     $actions .= $tpaf->fetchPostActions();
     $section_postactions = new Widget_Static($GLOBALS['Language']->getText('workflow_admin', 'following_action_performed'));
     $section_postactions->setContent($actions);
     $section_postactions->display();
     echo '<p><input type="submit" name="workflow_details" value="' . $GLOBALS['Language']->getText('global', 'btn_submit') . '" /></p>';
     echo '</td></tr></table>';
     echo '</form>';
     $this->tracker->displayFooter($engine);
 }
Exemple #7
0
 private function fetchAdminPalette()
 {
     echo '<div class="tracker-admin-palette">';
     $this->formElementFactory->displayFactories($this);
     $w = new Widget_Static($GLOBALS['Language']->getText('plugin_tracker_formelement_admin', 'unused_elements'));
     $unused_elements_content = '';
     $unused_elements_content = $GLOBALS['Language']->getText('plugin_tracker_formelement_admin', 'unused_elements_desc');
     $unused_elements_content .= '<div class="tracker-admin-palette-content"><table>';
     foreach (Tracker_FormElementFactory::instance()->getUnusedFormElementForTracker($this) as $f) {
         $unused_elements_content .= $f->fetchAdminAdd();
     }
     $unused_elements_content .= '</table></div>';
     $w->setContent($unused_elements_content);
     $w->display();
     echo '</div>';
 }
Exemple #8
0
  <li>' . $Language->getText('admin_main', 'tool_external') . ':
    <ul>
      <li><a href="externaltools.php?tool=phpMyAdmin">phpMyAdmin</a></li>
      <li><a href="externaltools.php?tool=munin">munin</a></li>
      <li><a href="externaltools.php?tool=info">PHP info</a></li>
      <li><a href="externaltools.php?tool=APC">APC - PHP Cache</a></li>
      ' . $pluginsContent . '
    </ul>
  </li>
</ul>');
// Plugins
ob_start();
$em->processEvent('site_admin_option_hook', null);
$pluginsContent = ob_get_contents();
ob_end_clean();
$wPlugins = new Widget_Static($Language->getText('admin_main', 'header_plugins'));
$wPlugins->setContent('<ul>' . $pluginsContent . '</ul>');
// Start output
site_admin_header(array('title' => $Language->getText('admin_main', 'title')));
echo "<p><i>" . $Language->getText('admin_main', 'message') . "</i></p>";
echo '<table id="site_admin_main_table"><tr>';
echo '<td>';
$wUser->display();
$wProject->display();
echo "</td>";
echo '<td>';
$wUtils->display();
$wConf->display();
echo "</td>";
echo '<td>';
$wDoc->display();
Exemple #9
0
    $HTML->header($header_params);
    $HTML->displayStandardHomepage($display_homepage_news);
} else {
    $HTML->header($header_params);
    echo '<div id="homepage" class="container">';
    // go fetch le content that may have its own logic to decide if the boxes should be displayed or not
    ob_start();
    include $Language->getContent('homepage/homepage', null, null, '.php');
    $homepage_content = ob_get_contents();
    ob_end_clean();
    echo '<div id="homepage_speech" ' . ($display_homepage_boxes ? '' : 'style="width:100%;"') . '>';
    echo $homepage_content;
    echo '</div>';
    if ($display_homepage_boxes) {
        echo '<div id="homepage_boxes">';
        show_features_boxes();
        echo '</div>';
    }
    // HTML is sad, we need to keep this div to clear the "float:right/left" that might exists before
    // Yet another dead kitten somewhere :'(
    echo '<div id="homepage_news">';
    if ($display_homepage_news) {
        $w = new Widget_Static($Language->getText('homepage', 'news_title'));
        $w->setContent(news_show_latest($GLOBALS['sys_news_group'], 5, true, false, true, 5));
        $w->setRssUrl('/export/rss_sfnews.php');
        $w->display();
    }
    echo '</div>';
    echo '</div>';
}
$HTML->footer(array());