From 886cdeafa358f2eec65245a1cfa2a0d8e32f1206 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Mon, 23 Apr 2007 02:33:19 +0000 Subject: [PATCH] Clean up the layout of the version and application pages and add some css classes to define the formatting --- application.css | 7 ++ include/application.php | 12 ++- include/testData.php | 37 +++++---- include/version.php | 174 ++++++++++++++++++++++++---------------- 4 files changed, 143 insertions(+), 87 deletions(-) diff --git a/application.css b/application.css index 6094e13..4922293 100644 --- a/application.css +++ b/application.css @@ -29,3 +29,10 @@ tr.gold { background-color: #fff600; } tr.silver { background-color: silver; } tr.bronze { background-color: #fcba0a; } tr.garbage { background-color: #999966; } + +/* classes for the version info pane */ +/* version info pane is the right hand pane at the top of the version page */ +div.version_info_pane p { margin:0px; } +div.info_container { margin:6px; border: 1px solid; } +div.info_contents { padding:10px; background-color: #eee; } +div.title_class { font-weight: bold; border-bottom: 1px solid; padding: 4px; font-size: 140%; background-color: #ddd; } diff --git a/include/application.php b/include/application.php index 54269d5..c174642 100644 --- a/include/application.php +++ b/include/application.php @@ -716,9 +716,15 @@ class Application { // description echo " \n"; - echo "
Description\n"; - echo $this->sDescription; - echo "
\n"; + echo "
\n"; + echo "\t
\n"; + echo "\t\tDescription\n"; + echo "\t
\n"; // close the 'title_class' div + echo "\t
\n"; + echo "\t\t".$this->sDescription."\n"; + echo "\t
\n"; // close the 'info_contents' div + echo "
\n"; // close the 'info_container' div + echo html_frame_end("For more details and user comments, view the versions of this application."); // display versions diff --git a/include/testData.php b/include/testData.php index 47d57b6..cd78e32 100644 --- a/include/testData.php +++ b/include/testData.php @@ -421,13 +421,13 @@ class testData{ function ShowTestResult() { echo '

What works
',"\n"; - echo $this->shWhatWorks; - echo '

What does not
',"\n"; - echo $this->shWhatDoesnt; - echo '

What was not tested
',"\n"; - echo $this->shWhatNotTested; - echo '

Additional Comments
',"\n"; - echo $this->sComments; + echo $this->shWhatWorks,"\n"; + echo '


What does not
',"\n"; + echo $this->shWhatDoesnt,"\n"; + echo '


What was not tested
',"\n"; + echo $this->shWhatNotTested,"\n"; + echo '


Additional Comments
',"\n"; + echo $this->sComments,"\n"; } // Show the Test results for a application version @@ -459,7 +459,9 @@ class testData{ if($rowsUsed == 0) return; - echo '

Test Results
',"\n"; + echo '

',"\n"; + echo '
Test Results
',"\n"; + echo '
',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; @@ -486,11 +488,11 @@ class testData{ if ($oTest->iTestingId == $this->iTestingId) { echo '',"\n"; - echo ' ',"\n"; + echo ' ',"\n"; } else /* make all non-current rows clickable so clicking on them selects the test as current */ { html_tr_highlight_clickable($link.$oTest->iTestingId, $bgcolor, "", "color2", "underline"); - echo ' ',"\n"; @@ -519,16 +521,21 @@ class testData{ echo '
CurrentCurrent[[Show]
',"\n"; - echo '
'; - echo ''; + echo '
',"\n"; // put a space after the test results table and the button + + echo ''."\n"; + echo "\t".''."\n"; if($rowsUsed >= $iDisplayLimit && !is_string($sShowAll)) - echo ''; + echo "\t".''."\n"; if(is_string($sShowAll)) { - echo ''; + echo "\t".''."\n"; } - echo '
'; + echo ''."\n"; + + echo '
',"\n"; // end of the 'info_contents' div + echo '
',"\n"; // end of the 'info_container' div } /* retrieve the latest test result for a given version id */ diff --git a/include/version.php b/include/version.php index 6551326..5d612b0 100644 --- a/include/version.php +++ b/include/version.php @@ -761,86 +761,86 @@ class Version { echo ""; echo "No maintainers. Volunteer today!\n"; } - echo ""; + echo "\n"; // display the app maintainer button - echo ''; + echo ''."\n"; if($_SESSION['current']->isLoggedIn()) { /* is this user a maintainer of this version by virtue of being a super maintainer */ /* of this app family? */ if($_SESSION['current']->isSuperMaintainer($oApp->iAppId)) { - echo '
'; - echo ''; - echo ''; - echo "iAppId."\">"; - echo "iVersionId."\">"; - echo "
"; + echo '
'."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; + echo "\tiAppId."\">\n"; + echo "\tiVersionId."\">\n"; + echo "
\n"; } else { /* are we already a maintainer? */ if($_SESSION['current']->isMaintainer($this->iVersionId)) /* yep */ { - echo '
'; - echo ''; - echo ''; - echo "iAppId."\">"; - echo "iVersionId."\">"; - echo "
"; + echo '
'."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; + echo "\t"."iAppId."\">\n"; + echo "\t"."iVersionId."\">\n"; + echo "
\n"; } else /* nope */ { - echo '
'; - echo ''; - echo "iAppId."\">"; - echo "iVersionId."\">"; - echo "
"; + echo '
'."\n"; + echo "\t".''."\n"; + echo "\t"."iAppId."\">\n"; + echo "\t"."iVersionId."\">\n"; + echo "
\n"; $oMonitor = new Monitor(); $oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId); if(!$oMonitor->iMonitorId) { echo '
'; - echo ''; - echo ''; - echo "
"; + $this->objectMakeUrl().'&iAppId='.$oApp->iAppId.'>'."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; + echo "\n"; } } } } else { - echo '
'; - echo ''; - echo ''; - echo '
'; + echo '
'."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; + echo '
'."\n"; } echo ""; if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($this->iVersionId) || $_SESSION['current']->isSuperMaintainer($this->iAppId)) { - echo ''; - echo '
'; - echo ''; - echo ''; - echo ''; - echo '
'; + echo ''."\n"; + echo '
'."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; + echo '
'."\n"; $url = BASE."admin/deleteAny.php?sWhat=appVersion&iAppId=".$oApp->iAppId."&iVersionId=".$this->iVersionId."&sConfirmed=yes"; - echo "
"; - echo ''; - echo '
'; - echo '
'; - echo ''; - echo ''; - echo '
'; - echo '
iVersionId.'>'; - echo ''; - echo ''; - echo '
'; - echo '
iVersionId.'>'; - echo ''; - echo ''; + echo "\n"; + echo "\t".''."\n"; + echo '
'."\n"; + echo '
'."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; + echo '
'."\n"; + echo '
iVersionId.'>'."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; + echo '
'."\n"; + echo '
iVersionId.'>'."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; echo '
'; echo ""; } @@ -848,24 +848,47 @@ class Version { $oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId); if($oMonitor->iMonitorId) { - echo ''; - echo ''; + echo ''."\n"; + echo ''."\n"; echo '
'; - echo ''; - echo ''; - echo '
'; - echo ""; + $this->objectMakeUrl().'>'."\n"; + echo '."\n"'; + echo ''."\n"; + echo "\n"; + echo "\n"; } - echo "\n"; + echo "\n"; - // description - echo ""; - - /* close the table */ - echo "
Description
\n"; - echo $this->sDescription; + // start of the right hand pane in the version display + echo "
\n"; + echo "
\n"; + + ///////////////////////// + // output the description + echo "
\n"; + + // output the description title + echo "\t
\n"; + echo "\t\tDescription\n"; + echo "\t
\n"; + + // output the description + echo "\t
\n"; + echo "\t\t".$this->sDescription."\n"; + echo "\t
\n"; + + echo "
\n"; // end the 'info_container' div + // end description + ///////////////////////// + ////////////////////// // Show test data + echo "
\n"; + echo "\t
\n"; + echo "\t\tSelected test results (selected in 'Test Results' table below)\n"; + echo "\t
\n"; $oTest = new testData($iTestingId); /* if $iTestingId wasn't valid then it won't be valid in $oTest */ @@ -876,7 +899,17 @@ class Version { $oTest = new testData($iTestingId); } + echo "
\n"; $oTest->ShowTestResult(); + echo "
\n"; + + echo "
\n"; // end the 'info_container' div + // end show test data + ///////////////////// + + + ////////////////////////////// + // show the test results table if($oTest->iTestingId) { $oTest->ShowVersionsTestingTable($_SERVER['PHP_SELF']."?iVersionId=".$this->iVersionId."&iTestingId=", @@ -886,20 +919,23 @@ class Version { { echo '
iVersionId. - '&sTitle=Add+Test+Data>'; - echo ''; - echo '
'; + '&sTitle=Add+Test+Data>'."\n"; + echo "\t".''."\n"; + echo ''."\n"; } else { - echo '
'; - echo ''; - echo ''; - echo '
'; + echo '
'."\n"; + echo "\t".''."\n"; + echo "\t".''."\n"; + echo '
'."\n"; } - echo "
\n"; + + // end show test results table + ///////////////////////////// + + + echo "\n"; // end the version info pane, the right hand pane in the + // version display echo html_frame_end();