diff --git a/admin/adminAppQueue.php b/admin/adminAppQueue.php index fc4a56a..d3deefd 100644 --- a/admin/adminAppQueue.php +++ b/admin/adminAppQueue.php @@ -64,49 +64,6 @@ function outputSearchTableForDuplicateFlagging($currentAppId, $hResult) } } -function display_move_test_to_versions_table($aVersionsIds,$icurrentVersionId) -{ - if ($aVersionsIds) - { - echo html_frame_start("","98%","",0); - echo "\n\n"; - - echo "\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n\n"; - - $c = 0; - foreach($aVersionsIds as $iVersionId) - { - $oVersion = new Version($iVersionId); - if ($oVersion->sQueued == 'false') - { - // set row color - $sBgColor = ($c % 2 == 0) ? "color0" : "color1"; - - //display row - echo "\n"; - echo " \n"; - - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "\n\n"; - - $c++; - } - } - echo "
VersionDescriptionRatingWine versionComments
".html_ahref($oVersion->sName,"adminAppQueue.php?sSub=movetest&sAppType=version&iVersionId=".$icurrentVersionId."&iVersionIdMergeTo=".$oVersion->iVersionId)."".util_trim_description($oVersion->sDescription)."".$oVersion->sTestedRating."".$oVersion->sTestedRelease."".Comment::get_comment_count_for_versionid($oVersion->iVersionId)."
\n"; - echo html_frame_end("Click the Version Name to view the details of that Version"); - } -} - - //deny access if not logged in or not a super maintainer of any applications if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isSuperMaintainer()) util_show_error_page_and_exit("Insufficient privileges."); @@ -294,25 +251,9 @@ if ($aClean['sSub']) "bIsRejected=$sIsRejected&sTitle=".$aClean['sAppType']."%20Queue"); if (!$oApp) //app version - { - echo html_frame_start("Potential duplicate versions in the database","90%","",0); - $oAppForVersion = new Application($oVersion->iAppId); - Version::display_approved($oAppForVersion->aVersionsIds); - echo html_frame_end(" "); + { + // Version handling moved to objectManager - echo html_frame_start("Move test to version","90%","",0); - display_move_test_to_versions_table($oAppForVersion->aVersionsIds,$oVersion->iVersionId); - echo html_frame_end(" "); - - //help - echo "
\n\n"; - echo "

This is the full view of the application version waiting to be approved. \n"; - echo "If you approve this application version an email will be sent to the author of the submission.

\n"; - - echo "App Version This type of application will be nested under the selected application parent.\n"; - echo "

Click delete to remove the selected item from the queue an email will automatically be sent to the\n"; - echo "submitter to let him know the item was deleted.

\n\n"; - echo "
\n\n"; } else // application { echo html_frame_start("Potential duplicate applications in the database", "90%", "", 0); diff --git a/include/version_queue.php b/include/version_queue.php index 2a5b832..1cd52df 100644 --- a/include/version_queue.php +++ b/include/version_queue.php @@ -71,6 +71,7 @@ class version_queue function outputEditor() { + $this->displayMoveTestTable(); $this->oVersion->outputEditor(); /* Allow the user to apply as maintainer if this is a new version. @@ -154,6 +155,58 @@ class version_queue { return TRUE; } + + function displayMoveTestTable() + { + $oApp = new application($this->oVersion->iAppId); + + echo html_frame_start("Move test to version","90%","",0); + echo "\n\n"; + + echo html_tr(array( + array("Version", 'width="80"'), + "Description", + array("Rating", 'width="80"'), + array("Wine version", 'width="80"'), + array("Comments", 'width="40"'), + array("Move test results", 'width="80"') + ), + "color4"); + + $i = 0; + foreach($oApp->aVersionsIds as $iVersionId) + { + $oVersion = new Version($iVersionId); + if ($oVersion->sQueued == 'false') + { + //display row + echo html_tr(array( + $oVersion->objectMakeLink(), + util_trim_description($oVersion->sDescription), + array($oVersion->sTestedRating, 'align="center"'), + array($oVersion->sTestedRelease, 'align="center"'), + array(Comment::get_comment_count_for_versionid( + $oVersion->iVersionId), 'align="center"'), + html_ahref("Move here", + "admin/adminAppQueue.php?sSub=movetest&sAppType=version&". + "iVersionId=" + .$this->oVersion->iVersionId."&iVersionIdMergeTo=". + $oVersion->iVersionId) + ), + ($i % 2) ? "color0" : "color1"); + + $i++; + } + } + echo "
\n"; + echo html_frame_end(" "); + } + + function objectDisplayQueueProcessingHelp() + { + version::objectDisplayQueueProcessingHelp(); + } } ?>