[Fusionforge-commits] FusionForge branch master updated. v6.0.2-221-gea59138

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Wed Sep 9 20:54:49 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  ea59138f0746504c6e8a045a2c1d6c0fbdcd1d36 (commit)
      from  c557a93b70d7152d49eae3e2e525571d939106f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=ea59138f0746504c6e8a045a2c1d6c0fbdcd1d36

commit ea59138f0746504c6e8a045a2c1d6c0fbdcd1d36
Author: Alain Peyrat <aljeux at free.fr>
Date:   Wed Sep 9 20:54:43 2015 +0200

    taskboard: Merged code from Vitaliy Pylypiv to add the burndown chart button that was missing
    
    Minor changes added (layout, indent)

diff --git a/src/plugins/taskboard/common/TaskBoardPlugin.class.php b/src/plugins/taskboard/common/TaskBoardPlugin.class.php
index 24c5390..8c6b190 100644
--- a/src/plugins/taskboard/common/TaskBoardPlugin.class.php
+++ b/src/plugins/taskboard/common/TaskBoardPlugin.class.php
@@ -64,8 +64,10 @@ _('Agile TaskBoard: Supports Scrum and Kanban methodologies.');
 						$params['ADMIN'][] = '/plugins/'.$this->name.'/admin/?&group_id='.$group_id;
 					}
 				}
-				if($params['toptab'] == $this->name) {
-					$params['selected'] = array_search($this->text, $params['TITLES']);
+				if(isset($params['toptab'])){
+					if($params['toptab'] == $this->name) {
+						$params['selected'] = array_search($this->text, $params['TITLES']);
+					}
 				}
 			}
 		}
diff --git a/src/plugins/taskboard/common/include/TaskBoardHtml.class.php b/src/plugins/taskboard/common/include/TaskBoardHtml.class.php
index decc7cc..476b1b0 100644
--- a/src/plugins/taskboard/common/include/TaskBoardHtml.class.php
+++ b/src/plugins/taskboard/common/include/TaskBoardHtml.class.php
@@ -47,9 +47,15 @@ class TaskBoardHtml extends TaskBoard {
 		if (session_loggedin()) {
 			if (forge_check_perm('tracker_admin', $this->Group->getID())) {
 				$release_id = getIntFromRequest('release_id','');
+				$view = getStringFromRequest('view','');
 				if($release_id) {
-					$labels[] = _('Delete Release');
-					$links[]  = '/plugins/taskboard/releases/?group_id='.$group_id.'&view=delete_release&release_id='.$release_id;
+					if( $view == 'edit_release' ) {
+						$labels[] = _('Delete Release');
+						$links[]  = '/plugins/taskboard/releases/?group_id='.$group_id.'&view=delete_release&release_id='.$release_id;
+					} else {
+						$labels[] = _('Edit Release');
+						$links[]  = '/plugins/taskboard/releases/?group_id='.$group_id.'&view=edit_release&release_id='.$release_id;
+					}
 				}
 			}
 		}
diff --git a/src/plugins/taskboard/common/views/releases/burndown.php b/src/plugins/taskboard/common/views/releases/burndown.php
index 3e241c6..045b23c 100644
--- a/src/plugins/taskboard/common/views/releases/burndown.php
+++ b/src/plugins/taskboard/common/views/releases/burndown.php
@@ -70,7 +70,7 @@ foreach( $release_snapshots as $snapshot ) {
 		$dataRemainingTasks[] = array( $release->getStartDate() * 1000, $release_volume['tasks'] );
 		$dataRemainingEfforts[] = array( $release->getStartDate() * 1000, $release_volume['man_days'] );
 	}
-	
+
 	$dataRemainingTasks[] = array( $snapshot['snapshot_date'] * 1000, ( $release_volume['tasks'] - $snapshot['completed_tasks'] ) );
 	$dataRemainingEfforts[] = array( $snapshot['snapshot_date'] * 1000, ( $release_volume['man_days'] -  $snapshot['completed_man_days'] ) );
 }
@@ -98,10 +98,10 @@ foreach( $release_snapshots as $snapshot ) {
 
 	jQuery( document ).ready(function( $ ) {
 		jQuery('#taskboard-view-btn').click( function ( e ) {
-			window.location = '<?php echo util_make_url ('/plugins/'.$pluginTaskboard->name.'?group_id='. $group_id . '&_release=' . $release_id ); ?>';
+			window.location = '<?php echo util_make_url ('/plugins/'.$pluginTaskboard->name.'/?group_id='. $group_id . '&_release=' . $release_id ); ?>';
 			e.preventDefault();
 		});
-		
+
 		burndownChart = jQuery.jqplot(
 			'taskboard-burndown-chart',
 			[ xaxisData, dataRemainingIdeal, dataRemainingTasks, dataRemainingEfforts ],
@@ -112,15 +112,15 @@ foreach( $release_snapshots as $snapshot ) {
 				seriesColors: [ '#000', '#DDDDDD', '#00FA9A', '#B22222' ],
 				legend: {
 					show: true,
-					location: 'ne', 
+					location: 'ne',
 					xoffset: 12,
 					yoffset: 12
 				},
-				axes : { 
+				axes : {
 					xaxis : {
-						renderer : jQuery.jqplot.DateAxisRenderer, 
+						renderer : jQuery.jqplot.DateAxisRenderer,
 						tickRenderer: jQuery.jqplot.CanvasAxisTickRenderer,
-						tickOptions:{ 
+						tickOptions:{
 							angle: -90,
 							fontSize : '1.3em',
 							formatString : '%Y-%m-%d'
@@ -141,7 +141,7 @@ foreach( $release_snapshots as $snapshot ) {
 					y2axis: {
 						autoscale:true,
 						min : 0,
-						tickOptions:{ 
+						tickOptions:{
 						isMinorTick: true,
 						formatString: "%.1f <?php echo _('m/d') ?>"
 						}
diff --git a/src/plugins/taskboard/www/css/agile-board.css b/src/plugins/taskboard/www/css/agile-board.css
index d387c1b..b776e70 100644
--- a/src/plugins/taskboard/www/css/agile-board.css
+++ b/src/plugins/taskboard/www/css/agile-board.css
@@ -132,6 +132,15 @@
 	float: right;
 }
 
+#taskboard-burndown-chart-nav {
+	width: 100%;
+}
+
+#taskboard-burndown-chart-nav button, #taskboard-burndown-btn  {
+	float : right;
+	margin-right: 20px;
+}
+
 .ui-dialog {
 	z-index: 2000;
 	background-color: #ffffcc;
diff --git a/src/plugins/taskboard/www/index.php b/src/plugins/taskboard/www/index.php
index 91a1c55..9475bdd 100644
--- a/src/plugins/taskboard/www/index.php
+++ b/src/plugins/taskboard/www/index.php
@@ -101,9 +101,18 @@ $tech_box = html_build_select_box_from_arrays($tech_id_arr, $tech_name_arr, '_as
 // end of the stolen code
 
 $release_box = '';
+$release_id = getIntFromRequest('_release', '0');
 if ($taskboard->getReleaseField()) {
 	$release_field_alias = $taskboard->getReleaseField();
-	$current_release = $taskboard->getCurrentRelease();
+
+	if( $release_id ) {
+		// use release, specified with URL
+		$current_release = new TaskBoardRelease( $taskboard, $release_id );
+	} else {
+		// use current release, according to the dates
+		$current_release = $taskboard->getCurrentRelease();
+	}
+
 	$current_release_title = '';
 	if ($current_release ) {
 		$current_release_title = $current_release->getTitle();
@@ -122,20 +131,37 @@ if ($taskboard->getReleaseField()) {
 		$release_box=html_build_select_box_from_arrays ($release_id_arr,$release_name_arr,'_release',$current_release_title, false, 'none', true);
 	}
 }
+
+$colspan=0;
+if ($release_box) {
+	$colspan = 2;
+	if ( forge_check_perm('tracker_admin', $group_id ) ) {
+		$colspan = 3;
+	}
+}
 ?>
 
 
 <div>
 	<form>
-		<table cellspacing="0">
+		<table cellspacing="0" width="100%">
 			<tr valign="middle">
-				<td>
-					<?php echo _('Assignee')._(': '). $tech_box ; ?>
+				<td width="10%">
+					<?php echo _('Assignee')._(': '); ?>
+				</td>
+				<td width="10%">
+					<?php echo $tech_box ; ?>
+				</td>
+				<td colspan="<?php echo $colspan ?>">
 				</td>
+			</tr>
 			<tr>
 		<?php if ($release_box) { ?>
 				<td>
-					<?php echo _('Release')._(': ').$release_box; ?>
+					<?php echo _('Release'); ?>
+				</td>
+				<td>
+					<?php echo $release_box; ?>
 				</td>
 				<?php if ( forge_check_perm('tracker_admin', $group_id ) ) { ?>
 				<td style="vertical-align: middle;">
@@ -147,6 +173,11 @@ if ($taskboard->getReleaseField()) {
 					</div>
 				</td>
 				<?php } ?>
+				<td>
+					<div id="taskboard-burndown-div">
+						<button id="taskboard-burndown-btn"><?php echo _('Burndown chart'); ?></button>
+					</div>
+				</td>
 		<?php } ?>
 
 			</tr>
@@ -255,6 +286,11 @@ jQuery( document ).ready(function( $ ) {
 		loadTaskboard( <?php echo $group_id ?> );
 	});
 
+	jQuery('#taskboard-burndown-btn').click( function ( e ) {
+		window.location = '<?php echo util_make_url ('/plugins/'.$pluginTaskboard->name.'/releases/?view=burndown&group_id='. $group_id . '&release_id=' ); ?>' + jQuery('#taskboard-release-id').val();
+		e.preventDefault();
+	});
+
 	<?php if( user_getid()) { ?>
 	jQuery('#new-task-dialog').dialog(
 	{

-----------------------------------------------------------------------

Summary of changes:
 .../taskboard/common/TaskBoardPlugin.class.php     |  6 ++-
 .../common/include/TaskBoardHtml.class.php         | 10 ++++-
 .../taskboard/common/views/releases/burndown.php   | 16 ++++----
 src/plugins/taskboard/www/css/agile-board.css      |  9 +++++
 src/plugins/taskboard/www/index.php                | 46 +++++++++++++++++++---
 5 files changed, 70 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list