When processing a new version, display a list of the applications existing
versions so its easy to determine if the version submission is a duplicate or is covered by a group entry such as '1.X'.
This commit is contained in:
@@ -56,6 +56,11 @@ if ($_REQUEST['sub'])
|
||||
|
||||
if ($oVersion) //app version
|
||||
{
|
||||
echo html_frame_start("Potential duplicate versions in the database","90%","",0);
|
||||
$oApp = new Application($oVersion->iAppId);
|
||||
display_versions($oApp->iAppId, $oApp->aVersionsIds);
|
||||
echo html_frame_end(" ");
|
||||
|
||||
//help
|
||||
echo "<div align=center><table width='90%' border=0 cellpadding=3 cellspacing=0><tr><td>\n\n";
|
||||
echo "<p>This is the full view of the application version waiting to be approved. \n";
|
||||
|
||||
44
appview.php
44
appview.php
@@ -119,50 +119,6 @@ function show_note($sType,$oData){
|
||||
return $s;
|
||||
}
|
||||
|
||||
/**
|
||||
* display the versions
|
||||
*/
|
||||
function display_versions($iAppId, $aVersionsIds)
|
||||
{
|
||||
if ($aVersionsIds)
|
||||
{
|
||||
echo html_frame_start("","98%","",0);
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n\n";
|
||||
|
||||
echo "<tr class=color4>\n";
|
||||
echo " <td width=\"80\">Version</td>\n";
|
||||
echo " <td>Description</td>\n";
|
||||
echo " <td width=\"80\">Rating</td>\n";
|
||||
echo " <td width=\"80\">Wine version</td>\n";
|
||||
echo " <td width=\"40\">Comments</td>\n";
|
||||
echo "</tr>\n\n";
|
||||
|
||||
$c = 0;
|
||||
foreach($aVersionsIds as $iVersionId)
|
||||
{
|
||||
$oVersion = new Version($iVersionId);
|
||||
|
||||
// set row color
|
||||
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
|
||||
|
||||
//display row
|
||||
echo "<tr class=$bgcolor>\n";
|
||||
echo " <td><a href=\"appview.php?versionId=".$iVersionId."\">".$oVersion->sName."</a></td>\n";
|
||||
echo " <td>".trim_description($oVersion->sDescription)."</td>\n";
|
||||
echo " <td align=center>".$oVersion->sTestedRating."</td>\n";
|
||||
echo " <td align=center>".$oVersion->sTestedRelease."</td>\n";
|
||||
echo " <td align=center>".sizeof($oVersion->aCommentsIds)."</td>\n";
|
||||
echo "</tr>\n\n";
|
||||
|
||||
$c++;
|
||||
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo html_frame_end("Click the Version Name to view the details of that Version");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!is_numeric($_REQUEST['appId']) && !is_numeric($_REQUEST['versionId']))
|
||||
{
|
||||
errorpage("Something went wrong with the application or version id");
|
||||
|
||||
@@ -363,4 +363,48 @@ function outputSearchTableForhResult($search_words, $hResult)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* display the versions
|
||||
* Used in appview.php and adminAppQueue.php
|
||||
*/
|
||||
function display_versions($iAppId, $aVersionsIds)
|
||||
{
|
||||
if ($aVersionsIds)
|
||||
{
|
||||
echo html_frame_start("","98%","",0);
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n\n";
|
||||
|
||||
echo "<tr class=color4>\n";
|
||||
echo " <td width=\"80\">Version</td>\n";
|
||||
echo " <td>Description</td>\n";
|
||||
echo " <td width=\"80\">Rating</td>\n";
|
||||
echo " <td width=\"80\">Wine version</td>\n";
|
||||
echo " <td width=\"40\">Comments</td>\n";
|
||||
echo "</tr>\n\n";
|
||||
|
||||
$c = 0;
|
||||
foreach($aVersionsIds as $iVersionId)
|
||||
{
|
||||
$oVersion = new Version($iVersionId);
|
||||
|
||||
// set row color
|
||||
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
|
||||
|
||||
//display row
|
||||
echo "<tr class=$bgcolor>\n";
|
||||
echo " <td><a href=\"appview.php?versionId=".$iVersionId."\">".$oVersion->sName."</a></td>\n";
|
||||
echo " <td>".trim_description($oVersion->sDescription)."</td>\n";
|
||||
echo " <td align=center>".$oVersion->sTestedRating."</td>\n";
|
||||
echo " <td align=center>".$oVersion->sTestedRelease."</td>\n";
|
||||
echo " <td align=center>".sizeof($oVersion->aCommentsIds)."</td>\n";
|
||||
echo "</tr>\n\n";
|
||||
|
||||
$c++;
|
||||
|
||||
}
|
||||
echo "</table>\n";
|
||||
echo html_frame_end("Click the Version Name to view the details of that Version");
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user