[Fusionforge-commits] r8596 - in trunk/gforge/plugins/contribtracker: common www

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Dec 18 18:43:30 CET 2009


Author: lolando
Date: 2009-12-18 18:43:30 +0100 (Fri, 18 Dec 2009)
New Revision: 8596

Modified:
   trunk/gforge/plugins/contribtracker/common/ContribTrackerPlugin.class.php
   trunk/gforge/plugins/contribtracker/www/global_admin.php
Log:
Better readability for the contributors' logos

Modified: trunk/gforge/plugins/contribtracker/common/ContribTrackerPlugin.class.php
===================================================================
--- trunk/gforge/plugins/contribtracker/common/ContribTrackerPlugin.class.php	2009-12-18 17:43:20 UTC (rev 8595)
+++ trunk/gforge/plugins/contribtracker/common/ContribTrackerPlugin.class.php	2009-12-18 17:43:30 UTC (rev 8596)
@@ -105,11 +105,10 @@
 				echo '
 	<table cellspacing="1" cellpadding="5" width="100%" border="0">
 		<tr>
-		<td style="text-align:left">
-			'._('Contribution').'
-		<td style="text-align:center">
-			'._('Contributing organisation').'
-		</td>
+		<th style="text-align:left">'._('Date').'</th>
+		<th style="text-align:left">'._('Contribution').'</th>
+		<th style="text-align:center" colspan="2">'._('Contributor').'</th>
+		<th style="text-align:left">'._('Role').'</th>
 		</tr>';
 
 				$contribs = $this->getContributionsByGroup ($group) ;
@@ -120,29 +119,38 @@
 					$max_displayed_contribs = 3 ;
 					$i = 1 ;
 					foreach ($contribs as $c) {
-						// Contribution
-						echo '<tr><td>' ;
-						echo strftime (_('%Y-%m-%d'), $c->getDate ()) ;
-						echo ' ' ;
-						echo util_make_link ('/plugins/'.$this->name.'/?group_id='.$group_id.'&contrib_id='.$c->getId(),htmlspecialchars($c->getName())) ;
-						echo '</td><td><ul>' ;
-						// Actors involved
 						$parts = $c->getParticipations () ;
-						foreach ($parts as $p) {
-							echo '<li>' ;
-							printf (_('%s: %s (%s)'),
-								htmlspecialchars ($p->getRole()->getName()),
-								util_make_link ('/plugins/'.$this->name.'/?actor_id='.$p->getActor()->getId (),
-										htmlspecialchars ($p->getActor()->getName())),
-								htmlspecialchars ($p->getActor()->getLegalStructure()->getName())) ;
-							if ($p->getActor()->getLogo() != '') {
-								print ' <img type="image/png" src="'.util_make_url ('/plugins/'.$this->name.'/actor_logo.php?actor_id='.$p->getActor()->getId ()).'" />' ;
+						if (count ($parts) != 0) {
+							$f = 1 ;
+							foreach ($parts as $p) {
+								echo '<tr>' ;
+								if ($f == 1) {
+									$f = 0 ;
+									// Contribution
+									echo '<td rowspan="'.count ($parts).'">' ;
+									echo strftime (_('%Y-%m-%d'), $c->getDate ()) ;
+									echo '</td>' ;
+									echo '<td rowspan="'.count ($parts).'">' ;
+									echo util_make_link ('/plugins/'.$this->name.'/?group_id='.$group_id.'&contrib_id='.$c->getId(),htmlspecialchars($c->getName())) ;
+									echo '</td>' ;
+								}
+								// Actors involved
+								echo '<td>' ;
+								if ($p->getActor()->getLogo() != '') {
+									print ' <img type="image/png" src="'.util_make_url ('/plugins/'.$this->name.'/actor_logo.php?actor_id='.$p->getActor()->getId ()).'" />' ;
+								}
+								echo '</td><td>' ;
+								printf (_('%s (%s)'),
+									util_make_link ('/plugins/'.$this->name.'/?actor_id='.$p->getActor()->getId (),
+											htmlspecialchars ($p->getActor()->getName())),
+									htmlspecialchars ($p->getActor()->getLegalStructure()->getName())) ;
+								echo '</td><td>' ;
+								echo htmlspecialchars ($p->getRole()->getName()) ;
+								echo '</td>' ;
+								echo '</tr>' ;
 							}
-							echo '</li>' ;
+							$i++ ;
 						}
-						echo '</ul></td></tr>' ;
-
-						$i++ ;
 						if ($i > $max_displayed_contribs) {
 							break ;
 						}

Modified: trunk/gforge/plugins/contribtracker/www/global_admin.php
===================================================================
--- trunk/gforge/plugins/contribtracker/www/global_admin.php	2009-12-18 17:43:20 UTC (rev 8595)
+++ trunk/gforge/plugins/contribtracker/www/global_admin.php	2009-12-18 17:43:30 UTC (rev 8596)
@@ -220,25 +220,25 @@
 	$actors = $plugin->getActors () ;
 	if (count ($actors)) {
 		print '<table><thead><tr>' ;
+		print '<td><strong>'._('Logo').'</strong></td>' ;
 		print '<td><strong>'._('Short name').'</strong></td>' ;
 		print '<td><strong>'._('Postal address').'</strong></td>' ;
 		print '<td><strong>'._('Email').'</strong></td>' ;
 		print '<td><strong>'._('Description').'</strong></td>' ;
-		print '<td><strong>'._('Logo').'</strong></td>' ;
 		print '<td><strong>'._('Legal structure').'</strong></td>' ;
 		print '<td><strong>'._('Actions').'</strong></td>' ;
 		print '</tr></thead><tbody>' ;
 		foreach ($actors as $a) {
 			print '<tr>';
-			print '<td>'.htmlspecialchars($a->getName()).'</td>' ;
-			print '<td>'.htmlspecialchars($a->getAddress()).'</td>' ;
-			print '<td>'.htmlspecialchars($a->getEmail()).'</td>' ;
-			print '<td>'.htmlspecialchars($a->getDescription()).'</td>' ;
 			print '<td>' ;
 			if ($a->getLogo() != '') {
 				print '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$a->getId ()).'" />' ;
 			}
 			print '</td>' ;
+			print '<td>'.htmlspecialchars($a->getName()).'</td>' ;
+			print '<td>'.htmlspecialchars($a->getAddress()).'</td>' ;
+			print '<td>'.htmlspecialchars($a->getEmail()).'</td>' ;
+			print '<td>'.htmlspecialchars($a->getDescription()).'</td>' ;
 			print '<td>'.htmlspecialchars($a->getLegalStructure()->getName()).'</td>' ;
 			?>
 				<td>




More information about the Fusionforge-commits mailing list