[Fusionforge-commits] r15760 - trunk/src/common/widget

Franck VILLAUME nerville at fusionforge.org
Tue Jun 12 19:37:13 CEST 2012


Author: nerville
Date: 2012-06-12 19:37:13 +0200 (Tue, 12 Jun 2012)
New Revision: 15760

Modified:
   trunk/src/common/widget/Widget_ProjectLatestFileReleases.class.php
Log:
enhancement when no files are available

Modified: trunk/src/common/widget/Widget_ProjectLatestFileReleases.class.php
===================================================================
--- trunk/src/common/widget/Widget_ProjectLatestFileReleases.class.php	2012-06-12 17:35:03 UTC (rev 15759)
+++ trunk/src/common/widget/Widget_ProjectLatestFileReleases.class.php	2012-06-12 17:37:13 UTC (rev 15760)
@@ -45,29 +45,8 @@
         $project = $pm->getProject($group_id);
 	$unix_group_name = $project->getUnixName();
 $HTML=$GLOBALS['HTML'];
-	echo '
-	<table summary="Latest file releases" class="width-100p100">
-		<tr class="table-header">
-			<th class="align-left" scope="col">
-				'._('Package').'
-			</th>
-			<th scope="col">
-				'._('Version').'
-			</th>
-			<th scope="col">
-				'._('Date').'
-			</th>
-			<th scope="col">
-				'._('Notes').'
-			</th>
-			<th scope="col">
-				'._('Monitor').'
-			</th>
-			<th scope="col">
-				'._('Download').'
-			</th>
-		</tr>';
 
+
 		//
 		//  Members of projects can see all packages
 		//  Non-members can only see public packages
@@ -91,9 +70,31 @@
 		if (!$res_files || $rows_files < 1) {
 			echo db_error();
 			// No releases
-			echo '<tr><td colspan="6"><strong>'._('This Project Has Not Released Any Files').'</strong></td></tr>';
+			echo '<div class="warning">'._('This Project Has Not Released Any Files').'</div>';
 
 		} else {
+			echo '
+				<table summary="Latest file releases" class="width-100p100">
+					<tr class="table-header">
+						<th class="align-left" scope="col">
+							'._('Package').'
+						</th>
+						<th scope="col">
+							'._('Version').'
+						</th>
+						<th scope="col">
+							'._('Date').'
+						</th>
+						<th scope="col">
+							'._('Notes').'
+						</th>
+						<th scope="col">
+							'._('Monitor').'
+						</th>
+						<th scope="col">
+							'._('Download').'
+						</th>
+					</tr>';
 			/*
 				This query actually contains ALL releases of all packages
 				We will test each row and make sure the package has changed before printing the row




More information about the Fusionforge-commits mailing list