[Fusionforge-commits] FusionForge branch master updated. 6.0.4-973-ge3f5c17

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Oct 2 18:56:12 CEST 2016


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  e3f5c17107decb432a76d7f95f6c913593db0751 (commit)
      from  960bc2658bf28df5741c24b8de8f0492ffe51266 (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=e3f5c17107decb432a76d7f95f6c913593db0751

commit e3f5c17107decb432a76d7f95f6c913593db0751
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Oct 2 18:55:17 2016 +0200

    tracker: align artifact view: detail, mod, mod-limited. avoid double information & add missing tab.

diff --git a/src/common/tracker/actions/detail.php b/src/common/tracker/actions/detail.php
index a98c261..4bd5cc8 100644
--- a/src/common/tracker/actions/detail.php
+++ b/src/common/tracker/actions/detail.php
@@ -4,8 +4,8 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2015, Franck Villaume - TrivialDev
  * Copyright 2012, Thorsten “mirabilos” Glaser <t.glaser at tarent.de>
+ * Copyright 2012-2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -47,8 +47,8 @@ jQuery(document).ready(function() {
 
 <?php
 echo $HTML->openForm(array('id' => 'trackerdetailform', 'action' => '/tracker/?group_id='.$group_id.'&atid='.$ath->getID(), 'method' => 'post', 'enctype' => 'multipart/form-data'));
-if (session_loggedin()) { ?>
-	<table class="fullwidth">
+if (session_loggedin()) {
+	echo $HTML->listTableTop(); ?>
 		<tr>
 			<td>
 				<?php
@@ -81,9 +81,9 @@ if (session_loggedin()) { ?>
 				<input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
 			</td>
 		</tr>
-	</table>
-<?php } ?>
-	<table width="80%">
+<?php echo $HTML->listTableBottom(); ?>
+<?php }
+echo $HTML->listTableTop(); ?>
 		<tr>
 			<td>
 				<strong><?php echo _('Date')._(':'); ?></strong><br />
@@ -121,7 +121,6 @@ if (session_loggedin()) { ?>
 
 		<?php
 			$ath->renderExtraFields($ah->getExtraFieldData(),true,'none',false,'Any',array(),false,'DISPLAY');
-			$ath->renderRelatedTasks($group, $ah);
 		?>
 
 		<tr>
@@ -135,7 +134,7 @@ if (session_loggedin()) { ?>
 			<br />
 			<?php $ah->showDetails(); ?>
 		</td></tr>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 <?php
 $count=db_numrows($ah->getMessages());
 $nb = $count? ' ('.$count.')' : '';
@@ -152,6 +151,9 @@ foreach ($pluginsListeners as $pluginsListener) {
 <div id="tabber">
 	<ul>
 	<li><a href="#tabber-comments"><?php echo _('Comments'); ?></a></li>
+	<?php if ($group->usesPM()) { ?>
+	<li><a href="#tabber-tasks"><?php echo _('Related Tasks'); ?></a></li>
+	<?php } ?>
 	<li><a href="#tabber-attachments"><?php echo _('Attachments'); ?></a></li>
 	<?php if ($pluginfound) { ?>
 	<li><a href="#tabber-commits"><?php echo _('Commits'); ?></a></li>
@@ -162,9 +164,9 @@ foreach ($pluginsListeners as $pluginsListener) {
 	<?php } ?>
 	</ul>
 	<div id="tabber-comments" class="tabbertab" title="<?php echo _('Comments').$nb; ?>">
-		<table width="80%">
+		<?php echo $HTML->listTableTop();
+			if (forge_check_perm ('tracker',$ath->getID(),'submit')) { ?>
 			<tr><td colspan="2">
-				<?php if (forge_check_perm ('tracker',$ath->getID(),'submit')) { ?>
 				<input type="hidden" name="form_key" value="<?php echo form_generate_key(); ?>" />
 				<input type="hidden" name="func" value="postmod" />
 				<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
@@ -172,23 +174,31 @@ foreach ($pluginsListeners as $pluginsListener) {
 				<p>
 				<strong><?php echo _('Add A Comment')._(':'); ?></strong>
 				<?php echo notepad_button('document.forms.trackerdetailform.details') ?><br />
-				<textarea name="details" rows="10" cols="60"></textarea>
+				<textarea name="details" rows="10" style="width: 100%" ></textarea>
 				</p>
-				<?php } ?>
 			</td></tr>
+			<?php } ?>
 			<tr><td colspan="2">
 			<?php $ah->showMessages(); ?>
 			</td></tr>
-	</table>
+	<?php echo $HTML->listTableBottom(); ?>
 	</div>
 <?php
+if ($group->usesPM()) {
+?>
+<div id="tabber-tasks" class="tabbertab" title="<?php echo _('Related Tasks'); ?>">
+	<?php
+		$ath->renderRelatedTasks($group, $ah);
+	?>
+</div>
+<?php }
 $tabcnt=0;
 $file_list = $ah->getFiles();
 $count=count($file_list);
 $nb = $count? ' ('.$count.')' : '';
 ?>
 	<div id="tabber-attachments" class="tabbertab" title="<?php echo _('Attachments').$nb; ?>">
-	<table width="80%">
+	<?php echo $HTML->listTableTop(); ?>
 		<tr><td colspan="2">
 		<?php if (session_loggedin() && ($ah->getSubmittedBy() == user_getid())) { ?>
 			<strong><?php echo _('Attach Files')._(':'); ?></strong>  <?php echo('('._('max upload size')._(': ').human_readable_bytes(util_get_maxuploadfilesize()).')') ?><br />
@@ -205,20 +215,20 @@ $nb = $count? ' ('.$count.')' : '';
 			$ath->renderFiles($group_id, $ah);
 		?>
 		</td></tr>
-	</table>
+	<?php echo $HTML->listTableBottom(); ?>
 	</div>
 <?php
 	if ($pluginfound) {
 ?>
 	<div id="tabber-commits" class="tabbertab" title="<?php echo _('Commits'); ?>" >
-	<table width="80%">
+	<?php echo $HTML->listTableTop(); ?>
 	<tr><td colspan="2"><!-- dummy in case the hook is empty --></td></tr>
 		<?php
 			$hookParams['artifact_id'] = $aid;
 			$hookParams['group_id'] = $group_id;
 			plugin_hook("artifact_extra_detail",$hookParams);
 		?>
-	</table>
+	<?php echo $HTML->listTableBottom(); ?>
 	</div>
 <?php
 	}
@@ -228,15 +238,15 @@ $nb = $count? ' ('.$count.')' : '';
 	</div>
 	<?php $ah->showRelations(); ?>
 </div>
-<?php if (session_loggedin()) { ?>
-	<table class="fullwidth">
+<?php if (session_loggedin()) {
+	echo $HTML->listTableTop(); ?>
 		<tr>
 			<td>
 				<input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
 			</td>
 		</tr>
-	</table>
-<?php }
+	<?php echo $HTML->listTableBottom();
+}
 echo $HTML->closeForm();
 $ath->footer();
 
diff --git a/src/common/tracker/actions/mod-limited.php b/src/common/tracker/actions/mod-limited.php
index 70731f5..73c8270 100644
--- a/src/common/tracker/actions/mod-limited.php
+++ b/src/common/tracker/actions/mod-limited.php
@@ -4,8 +4,8 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2015, Franck Villaume - TrivialDev
  * Copyright 2012, Thorsten “mirabilos” Glaser <t.glaser at tarent.de>
+ * Copyright 2012-2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -56,8 +56,8 @@ echo $HTML->openForm(array('id' => 'trackermodlimitedform', 'action' => '/tracke
 
 <?php
 if (session_loggedin()) {
+echo $HTML->listTableTop();
 ?>
-<table width="80%">
 		<tr>
 			<td><?php
 				if ($ah->isMonitoring()) {
@@ -95,10 +95,10 @@ if (session_loggedin()) {
 				<input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
 			</td>
 		</tr>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 <br />
-<?php } ?>
-<table width="80%">
+<?php }
+echo $HTML->listTableTop(); ?>
 	<tr>
 		<td><strong><?php echo _('Submitted by')._(':'); ?></strong><br />
 			<?php
@@ -151,9 +151,6 @@ if (session_loggedin()) {
 		</td>
 	</tr>
 	<?php } ?>
-	<?php
-		$ath->renderRelatedTasks($group, $ah);
-	?>
 	<tr>
 		<td colspan="2"><strong><?php echo _('Summary')._(':'); ?><?php echo utils_requiredField(); ?></strong><br />
 			<span id="tracker-summary" title="<?php echo html_get_tooltip_description('summary') ?>">
@@ -165,7 +162,7 @@ if (session_loggedin()) {
 		<br />
 		<?php $ah->showDetails(); ?>
 	</td></tr>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 <div id="tabber">
 <?php
 $count=db_numrows($ah->getMessages());
@@ -182,6 +179,9 @@ foreach ($pluginsListeners as $pluginsListener) {
 ?>
 	<ul>
 	<li><a href="#tabber-comments"><?php echo _('Comments'); ?></a></li>
+	<?php if ($group->usesPM()) { ?>
+	<li><a href="#tabber-tasks"><?php echo _('Related Tasks'); ?></a></li>
+	<?php } ?>
 	<li><a href="#tabber-attachments"><?php echo _('Attachments'); ?></a></li>
 	<?php if ($pluginfound) { ?>
 	<li><a href="#tabber-commits"><?php echo _('Commits'); ?></a></li>
@@ -192,25 +192,33 @@ foreach ($pluginsListeners as $pluginsListener) {
 	<?php } ?>
 	</ul>
 	<div id="tabber-comments" class="tabbertab" title="<?php echo _('Comments').$nb; ?>">
-	<table width="80%">
+	<?php echo $HTML->listTableTop(); ?>
 		<tr><td colspan="2">
 			<br /><strong><?php echo _('Add A Comment') ?>: <?php echo notepad_button('document.forms.trackermodlimitedform.details') ?></strong><br />
-			<textarea id="tracker-comment" name="details" rows="7" cols="60" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea>
+			<textarea id="tracker-comment" name="details" rows="7" style="width: 100%" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea>
 			<p>
 			<?php
 	$ah->showMessages();
 			?>
 		</td></tr>
-	</table>
+	<?php echo $HTML->listTableBottom(); ?>
 	</div>
 <?php
+if ($group->usesPM()) {
+?>
+<div id="tabber-tasks" class="tabbertab" title="<?php echo _('Related Tasks'); ?>">
+	<?php
+		$ath->renderRelatedTasks($group, $ah);
+	?>
+</div>
+<?php }
 $tabcnt=0;
 $file_list = $ah->getFiles();
 $count=count($file_list);
 $nb = $count? ' ('.$count.')' : '';
 ?>
 <div id="tabber-attachments" class="tabbertab" title="<?php echo _('Attachments').$nb; ?>">
-<table width="80%">
+<?php echo $HTML->listTableTop(); ?>
 	<tr><td colspan="2">
 		<?php echo _('Attach Files')._(':'); ?> <?php echo('('._('max upload size')._(': ').human_readable_bytes(util_get_maxuploadfilesize()).')') ?><br />
 		<input type="file" name="input_file0" size="30" /><br />
@@ -227,18 +235,18 @@ $nb = $count? ' ('.$count.')' : '';
 			$ath->renderFiles($group_id, $ah);
 		?>
 	</td></tr>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 </div>
 <?php if ($pluginfound) { ?>
 <div id="tabber-commits" class="tabbertab" title="<?php echo _('Commits'); ?>">
-<table width="80%">
+<?php echo $HTML->listTableTop(); ?>
 <tr><td colspan="2"><!-- dummy in case the hook is empty --></td></tr>
 	<?php
 		$hookParams['artifact_id'] = $aid;
 		$hookParams['group_id'] = $group_id;
 		plugin_hook("artifact_extra_detail",$hookParams);
 	?>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 </div>
 <?php } ?>
 <div id="tabber-changes" class="tabbertab" title="<?php echo _('Changes'); ?>">
@@ -246,15 +254,15 @@ $nb = $count? ' ('.$count.')' : '';
 </div>
 <?php $ah->showRelations(); ?>
 </div>
-<?php if (session_loggedin()) { ?>
-	<table class="fullwidth">
+<?php if (session_loggedin()) {
+	echo $HTML->listTableTop(); ?>
 		<tr>
 			<td>
 				<input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
 			</td>
 		</tr>
-	</table>
-<?php }
+	<?php echo $HTML->listTableBottom();
+}
 echo $HTML->closeForm();
 $ath->footer();
 
diff --git a/src/common/tracker/actions/mod.php b/src/common/tracker/actions/mod.php
index 2e58a5c..f1a4469 100644
--- a/src/common/tracker/actions/mod.php
+++ b/src/common/tracker/actions/mod.php
@@ -5,8 +5,8 @@
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2010 (c) Franck Villaume - Capgemini
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2015, Franck Villaume - TrivialDev
  * Copyright 2012, Thorsten “mirabilos” Glaser <t.glaser at tarent.de>
+ * Copyright 2012-2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -61,8 +61,8 @@ echo $HTML->openForm(array('id' => 'trackermodform', 'action' => '/tracker/?grou
 
 <?php
 if (session_loggedin()) {
+echo $HTML->listTableTop();
 ?>
-<table width="80%">
 		<tr>
 			<td><?php
 				if ($ah->isMonitoring()) {
@@ -105,10 +105,10 @@ if (session_loggedin()) {
 				<input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
 			</td>
 		</tr>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 <br />
 <?php } ?>
-<table width="80%">
+<?php echo $HTML->listTableTop(); ?>
 	<tr>
 		<td>
 			<strong><?php echo _('Submitted by')._(':'); ?></strong><br />
@@ -183,7 +183,6 @@ echo html_build_select_box ($res,'new_artifact_type_id',$ath->getID(),false);
 		</td>
 	</tr>
 	<?php }
-		$ath->renderRelatedTasks($group, $ah);
 	?>
 	<tr>
 		<td colspan="2"><strong><?php echo _('Summary').utils_requiredField()._(':') ?></strong><br />
@@ -196,13 +195,13 @@ echo html_build_select_box ($res,'new_artifact_type_id',$ath->getID(),false);
 		<div id="edit" class="hide">
 		<strong><?php echo _('Detailed description') ?><?php echo utils_requiredField(); ?><?php echo _(': ') ?><?php echo notepad_button('document.forms.trackermodform.description') ?></strong>
 		<br />
-		<textarea id="tracker-description" required="required" name="description" rows="30" cols="79" title="<?php echo html_get_tooltip_description('description') ?>"><?php echo $ah->getDetails(); ?></textarea>
+		<textarea id="tracker-description" required="required" name="description" rows="30" style="width: 100%" title="<?php echo html_get_tooltip_description('description') ?>"><?php echo $ah->getDetails(); ?></textarea>
 		</div>
 		<div id="show" style="display:block;">
 		<?php $ah->showDetails(true); ?>
 		</div>
 	</td></tr>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 <div id="tabber" >
 <?php
 $count=db_numrows($ah->getMessages());
@@ -232,7 +231,7 @@ foreach ($pluginsListeners as $pluginsListener) {
 	<?php } ?>
 	</ul>
 <div id="tabber-comments" class="tabbertab" title="<?php echo _('Comments').$nb; ?>">
-<table width="80%">
+<?php echo $HTML->listTableTop(); ?>
 	<tr><td colspan="2">
 		<br /><strong><?php echo _('Use Canned Response')._(':'); ?></strong><br />
 		<?php
@@ -259,12 +258,12 @@ foreach ($pluginsListeners as $pluginsListener) {
 		/* ]]> */</script>
 		<p>
 		<strong><?php echo _('Post Comment')._(': ') ?><?php echo notepad_button('document.forms.trackermodform.details') ?></strong><br />
-		<textarea id="tracker-comment" name="details" rows="7" cols="60" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea></p>
+		<textarea id="tracker-comment" name="details" rows="7" style="width: 100%" title="<?php echo util_html_secure(html_get_tooltip_description('comment')) ?>"></textarea></p>
 		<?php
 $ah->showMessages();
 		?>
 	</td></tr>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 </div>
 <?php
 if ($group->usesPM()) {
@@ -274,15 +273,14 @@ if ($group->usesPM()) {
 		$ath->renderRelatedTasks($group, $ah);
 	?>
 </div>
-<?php } ?>
-<?php
+<?php }
 $tabcnt=0;
 $file_list = $ah->getFiles();
 $count=count($file_list);
 $nb = $count? ' ('.$count.')' : '';
 ?>
 <div id="tabber-attachments" class="tabbertab" title="<?php echo _('Attachments').$nb; ?>">
-<table width="80%">
+<?php echo $HTML->listTableTop(); ?>
 	<tr><td colspan="2">
         <strong><?php echo _('Attach Files')._(':'); ?></strong> <?php echo('('._('max upload size')._(': ').human_readable_bytes(util_get_maxuploadfilesize()).')') ?><br />
         <input type="file" name="input_file0" size="30" /><br />
@@ -297,18 +295,18 @@ $nb = $count? ' ('.$count.')' : '';
 		$ath->renderFiles($group_id, $ah);
 		?>
 	</td></tr>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 </div>
 <?php if ($pluginfound) { ?>
 <div id="tabber-commits" class="tabbertab" title="<?php echo _('Commits'); ?>">
-<table width="80%">
+<?php echo $HTML->listTableTop(); ?>
 <tr><td colspan="2"><!-- dummy in case the hook is empty --></td></tr>
 	<?php
 		$hookParams['artifact_id'] = $aid;
 		$hookParams['group_id'] = $group_id;
 		plugin_hook("artifact_extra_detail",$hookParams);
 	?>
-</table>
+<?php echo $HTML->listTableBottom(); ?>
 </div>
 <?php } ?>
 <div id="tabber-changes" class="tabbertab" title="<?php echo _('Changes'); ?>">
@@ -316,15 +314,15 @@ $nb = $count? ' ('.$count.')' : '';
 </div>
 	<?php $ah->showRelations(); ?>
 </div>
-<?php if (session_loggedin()) { ?>
-	<table class="fullwidth">
+<?php if (session_loggedin()) {
+	echo $HTML->listTableTop(); ?>
 		<tr>
 			<td>
 				<input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
 			</td>
 		</tr>
-	</table>
-<?php }
+	<?php echo $HTML->listTableBottom();
+}
 echo $HTML->closeForm();
 $ath->footer();
 
diff --git a/src/common/tracker/include/ArtifactTypeHtml.class.php b/src/common/tracker/include/ArtifactTypeHtml.class.php
index 8abd2a0..c38e885 100644
--- a/src/common/tracker/include/ArtifactTypeHtml.class.php
+++ b/src/common/tracker/include/ArtifactTypeHtml.class.php
@@ -473,10 +473,8 @@ EOS;
 		}
 
 		$totalPercentage = 0;
-
+		echo '<tr><td colspan="2">';
 		if ($taskcount > 0) {
-			echo '<tr><td colspan="2">';
-			echo '<b>'._("Related Tasks")._(':').'</b><br/>';
 			$title_arr = array();
 			$title_arr[] = _('Task Id and Summary');
 			$title_arr[] = _('Progress');
@@ -513,8 +511,10 @@ EOS;
 			echo "\n<hr /><p style=\"text-align:right;\">";
 			echo _('Average completion rate')._(': ').(int)($totalPercentage/$taskcount).'%';
 			echo "</p>\n";
-			echo '</td></tr>';
+		} else {
+			echo $HTML->information(_('No related tasks'));
 		}
+		echo '</td></tr>';
 	}
 
 	function renderFiles($group_id, $ah) {

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

Summary of changes:
 src/common/tracker/actions/detail.php              | 52 +++++++++++++---------
 src/common/tracker/actions/mod-limited.php         | 48 +++++++++++---------
 src/common/tracker/actions/mod.php                 | 38 ++++++++--------
 .../tracker/include/ArtifactTypeHtml.class.php     |  8 ++--
 4 files changed, 81 insertions(+), 65 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list