[Fusionforge-commits] r11239 - trunk/src/www/frs/admin

Alain Peyrat aljeux at libremir.placard.fr.eu.org
Thu Oct 28 18:26:57 CEST 2010


Author: aljeux
Date: 2010-10-28 18:26:56 +0200 (Thu, 28 Oct 2010)
New Revision: 11239

Modified:
   trunk/src/www/frs/admin/editrelease.php
Log:
FRS: No edit section if no files inside the release.

Modified: trunk/src/www/frs/admin/editrelease.php
===================================================================
--- trunk/src/www/frs/admin/editrelease.php	2010-10-28 16:26:51 UTC (rev 11238)
+++ trunk/src/www/frs/admin/editrelease.php	2010-10-28 16:26:56 UTC (rev 11239)
@@ -220,7 +220,7 @@
  */
 ?>
 
-<h2><?php echo _('Step 1:&nbsp;&nbsp; Edit Release') ?></h2>
+<h2><?php echo _('Edit Release') ?></h2>
 
 <form enctype="multipart/form-data" method="post" action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&amp;release_id=$release_id&amp;package_id=$package_id"; ?>">
 <input type="hidden" name="step1" value="1" />
@@ -280,7 +280,7 @@
 </form>
 <hr />
 
-<h2><?php echo _('Step 2: Add Files To This Release') ?></h2>
+<h2><?php echo _('Add Files To This Release') ?></h2>
 <p><?php echo _('Now, choose a file to upload into the system.') ?></p>
 
 <form enctype="multipart/form-data" method="post" action="<?php echo getStringFromServer('PHP_SELF')."?group_id=$group_id&amp;release_id=$release_id&amp;package_id=$package_id"; ?>">
@@ -309,7 +309,7 @@
 	echo html_build_select_box_from_arrays($manual_files_arr,$manual_files_arr,'manual_filename',''); ?>
 	</p>
 <?php } ?>
-
+</fieldset>
 <table width="60%">
 <tr>
 <td>
@@ -328,19 +328,16 @@
 </table>
 <p>
 <input type="submit" name="submit" value="<?php echo _('Add This File') ?>" /></p>
-</fieldset>
 </form>
-<hr />
-<h2><?php echo _('Step 3: Edit Files In This Release') ?></h2>
 
 <?php
 	// Get a list of files associated with this release
 	$res=db_query_params ('SELECT * FROM frs_file WHERE release_id=$1',
 			array($release_id));
 	$rows=db_numrows($res);
-	if($rows < 1) {
-		print("<span class=\"error\">"._('No Files In This Release')."</span>\n");
-	} else {
+	if($rows > 0) {
+		echo '<hr />';
+		echo '<h2>'._('Edit Files In This Release').'</h2>';
 		print(_('Once you have added files to this release you <strong>must</strong> update each of these files with the correct information or they will not appear on your download summary page.')."\n");
 		$title_arr[]=_('Filename<br />Release').'<br />';
 		$title_arr[]=_('Processor<br />Release Date').'<br />';
@@ -395,7 +392,6 @@
 	}
 
 echo '<p>' . sprintf(ngettext('There is %1$s user monitoring this package.', 'There are %1$s users monitoring this package.', $frsp->getMonitorCount()), $frsp->getMonitorCount()) . '</p>';
-echo '<hr />';
 
 frs_admin_footer();
 




More information about the Fusionforge-commits mailing list