[Fusionforge-commits] r12895 - in trunk/src/www/tracker: include reporting

Franck VILLAUME nerville at fusionforge.org
Thu Mar 24 12:04:35 CET 2011


Author: nerville
Date: 2011-03-24 12:04:35 +0100 (Thu, 24 Mar 2011)
New Revision: 12895

Added:
   trunk/src/www/tracker/include/ArtifactTypeFactoryHtml.class.php
Modified:
   trunk/src/www/tracker/reporting/index.php
Log:
add missing file from aljeux

Added: trunk/src/www/tracker/include/ArtifactTypeFactoryHtml.class.php
===================================================================
--- trunk/src/www/tracker/include/ArtifactTypeFactoryHtml.class.php	                        (rev 0)
+++ trunk/src/www/tracker/include/ArtifactTypeFactoryHtml.class.php	2011-03-24 11:04:35 UTC (rev 12895)
@@ -0,0 +1,83 @@
+<?php
+/**
+ * FusionForge Generic Tracker facility
+ *
+ * Copyright 2011 (C) Alain Peyrat, Alcatel-Lucent
+ * http://fusionforge.org
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  US
+ */
+
+require_once $gfcommon.'tracker/ArtifactType.class.php';
+require_once $gfcommon.'tracker/ArtifactExtraField.class.php';
+require_once $gfcommon.'tracker/ArtifactExtraFieldElement.class.php';
+require_once $gfcommon.'tracker/ArtifactWorkflow.class.php';
+require_once $gfcommon.'include/utils_crossref.php';
+
+class ArtifactTypeFactoryHtml extends ArtifactTypeFactory {
+	function header($params=array()) {
+		global $HTML;
+
+		if (!forge_get_config('use_tracker')) {
+			exit_disabled();
+		}
+
+		$group_id= $this->Group->getID();
+
+		$params['group']=$group_id;
+		if (!isset($params['title'])) {
+			$params['title']=sprintf(_('Trackers for %1$s'), $this->Group->getPublicName());
+		}
+		$params['toptab']='tracker';
+
+		$labels = array(_('View Trackers'));
+		$links  = array('/tracker/?group_id='.$group_id);
+		if (session_loggedin()) {
+			$labels[] = _('Reporting');
+			$links[]  = '/tracker/reporting/?group_id='.$group_id;
+			$perm = $this->Group->getPermission(session_get_user());
+			if ($perm && is_object($perm) && !$perm->isError() && $perm->isPMAdmin()) {
+				$labels[] = _('Administration');
+				$links[]  = '/tracker/admin/?group_id='.$group_id;
+			}
+		}
+
+		$params['submenu'] = $HTML->subMenu($labels, $links);
+
+		site_project_header($params);
+	}
+
+	function footer($params=array()) {
+		site_project_footer($params);
+	}
+
+//     function adminHeader($params=array()) {
+//             return $this->header($params);
+//     }
+//
+//     function adminFooter($params=array()) {
+//             return $this->footer($params);
+//     }
+}
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>
+

Modified: trunk/src/www/tracker/reporting/index.php
===================================================================
--- trunk/src/www/tracker/reporting/index.php	2011-03-22 23:32:06 UTC (rev 12894)
+++ trunk/src/www/tracker/reporting/index.php	2011-03-24 11:04:35 UTC (rev 12895)
@@ -30,6 +30,7 @@
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
 require_once $gfwww.'tracker/include/ArtifactTypeHtml.class.php';
+require_once $gfwww.'tracker/include/ArtifactTypeFactoryHtml.class.php';
 
 $group_id = getIntFromRequest('group_id');
 $atid = getIntFromRequest('atid');
@@ -126,7 +127,7 @@
 </form>
 <p>
 <?php if ($atid) {
-		if (!$area || $area == 'activity') { 
+		if (!$area || $area == 'activity') {
 	?>
 	<img src="trackeract_graph.php?<?php echo "SPAN=$SPAN&start=$start&end=$end&group_id=$group_id&atid=$atid"; ?>" width="640" height="480" alt="" />
 	<?php




More information about the Fusionforge-commits mailing list