[evolvis-commits] r16964: Fix warning if no tags defined in project admin page

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Mar 1 01:53:48 CET 2011


Author: mirabilos
Date: 2011-03-01 01:53:48 +0100 (Tue, 01 Mar 2011)
New Revision: 16964

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/www/project/admin/index.php
Log:
Fix warning if no tags defined in project admin page

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/project/admin/index.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/project/admin/index.php	2011-03-01 00:53:45 UTC (rev 16963)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/project/admin/index.php	2011-03-01 00:53:48 UTC (rev 16964)
@@ -8,7 +8,7 @@
  *
  * Copyright 2004 GForge, LLC - Tim Perdue
  * Copyright 2010 (c), Franck Villaume
- * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
+ * Copyright (C) 2010-2011 Alain Peyrat - Alcatel-Lucent
  * http://fusionforge.org
  *
  * This file is part of FusionForge.
@@ -154,43 +154,42 @@
 <h2><?php echo _('Project tags'); ?></h2>
 <?php echo _('Add tags (use comma as separator): ') ?><br />
 <input type="text" name="form_tags" size="100" value="<?php echo $group->getTags(); ?>" />
-</p><br />
-<?php echo _('Or pick a tag from those used by other projects: ') ?><br />
+</p>
 <?php 
-	 
-	 echo '<table width="100%"><thead><tr>';
-echo '<th>'._('Tags').'</th>';
-echo '<th>'._('Projects').'</th>';
-echo '</tr></thead><tbody>';
+	$infos = getAllProjectTags();
+	if ($infos) {
+		echo '<br />';
+		echo _('Or pick a tag from those used by other projects: ');
+		echo '<br />';
+		echo '<table width="100%"><thead><tr>';
+		echo '<th>'._('Tags').'</th>';
+		echo '<th>'._('Projects').'</th>';
+		echo '</tr></thead><tbody>';
 
-$infos = getAllProjectTags();
+		$unix_name = $group->getUnixName();
+		foreach ($infos as $tag => $plist) {
+			$disabled = '';
+			$links = array();
+			foreach($plist as $project) {
+				$links[] = util_make_link('/projects/'.$project['unix_group_name'].'/',$project['unix_group_name']);
+				if ($project['group_id'] == $group_id) {
+					$disabled = ' disabled="disabled"';
+				}
+			}
 
-$unix_name = $group->getUnixName();
-foreach ($infos as $tag => $plist) {
-	$disabled = '';
-	$links = array();
-	foreach($plist as $project) {
-		$links[] = util_make_link('/projects/'.$project['unix_group_name'].'/',$project['unix_group_name']);
-		if ($project['group_id'] == $group_id) {
-			$disabled = ' disabled="disabled"';
+			echo '<tr>';
+			echo '<td><input type="checkbox" name="addTags[]" value="'.$tag.'"'.$disabled.' /> ';
+			if ($disabled) {
+				echo '<s>'.$tag.'</s>';
+			} else {
+				echo $tag;
+			}
+			echo '</td>';
+			echo '<td>'.implode(' ', $links).'</td>' ;
+			echo '</tr>' ;
 		}
+		echo '</table>' ;
 	}
-	
-	echo '<tr>';
-	echo '<td><input type="checkbox" name="addTags[]" value="'.$tag.'"'.$disabled.' /> ';
-	if ($disabled) {
-		echo '<s>'.$tag.'</s>';
-	} else {
-		echo $tag;
-	}
-	echo '</td>';
-	echo '<td>'.implode(' ', $links).'</td>' ;
-	echo '</tr>' ;
-}
-echo '</table>' ;
-
-
-
 } ?>
 
 <h2><?php echo _('Trove Categorization'); ?></h2>



More information about the evolvis-commits mailing list