* Copyright (C) 2010-2012 Alain Peyrat - Alcatel-Lucent
* Copyright 2011, Franck Villaume - Capgemini
* Copyright 2011-2012, Franck Villaume - TrivialDev
+ * Copyright © 2011, 2012
+ * Thorsten “mirabilos” Glaser <t.glaser@tarent.de>
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+require_once $gfcommon.'include/minijson.php';
+
+/**
+ * html_generic_fileheader() - Output <html><head> and <meta/> inside.
+ *
+ * @param string $title
+ * Mandatory content of <title> attribute,
+ * will be HTML-secured
+ */
+function html_generic_fileheader($title) {
+ global $HTML, $sysDTDs, $sysXMLNSs;
+
+ if (!$title) {
+ throw new Exception('A title is mandatory in XHTML!');
+ }
+
+ $HTML->headerHTMLDeclaration();
+ echo "<head>\n";
+ echo '<meta http-equiv="Content-Type" ' .
+ 'content="text/html; charset=utf-8" />' . "\n";
+ echo '<script language="JavaScript" type="text/javascript">//<![CDATA[' .
+ "\n\tvar sys_url_base = " . minijson_encode(util_make_url("/"),
+ false) . ";\n" .
+ "//]]></script>\n";
+ $HTML->headerForgepluckerMeta();
+ echo html_e('title', array(), util_html_secure($title)) . "\n";
+}
+
/**
* html_feedback_top() - Show the feedback output at the top of the page.
*
'name' => $title,
'value' => db_result($res, 0, 'theme_id'),
));
- } else if ($nbTheme < 1) {
+ } elseif ($nbTheme < 1) {
return("");
} else {
return html_build_select_box($res,$title,$selected,false);
}
function html_use_jquery() {
- use_javascript('/scripts/jquery/jquery-1.4.2.min.js');
+ use_javascript('/scripts/jquery/jquery-1.7.2.min.js');
}
function html_use_tooltips() {
function html_use_jqueryui() {
html_use_jquery();
- use_javascript('/scripts/jquery-ui/js/jquery-ui-1.8.17.custom.min.js');
- use_stylesheet('/scripts/jquery-ui/css/overcast/jquery-ui-1.8.17.custom.css');
+ use_javascript('/scripts/jquery-ui/js/jquery-ui-1.8.22.custom.min.js');
+ use_stylesheet('/scripts/jquery-ui/css/overcast/jquery-ui-1.8.22.custom.css');
+}
+
+function html_use_jqueryjqplot() {
+ html_use_jquery();
+ use_javascript('/scripts/jquery-jqplot/jquery.jqplot.js');
+ use_stylesheet('/scripts/jquery-jqplot/jquery.jqplot.css');
+ use_javascript('/scripts/jquery-jqplot/excanvas.js');
+}
+
+function html_use_jqueryjqplotpluginCanvas() {
+ html_use_jqueryjqplot();
+ use_javascript('/scripts/jquery-jqplot/plugins/jqplot.canvasTextRenderer.js');
+ use_javascript('/scripts/jquery-jqplot/plugins/jqplot.canvasAxisLabelRenderer.js');
+}
+
+function html_use_jqueryjqplotpluginBar() {
+ html_use_jqueryjqplot();
+ use_javascript('/scripts/jquery-jqplot/plugins/jqplot.barRenderer.js');
+ use_javascript('/scripts/jquery-jqplot/plugins/jqplot.categoryAxisRenderer.js');
+ use_javascript('/scripts/jquery-jqplot/plugins/jqplot.pointLabels.js');
}
/**
* @param string What to call the 'Any row' defaults to any
* @param array Array of all allowed values from the full list.
*/
-function html_build_select_box_from_arrays ($vals,$texts,$select_name,$checked_val='xzxz',$show_100=true,$text_100='none',$show_any=false,$text_any='any', $allowed=false) {
+function html_build_select_box_from_arrays($vals, $texts, $select_name, $checked_val = 'xzxz', $show_100 = true, $text_100 = 'none', $show_any = false, $text_any = 'any', $allowed = false) {
$have_a_subelement = false;
if ($text_100=='none'){
- $text_100=_('None');
+ $text_100 = _('None');
}
$return = '';
- $rows=count($vals);
+ $rows = count($vals);
if (count($texts) != $rows) {
- $return .= 'ERROR - uneven row counts';
+ $return .= _('ERROR - uneven row counts');
}
+ //TODO: remove this ugly ack to get something more generic...
$title = html_get_tooltip_description($select_name);
$id = '';
if ($title) {
if (!$project || !is_object($project)) {
exit_no_group();
- } else if ($project->isError()) {
+ } elseif ($project->isError()) {
if ($project->isPermissionDeniedError()) {
if (!session_get_user()) {
$next = '/account/login.php?error_msg='.urlencode($project->getErrorMessage());
$arr_l[] = '/my/';
$arr_attr[] = array('title' => _('View your personal page, a selection of widgets to follow the informations from projects.'), 'class' => 'tabtitle-nw');
-
- $arr_t[] = _('Trackers dashboard');
- $arr_l[] = '/my/dashboard.php';
- $arr_attr[] = array('title' => _('View your tasks and artifacts.'), 'class' => 'tabtitle');
+ if (forge_get_config('use_tracker')) {
+ $arr_t[] = _('Trackers dashboard');
+ $arr_l[] = '/my/dashboard.php';
+ $arr_attr[] = array('title' => _('View your tasks and artifacts.'), 'class' => 'tabtitle');
+ }
if (forge_get_config('use_diary')) {