[Fusionforge-commits] r8988 - in trunk/gforge/www/tracker: . include

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Sun Mar 7 21:12:49 CET 2010


Author: aljeux
Date: 2010-03-07 21:12:49 +0100 (Sun, 07 Mar 2010)
New Revision: 8988

Modified:
   trunk/gforge/www/tracker/detail.php
   trunk/gforge/www/tracker/include/ArtifactHtml.class.php
   trunk/gforge/www/tracker/include/ArtifactTypeHtml.class.php
   trunk/gforge/www/tracker/ind.php
   trunk/gforge/www/tracker/mod-limited.php
   trunk/gforge/www/tracker/mod.php
Log:
Add related tasks and files inside the ticket to make them more visible

Modified: trunk/gforge/www/tracker/detail.php
===================================================================
--- trunk/gforge/www/tracker/detail.php	2010-03-07 12:36:33 UTC (rev 8987)
+++ trunk/gforge/www/tracker/detail.php	2010-03-07 20:12:49 UTC (rev 8988)
@@ -13,7 +13,7 @@
 echo notepad_func();
 
 ?>
-	<h3>[#<?php echo $ah->getID(); ?>] <?php echo util_unconvert_htmlspecialchars($ah->getSummary()); ?></h3>
+	<h1>[#<?php echo $ah->getID(); ?>] <?php echo util_unconvert_htmlspecialchars($ah->getSummary()); ?></h1>
 
 	<form action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&amp;atid=<?php echo $ath->getID(); ?>" method="post" enctype="multipart/form-data">
 
@@ -65,9 +65,11 @@
 			<?php echo $ah->getAssignedRealName(); ?> (<?php echo $ah->getAssignedUnixName(); ?>)</td>
 		</tr>
 
-	<?php
-		$ath->renderExtraFields($ah->getExtraFieldData(),true,'none',false,'Any','',false,'DISPLAY');
-	?>
+		<?php
+			$ath->renderExtraFields($ah->getExtraFieldData(),true,'none',false,'Any','',false,'DISPLAY');
+			$ath->renderRelatedTasks($group, $ah);
+			$ath->renderFiles($group_id, $ah);
+		?>
 
 		<tr><td colspan="2"><strong><?php echo _('Summary') ?>:</strong><br /><?php echo $ah->getSummary(); ?></td></tr>
 
@@ -95,53 +97,13 @@
 			<?php } ?>
 		</td></tr>
 		<tr><td colspan="2">
-		<h3><?php echo _('Followup') ?></h3>
+		<h2><?php echo _('Followup') ?></h2>
 		<?php
 		echo $ah->showMessages();
 		?>
 		</td></tr>
 </table>
 </div>
-<?php
-if ($group->usesPM()) {
-?>
-<div class="tabbertab" title="<?php echo _('Related Tasks'); ?>">
-<table border="0" width="80%">
-	<tr><td colspan="2">
-		<h3><?php echo _('Related Tasks'); ?>:</h3>
-		<?php
-		$result = $ah->getRelatedTasks();
-		$taskcount = db_numrows($ah->relatedtasks);
-		if ($taskcount > 0) {
-			$titles[] = _('Task Id');
-			$titles[] = _('Task Summary');
-			$titles[] = _('Start Date');
-			$titles[] = _('End Date');
-			echo $GLOBALS['HTML']->listTableTop($titles);
-			for ($i = 0; $i < $taskcount; $i++) {
-				$taskinfo  = db_fetch_array($ah->relatedtasks, $i);
-				$taskid	= $taskinfo['project_task_id'];
-				$projectid = $taskinfo['group_project_id'];
-				$groupid   = $taskinfo['group_id'];
-				$summary   = util_unconvert_htmlspecialchars($taskinfo['summary']);
-				$startdate = date(_('Y-m-d H:i'), $taskinfo['start_date']);
-				$enddate   = date(_('Y-m-d H:i'), $taskinfo['end_date']);
-				echo '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'>
-					<td>'.$taskid.'</td>
-						<td>'.util_make_link ('/pm/task.php?func=detailtask&project_task_id='.$taskid.'&amp;group_id='.$groupid.'&amp;group_project_id='.$projectid,$summary).'</td>
-						<td>'.$startdate.'</td>
-						<td>'.$enddate.'</td>
-				</tr>';
-			}
-			echo $GLOBALS['HTML']->listTableBottom();
-		} else {
-			echo _('No Related Tasks');
-		}
-	  ?>
-	</td></tr>
-</table>
-</div>
-<?php } ?>
 <div class="tabbertab" title="<?php echo _('Attachments'); ?>">
 <table border="0" width="80%">
 	<tr><td colspan="2">
@@ -152,9 +114,9 @@
 		<input type="file" name="input_file[]" size="30" /><br />
 		<input type="file" name="input_file[]" size="30" /><br />
 		<input type="file" name="input_file[]" size="30" /><br />
-		<p>
+		<p />
 	<?php } ?>
-	<h3><?php echo _('Attached Files') ?>:</h3>
+	<h2><?php echo _('Attached Files') ?>:</h2>
 	<?php
 	//
 	//  print a list of files attached to this Artifact
@@ -196,7 +158,7 @@
 <table border="0" width="80%">
 	<tr>
 	<td colspan="2">
-	<h3><?php echo _('Changes') ?>:</h3>
+	<h2><?php echo _('Changes') ?>:</h2>
 	<?php
 
 	echo $ah->showHistory();

Modified: trunk/gforge/www/tracker/include/ArtifactHtml.class.php
===================================================================
--- trunk/gforge/www/tracker/include/ArtifactHtml.class.php	2010-03-07 12:36:33 UTC (rev 8987)
+++ trunk/gforge/www/tracker/include/ArtifactHtml.class.php	2010-03-07 20:12:49 UTC (rev 8988)
@@ -91,7 +91,7 @@
 
 		} else {
 			echo '
-				<h3>'._('No Followups Have Been Posted').'</h3>';
+				<p>'._('No Followups Have Been Posted').'</p>';
 		}
 	}
 
@@ -144,7 +144,7 @@
 
 		} else {
 			echo '
-			<h3>'._('No Changes Have Been Made to This Item').'</h3>';
+			<p>'._('No Changes Have Been Made to This Item').'</p>';
 		}
 
 	}
@@ -173,7 +173,7 @@
 <table border="0" width="80%">
 	<tr>
 		<td colspan="2">
-		<h3><?php echo _('Changes') ?>:</h3>
+		<h2><?php echo _('Changes') ?>:</h2>
 		<?php
 		$current = '';
 		$end = '';

Modified: trunk/gforge/www/tracker/include/ArtifactTypeHtml.class.php
===================================================================
--- trunk/gforge/www/tracker/include/ArtifactTypeHtml.class.php	2010-03-07 12:36:33 UTC (rev 8987)
+++ trunk/gforge/www/tracker/include/ArtifactTypeHtml.class.php	2010-03-07 20:12:49 UTC (rev 8988)
@@ -271,6 +271,59 @@
 		}
 	}
 
+	function renderRelatedTasks($group, $ah) {
+
+		if (!$group->usesPM()) {
+			return '';
+		}
+
+		$result = $ah->getRelatedTasks();
+		$taskcount = db_numrows($ah->relatedtasks);
+
+		if ($taskcount > 0) {
+			echo '<tr><td colspan="2">';
+			echo '<b>'._("Related Tasks").':</b>'.'<br/>';
+			echo '<table cellspacing="0">';
+			for ($i = 0; $i < $taskcount; $i++) {
+				$taskinfo  = db_fetch_array($ah->relatedtasks, $i);
+				$taskid    = $taskinfo['project_task_id'];
+				$projectid = $taskinfo['group_project_id'];
+				$groupid   = $taskinfo['group_id'];
+				$summary   = util_unconvert_htmlspecialchars($taskinfo['summary']);
+				$startdate = date(_('Y-m-d H:i'), $taskinfo['start_date']);
+				$enddate   = date(_('Y-m-d H:i'), $taskinfo['end_date']);
+				echo '<tr>
+						<td><a href="/pm/task.php?func=detailtask&amp;project_task_id='.$taskid.
+						'&amp;group_id='.$groupid.'&amp;group_project_id='.$projectid.'">[T'.$taskid.'] '.$summary.'</a></td>
+						<td>'.$startdate.'</td>
+						<td>'.$enddate.'</td>
+				</tr>';
+			}
+			echo '</table>';
+			echo '</td></tr>';
+		}
+	}
+
+	function renderFiles($group_id, $ah) {
+
+		$file_list =& $ah->getFiles();
+		$count=count($file_list);
+
+		if ($count > 0) {
+			echo '<tr><td colspan="2">';
+			echo '<b>'._("Attachments").':</b>'.'<br/>';
+			echo '<table cellspacing="0">';
+			for ($i=0; $i<$count; $i++) {
+				echo '<tr>
+				<td><a href="/tracker/download.php/'.$group_id.'/'. $this->getID().'/'. $ah->getID() .'/'.$file_list[$i]->getID().'/'.$file_list[$i]->getName() .'">'. htmlspecialchars($file_list[$i]->getName()) .'</a></td>';
+//				<td><input type="checkbox" name="delete_file[]" value="'. $file_list[$i]->getID() .'">'._("Delete").' </td>
+				echo '</tr>';
+			}
+			echo '</table>';
+			echo '</td></tr>';
+		}
+	}
+
 	/**
 	 *	getRenderHTML
 	 *

Modified: trunk/gforge/www/tracker/ind.php
===================================================================
--- trunk/gforge/www/tracker/ind.php	2010-03-07 12:36:33 UTC (rev 8987)
+++ trunk/gforge/www/tracker/ind.php	2010-03-07 20:12:49 UTC (rev 8988)
@@ -53,7 +53,7 @@
 		} else {
 			echo '
 		<tr '. $HTML->boxGetAltRowStyle($j) . '>
-			<td><a href="'.util_make_url ('/tracker/?atid='.$at_arr[$j]->getID().'&amp;group_id='.$group_id.'&func=browse').'">'.
+			<td><a href="'.util_make_url ('/tracker/?atid='.$at_arr[$j]->getID().'&amp;group_id='.$group_id.'&amp;func=browse').'">'.
  				html_image("ic/tracker20w.png","20","20",array("border"=>"0", "align"=>"middle")).' &nbsp;'.
 				$at_arr[$j]->getName() .'</a>
 			</td>

Modified: trunk/gforge/www/tracker/mod-limited.php
===================================================================
--- trunk/gforge/www/tracker/mod-limited.php	2010-03-07 12:36:33 UTC (rev 8987)
+++ trunk/gforge/www/tracker/mod-limited.php	2010-03-07 20:12:49 UTC (rev 8988)
@@ -12,7 +12,7 @@
 $ath->header(array ('title'=>_('Modify').': '.$ah->getID(). ' - ' . $ah->getSummary(),'atid'=>$ath->getID()));
 
 ?>
-	<h3>[#<?php echo $ah->getID(); ?>] <?php echo $ah->getSummary(); ?></h3>
+	<h1>[#<?php echo $ah->getID(); ?>] <?php echo $ah->getSummary(); ?></h1>
 
 	<form action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&amp;atid=<?php echo $ath->getID(); ?>" enctype="multipart/form-data" method="post">
 	<input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>" />
@@ -110,7 +110,10 @@
 		<td>
 		</td>
 	</tr>
-
+	<?php
+		$ath->renderRelatedTasks($group, $ah);
+		$ath->renderFiles($group_id, $ah);
+	?>
 	<tr>
 		<td colspan="2"><strong><?php echo _('Summary')?><?php echo utils_requiredField(); ?>: <a href="javascript:help_window('/help/tracker.php?helpname=summary')"><strong>(?)</strong></a></strong><br />
 			<?php echo $ah->getSummary(); ?>
@@ -130,7 +133,7 @@
 		<br /><strong><?php echo _('OR Attach A Comment') ?>: <?php echo notepad_button('document.forms[1].details') ?> <a href="javascript:help_window('<?php echo util_make_url ('/help/tracker.php?helpname=comment'); ?>')"><strong>(?)</strong></a></strong><br />
 		<textarea name="details" rows="7" cols="60"></textarea>
 		<p>
-		<h3><?php echo _('Followup') ?>:</h3>
+		<h2><?php echo _('Followup') ?>:</h2>
 		<?php
 			echo $ah->showMessages(); 
 		?>
@@ -147,7 +150,7 @@
 		<input type="file" name="input_file[]" size="30" /><br />
 		<input type="file" name="input_file[]" size="30" /><br />
 		<p>
-		<h3><?php echo _('Attached Files') ?>:</h3>
+		<h2><?php echo _('Attached Files') ?>:</h2>
 		<?php
 		//
 		//  print a list of files attached to this Artifact
@@ -167,7 +170,7 @@
 
 			for ($i=0; $i<$count; $i++) {
 				echo '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'>
-				<td><input type="checkbox" name="delete_file[]" value="'. $file_list[$i]->getID() .'">'._('Delete').' </td>
+				<td><input type="checkbox" name="delete_file[]" value="'. $file_list[$i]->getID() .'" />'._('Delete').' </td>
 				<td>'. htmlspecialchars($file_list[$i]->getName()) .'</td>
 				<td>'.  htmlspecialchars($file_list[$i]->getDescription()) .'</td>
 				<td>'.util_make_link ('/tracker/download.php/'.$group_id.'/'. $ath->getID().'/'. $ah->getID() .'/'.$file_list[$i]->getID().'/'.$file_list[$i]->getName(),_('Download')).'</td>
@@ -193,7 +196,7 @@
 <div class="tabbertab" title="<?php echo _('Changes'); ?>">
 <table border="0" width="80%">
 	<tr><td colspan="2">
-		<h3><?php echo _('Change Log') ?>:</h3>
+		<h2><?php echo _('Change Log') ?>:</h2>
 		<?php 
 			echo $ah->showHistory(); 
 		?>

Modified: trunk/gforge/www/tracker/mod.php
===================================================================
--- trunk/gforge/www/tracker/mod.php	2010-03-07 12:36:33 UTC (rev 8987)
+++ trunk/gforge/www/tracker/mod.php	2010-03-07 20:12:49 UTC (rev 8988)
@@ -161,7 +161,10 @@
 		<td>
 		</td>
 	</tr>
-
+	<?php
+		$ath->renderRelatedTasks($group, $ah);
+		$ath->renderFiles($group_id, $ah);
+	?>
 	<tr>
 		<td><strong><?php echo _('Summary')?><?php echo utils_requiredField(); ?>: <a href="javascript:help_window('/help/tracker.php?helpname=summary')"><strong>(?)</strong></a></strong><br />
 		<input type="text" name="summary" size="70" value="<?php
@@ -197,7 +200,7 @@
 		<p>
 		<strong><?php echo _('OR Attach A Comment') ?>:<?php echo notepad_button('document.forms[1].details') ?><a href="javascript:help_window('<?php echo util_make_url ('/help/tracker.php?helpname=comment'); ?>')"><strong>(?)</strong></a></strong><br />
 		<textarea name="details" rows="7" cols="60"></textarea></p>
-		<h3><?php echo _('Followup') ?>:</h3>
+		<h2><?php echo _('Followup') ?>:</h2>
 		<?php
 			echo $ah->showMessages(); 
 		?>
@@ -244,7 +247,7 @@
 </div>
 <?php } ?>
 <div class="tabbertab" title="<?php echo _('Attachments'); ?>">
-		<h3><?php echo _('Existing Files') ?>:</h3>
+		<h2><?php echo _('Existing Files') ?>:</h2>
 <table border="0" width="80%">
 	<tr><td colspan="2">
         <strong><?php echo _('Attach Files') ?>:</strong><br />
@@ -297,7 +300,7 @@
 <div class="tabbertab" title="<?php echo _('Changes'); ?>">
 <table border="0" width="80%">
 	<tr><td colspan="2">
-		<h3><?php echo _('Change Log') ?>:</h3>
+		<h2><?php echo _('Change Log') ?>:</h2>
 		<?php 
 			echo $ah->showHistory(); 
 		?>




More information about the Fusionforge-commits mailing list