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

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


Author: lolando
Date: 2009-12-18 18:40:48 +0100 (Fri, 18 Dec 2009)
New Revision: 8580

Modified:
   trunk/gforge/plugins/contribtracker/common/ContribTrackerPlugin.class.php
   trunk/gforge/plugins/contribtracker/www/index.php
Log:
Better accessibility

Modified: trunk/gforge/plugins/contribtracker/common/ContribTrackerPlugin.class.php
===================================================================
--- trunk/gforge/plugins/contribtracker/common/ContribTrackerPlugin.class.php	2009-12-18 17:40:35 UTC (rev 8579)
+++ trunk/gforge/plugins/contribtracker/common/ContribTrackerPlugin.class.php	2009-12-18 17:40:48 UTC (rev 8580)
@@ -49,7 +49,7 @@
 			}
 			if ( $project->usesPlugin ( $this->name ) ) {
 				$params['TITLES'][] = _('Contribution tracker') ;
-				$params['DIRS'][]='/plugins/contribtracker/index.php?group_id=' . $group_id ;
+				$params['DIRS'][]='/plugins/'.$this->name.'/?group_id=' . $group_id ;
 			}
 			(($params['toptab'] == $this->name) ? $params['selected']=(count($params['TITLES'])-1) : '' );
 		} elseif ($hookname == "groupisactivecheckbox") {
@@ -87,7 +87,7 @@
 			$group_id = $params['group_id'];
 			$group = &group_get_object($group_id);
 			if ( $group->usesPlugin ( $this->name ) ) {
-				echo util_make_link ("/plugins/contribtracker/index.php?id=".$group->getID().'&type=admin&pluginname='.$this->name,
+				echo util_make_link ("/plugins/".$this->name."/?id=".$group->getID().'&type=admin&pluginname='.$this->name,
 						     _('Contribution Tracker admin')) ;
 				echo '</p>';
 			}
@@ -105,17 +105,10 @@
 	<table cellspacing="1" cellpadding="5" width="100%" border="0">
 		<tr>
 		<td style="text-align:left">
-			'._('Contribution name').'
-		</td>
+			'._('Contribution').'
 		<td style="text-align:center">
-			'._('Date').'
-		</td>
-		<td style="text-align:center">
 			'._('Contributing organisation').'
 		</td>
-		<td style="text-align:center">
-			'._('Role').'
-		</td>
 		</tr>';
 
 				$contribs = $this->getContributionsByGroup ($group) ;
@@ -129,23 +122,22 @@
 					foreach ($contribs as $c) {
 						// Contribution
 						echo '<tr><td>' ;
-						echo util_make_link ('/plugins/'.$this->name.'?group_id='.$group_id.'&contrib_id='.$c->getId(),htmlspecialchars($c->getName())) ;
-						echo '</td><td>' ;
 						echo strftime (_('%Y-%m-%d'), $c->getDate ()) ;
-						echo '</td><td>' ;
-						echo '</td><td>' ;
-						echo '</td></tr>' ;
-
+						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 '<tr><td></td><td></td><td>' ;
-							echo (util_make_link ('/plugins/'.$this->name.'/index.php?actor_id='.$p->getActor()->getId (),
-									      htmlspecialchars ($p->getActor()->getName()))) ;
-							echo '</td><td>' ;
-							echo htmlspecialchars ($p->getRole()->getName()) ;
-							echo '</td><td></tr>' ;
+							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())) ;
+							echo '</li>' ;
 						}
+						echo '</ul></td></tr>' ;
 
 						$i++ ;
 						if ($i > $max_displayed_contribs) {
@@ -155,7 +147,7 @@
 				}
 				?></table>
 					    <div style="text-align:center">
-					    <?php echo util_make_link ('/plugins/'.$this->name.'?group_id='.$group_id,'['._('View All Contributions').']'); ?>
+					    <?php echo util_make_link ('/plugins/'.$this->name.'/?group_id='.$group_id,_('[View All Contributions]')); ?>
 					    </div>
 						      <?php
 						      echo $HTML->boxBottom();

Modified: trunk/gforge/plugins/contribtracker/www/index.php
===================================================================
--- trunk/gforge/plugins/contribtracker/www/index.php	2009-12-18 17:40:35 UTC (rev 8579)
+++ trunk/gforge/plugins/contribtracker/www/index.php	2009-12-18 17:40:48 UTC (rev 8580)
@@ -39,7 +39,7 @@
 		print '<li>' ;
 		printf (_('%s: %s (%s)'),
 			htmlspecialchars ($p->getRole()->getName()),
-			util_make_link ('/plugins/contribtracker/index.php?actor_id='.$p->getActor()->getId (),
+			util_make_link ('/plugins/'.$plugin->name.'/?actor_id='.$p->getActor()->getId (),
 					htmlspecialchars ($p->getActor()->getName())),
 			htmlspecialchars ($p->getActor()->getLegalStructure()->getName())) ;
 		print '</li>' ;
@@ -137,7 +137,7 @@
 		
 		foreach ($participations as $p) {
 			$c = $p->getContribution () ;
-			print '<h3>' . util_make_link ('/plugins/contribtracker/index.php?group_id='.$c->getGroup()->getId().'&contrib_id='.$c->getId (),
+			print '<h3>' . util_make_link ('/plugins/'.$plugin->name.'/?group_id='.$c->getGroup()->getId().'&contrib_id='.$c->getId (),
 						       htmlspecialchars ($c->getName())) . '</h3>' ;
 			print '<strong>'._('Group:').'</strong> ' ;
 			print util_make_link_g ($c->getGroup()->getUnixName(),




More information about the Fusionforge-commits mailing list