Clean up the layout of the version and application pages and add some css classes to define

the formatting
This commit is contained in:
Chris Morgan
2007-04-23 02:33:19 +00:00
committed by WineHQ
parent 6b265f46fe
commit 886cdeafa3
4 changed files with 143 additions and 87 deletions

View File

@@ -29,3 +29,10 @@ tr.gold { background-color: #fff600; }
tr.silver { background-color: silver; } tr.silver { background-color: silver; }
tr.bronze { background-color: #fcba0a; } tr.bronze { background-color: #fcba0a; }
tr.garbage { background-color: #999966; } 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; }

View File

@@ -716,9 +716,15 @@ class Application {
// description // description
echo " <td class=color2 valign=top width='100%'>\n"; echo " <td class=color2 valign=top width='100%'>\n";
echo " <table width='100%' border=0><tr><td width='100%' valign=top><span class=\"title\">Description</span>\n"; echo "<div class='info_container'>\n";
echo $this->sDescription; echo "\t<div class='title_class'>\n";
echo " </td></tr></table>\n"; echo "\t\tDescription\n";
echo "\t</div>\n"; // close the 'title_class' div
echo "\t<div class='info_contents'>\n";
echo "\t\t".$this->sDescription."\n";
echo "\t</div>\n"; // close the 'info_contents' div
echo "</div>\n"; // close the 'info_container' div
echo html_frame_end("For more details and user comments, view the versions of this application."); echo html_frame_end("For more details and user comments, view the versions of this application.");
// display versions // display versions

View File

@@ -421,13 +421,13 @@ class testData{
function ShowTestResult() function ShowTestResult()
{ {
echo '<p><b>What works</b><br />',"\n"; echo '<p><b>What works</b><br />',"\n";
echo $this->shWhatWorks; echo $this->shWhatWorks,"\n";
echo '<p><b>What does not</b><br />',"\n"; echo '<p><br /><b>What does not</b><br />',"\n";
echo $this->shWhatDoesnt; echo $this->shWhatDoesnt,"\n";
echo '<p><b>What was not tested</b><br />',"\n"; echo '<p><br /><b>What was not tested</b><br />',"\n";
echo $this->shWhatNotTested; echo $this->shWhatNotTested,"\n";
echo '<p><b>Additional Comments</b><br />',"\n"; echo '<p><br /><b>Additional Comments</b><br />',"\n";
echo $this->sComments; echo $this->sComments,"\n";
} }
// Show the Test results for a application version // Show the Test results for a application version
@@ -459,7 +459,9 @@ class testData{
if($rowsUsed == 0) if($rowsUsed == 0)
return; return;
echo '<p><span class="title">Test Results</span><br />',"\n"; echo '<div class="info_container">',"\n";
echo '<div class="title_class">Test Results</div>',"\n";
echo '<div class="info_contents">',"\n";
echo '<table width="100%" border="1" class="historyTable">',"\n"; echo '<table width="100%" border="1" class="historyTable">',"\n";
echo '<thead class="historyHeader">',"\n"; echo '<thead class="historyHeader">',"\n";
echo '<tr>',"\n"; echo '<tr>',"\n";
@@ -486,11 +488,11 @@ class testData{
if ($oTest->iTestingId == $this->iTestingId) if ($oTest->iTestingId == $this->iTestingId)
{ {
echo '<tr class='.$bgcolor.'>',"\n"; echo '<tr class='.$bgcolor.'>',"\n";
echo ' <td align="center" class="color2"><b>Current</b></td>',"\n"; echo ' <td align="center"><b>Current</b></td>',"\n";
} else /* make all non-current rows clickable so clicking on them selects the test as current */ } 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"); html_tr_highlight_clickable($link.$oTest->iTestingId, $bgcolor, "", "color2", "underline");
echo ' <td align="center" class="color2">[<a href="'.$link.$oTest->iTestingId; echo ' <td align="center">[<a href="'.$link.$oTest->iTestingId;
if(is_string($sShowAll)) if(is_string($sShowAll))
echo '&sShowAll='.$sShowAll.'">Show</a>]</td>',"\n"; echo '&sShowAll='.$sShowAll.'">Show</a>]</td>',"\n";
@@ -519,16 +521,21 @@ class testData{
echo '</table>',"\n"; echo '</table>',"\n";
echo '<form method=get action="'.$PHP_SELF.'">'; echo '<br />',"\n"; // put a space after the test results table and the button
echo '<input name="iVersionId" type=hidden value="',$this->iVersionId,'" />';
echo '<form method=get action="'.$PHP_SELF.'">'."\n";
echo "\t".'<input name="iVersionId" type=hidden value="',$this->iVersionId,'" />'."\n";
if($rowsUsed >= $iDisplayLimit && !is_string($sShowAll)) if($rowsUsed >= $iDisplayLimit && !is_string($sShowAll))
echo '<input class="button" name="sShowAll" type=submit value="Show All Tests" />'; echo "\t".'<input class="button" name="sShowAll" type=submit value="Show All Tests" />'."\n";
if(is_string($sShowAll)) if(is_string($sShowAll))
{ {
echo '<input class="button" name="sHideAll" type=submit value="Limit to '.$iDisplayLimit.' Tests" />'; echo "\t".'<input class="button" name="sHideAll" type=submit value="Limit to '.$iDisplayLimit.' Tests" />'."\n";
} }
echo '</form>'; echo '</form>'."\n";
echo '</div>',"\n"; // end of the 'info_contents' div
echo '</div>',"\n"; // end of the 'info_container' div
} }
/* retrieve the latest test result for a given version id */ /* retrieve the latest test result for a given version id */

View File

@@ -761,86 +761,86 @@ class Version {
echo "<tr class=color0><td align=right colspan=2>"; echo "<tr class=color0><td align=right colspan=2>";
echo "No maintainers. Volunteer today!</td></tr>\n"; echo "No maintainers. Volunteer today!</td></tr>\n";
} }
echo "</table></td></tr>"; echo "</table></td></tr>\n";
// display the app maintainer button // display the app maintainer button
echo '<tr><td colspan="2" align="center">'; echo '<tr><td colspan="2" align="center">'."\n";
if($_SESSION['current']->isLoggedIn()) if($_SESSION['current']->isLoggedIn())
{ {
/* is this user a maintainer of this version by virtue of being a super maintainer */ /* is this user a maintainer of this version by virtue of being a super maintainer */
/* of this app family? */ /* of this app family? */
if($_SESSION['current']->isSuperMaintainer($oApp->iAppId)) if($_SESSION['current']->isSuperMaintainer($oApp->iAppId))
{ {
echo '<form method="post" name="sMessage" action="maintainerdelete.php">'; echo '<form method="post" name="sMessage" action="maintainerdelete.php">'."\n";
echo '<input type="submit" value="Remove yourself as a super maintainer" class="button">'; echo "\t".'<input type="submit" value="Remove yourself as a super maintainer" class="button">'."\n";
echo '<input type="hidden" name="iSuperMaintainer" value="1">'; echo "\t".'<input type="hidden" name="iSuperMaintainer" value="1">'."\n";
echo "<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">"; echo "\t<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">\n";
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">"; echo "\t<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">\n";
echo "</form>"; echo "</form>\n";
} else } else
{ {
/* are we already a maintainer? */ /* are we already a maintainer? */
if($_SESSION['current']->isMaintainer($this->iVersionId)) /* yep */ if($_SESSION['current']->isMaintainer($this->iVersionId)) /* yep */
{ {
echo '<form method="post" name="sMessage" action="maintainerdelete.php">'; echo '<form method="post" name="sMessage" action="maintainerdelete.php">'."\n";
echo '<input type="submit" value="Remove yourself as a maintainer" class=button>'; echo "\t".'<input type="submit" value="Remove yourself as a maintainer" class=button>'."\n";
echo '<input type="hidden" name="iSuperMaintainer" value="0">'; echo "\t".'<input type="hidden" name="iSuperMaintainer" value="0">'."\n";
echo "<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">"; echo "\t"."<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">\n";
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">"; echo "\t"."<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">\n";
echo "</form>"; echo "</form>\n";
} else /* nope */ } else /* nope */
{ {
echo '<form method="post" name="sMessage" action="maintainersubmit.php">'; echo '<form method="post" name="sMessage" action="maintainersubmit.php">'."\n";
echo '<input type="submit" value="Be a Maintainer for This Version" class="button" title="Click here to know more about maintainers.">'; echo "\t".'<input type="submit" value="Be a Maintainer for This Version" class="button" title="Click here to know more about maintainers.">'."\n";
echo "<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">"; echo "\t"."<input type=hidden name=\"iAppId\" value=\"".$oApp->iAppId."\">\n";
echo "<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">"; echo "\t"."<input type=hidden name=\"iVersionId\" value=\"".$this->iVersionId."\">\n";
echo "</form>"; echo "</form>\n";
$oMonitor = new Monitor(); $oMonitor = new Monitor();
$oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId); $oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId);
if(!$oMonitor->iMonitorId) if(!$oMonitor->iMonitorId)
{ {
echo '<form method="post" name="sMessage" action='. echo '<form method="post" name="sMessage" action='.
$this->objectMakeUrl().'&iAppId='.$oApp->iAppId.'>'; $this->objectMakeUrl().'&iAppId='.$oApp->iAppId.'>'."\n";
echo '<input type=hidden name="sSub" value="StartMonitoring" />'; echo "\t".'<input type=hidden name="sSub" value="StartMonitoring" />'."\n";
echo '<input type=submit value="Monitor Changes" class="button" />'; echo "\t".'<input type=submit value="Monitor Changes" class="button" />'."\n";
echo "</form>"; echo "</form>\n";
} }
} }
} }
} else } else
{ {
echo '<form method="post" name="sMessage" action="account.php">'; echo '<form method="post" name="sMessage" action="account.php">'."\n";
echo '<input type="hidden" name="sCmd" value="login">'; echo "\t".'<input type="hidden" name="sCmd" value="login">'."\n";
echo '<input type=submit value="Log in to become an app maintainer" class="button">'; echo "\t".'<input type=submit value="Log in to become an app maintainer" class="button">'."\n";
echo '</form>'; echo '</form>'."\n";
} }
echo "</td></tr>"; echo "</td></tr>";
if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($this->iVersionId) || $_SESSION['current']->isSuperMaintainer($this->iAppId)) if ($_SESSION['current']->hasPriv("admin") || $_SESSION['current']->isMaintainer($this->iVersionId) || $_SESSION['current']->isSuperMaintainer($this->iAppId))
{ {
echo '<tr><td colspan="2" align="center">'; echo '<tr><td colspan="2" align="center">'."\n";
echo '<form method="post" name="sMessage" action="admin/editAppVersion.php">'; echo '<form method="post" name="sMessage" action="admin/editAppVersion.php">'."\n";
echo '<input type="hidden" name="iAppId" value="'.$oApp->iAppId.'" />'; echo "\t".'<input type="hidden" name="iAppId" value="'.$oApp->iAppId.'" />'."\n";
echo '<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" />'; echo "\t".'<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" />'."\n";
echo '<input type=submit value="Edit Version" class="button" />'; echo "\t".'<input type=submit value="Edit Version" class="button" />'."\n";
echo '</form>'; echo '</form>'."\n";
$url = BASE."admin/deleteAny.php?sWhat=appVersion&amp;iAppId=".$oApp->iAppId."&amp;iVersionId=".$this->iVersionId."&amp;sConfirmed=yes"; $url = BASE."admin/deleteAny.php?sWhat=appVersion&amp;iAppId=".$oApp->iAppId."&amp;iVersionId=".$this->iVersionId."&amp;sConfirmed=yes";
echo "<form method=\"post\" name=\"sDelete\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\">"; echo "<form method=\"post\" name=\"sDelete\" action=\"javascript:deleteURL('Are you sure?', '".$url."')\">\n";
echo '<input type=submit value="Delete Version" class="button" />'; echo "\t".'<input type=submit value="Delete Version" class="button" />'."\n";
echo '</form>'; echo '</form>'."\n";
echo '<form method="post" name="message" action="admin/addAppNote.php">'; echo '<form method="post" name="message" action="admin/addAppNote.php">'."\n";
echo '<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" />'; echo "\t".'<input type="hidden" name="iVersionId" value="'.$this->iVersionId.'" />'."\n";
echo '<input type="submit" value="Add Note" class="button" />'; echo "\t".'<input type="submit" value="Add Note" class="button" />'."\n";
echo '</form>'; echo '</form>'."\n";
echo '<form method=post name=message action=admin/addAppNote.php?iVersionId='.$this->iVersionId.'>'; echo '<form method=post name=message action=admin/addAppNote.php?iVersionId='.$this->iVersionId.'>'."\n";
echo '<input type=hidden name="sNoteTitle" value="HOWTO" />'; echo "\t".'<input type=hidden name="sNoteTitle" value="HOWTO" />'."\n";
echo '<input type=submit value="Add How To" class="button" />'; echo "\t".'<input type=submit value="Add How To" class="button" />'."\n";
echo '</form>'; echo '</form>'."\n";
echo '<form method=post name=message action=admin/addAppNote.php?iVersionId='.$this->iVersionId.'>'; echo '<form method=post name=message action=admin/addAppNote.php?iVersionId='.$this->iVersionId.'>'."\n";
echo '<input type=hidden name="sNoteTitle" value="WARNING" />'; echo "\t".'<input type=hidden name="sNoteTitle" value="WARNING" />'."\n";
echo '<input type=submit value="Add Warning" class="button" />'; echo "\t".'<input type=submit value="Add Warning" class="button" />'."\n";
echo '</form>'; echo '</form>';
echo "</td></tr>"; echo "</td></tr>";
} }
@@ -848,24 +848,47 @@ class Version {
$oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId); $oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId);
if($oMonitor->iMonitorId) if($oMonitor->iMonitorId)
{ {
echo '<tr><td colspan="2" align="center">'; echo '<tr><td colspan="2" align="center">'."\n";
echo '</form>'; echo '</form>'."\n";
echo '<form method="post" name="sMessage" action='. echo '<form method="post" name="sMessage" action='.
$this->objectMakeUrl().'>'; $this->objectMakeUrl().'>'."\n";
echo '<input type=hidden name="sSub" value="StopMonitoring" />'; echo '<input type=hidden name="sSub" value="StopMonitoring" />."\n"';
echo '<input type=submit value="Stop Monitoring Version" class="button" />'; echo '<input type=submit value="Stop Monitoring Version" class="button" />'."\n";
echo '</form>'; echo "</form>\n";
echo "</td></tr>"; echo "</td></tr>\n";
} }
echo "</table><td class=color2 valign=top width='100%'>\n"; echo "</table>\n";
// description // start of the right hand pane in the version display
echo "<table width='100%' border=0><tr><td width='100%' valign=top> <b>Description</b><br />\n"; echo "<td class=color2 valign=top width='100%'>\n";
echo $this->sDescription; echo "<div class='version_info_pane'>\n";
/////////////////////////
// output the description
echo "<div class='info_container'>\n";
// output the description title
echo "\t<div class='title_class'>\n";
echo "\t\tDescription\n";
echo "\t</div>\n";
// output the description
echo "\t<div class='info_contents'>\n";
echo "\t\t".$this->sDescription."\n";
echo "\t</div>\n";
echo "</div>\n"; // end the 'info_container' div
// end description
/////////////////////////
//////////////////////
// Show test data // Show test data
echo "<div class='info_container'>\n";
echo "\t<div class='title_class'>\n";
echo "\t\tSelected test results <small><small>(selected in 'Test Results' table below)</small></small>\n";
echo "\t</div>\n";
$oTest = new testData($iTestingId); $oTest = new testData($iTestingId);
/* if $iTestingId wasn't valid then it won't be valid in $oTest */ /* if $iTestingId wasn't valid then it won't be valid in $oTest */
@@ -876,7 +899,17 @@ class Version {
$oTest = new testData($iTestingId); $oTest = new testData($iTestingId);
} }
echo "<div class='info_contents'>\n";
$oTest->ShowTestResult(); $oTest->ShowTestResult();
echo "</div>\n";
echo "</div>\n"; // end the 'info_container' div
// end show test data
/////////////////////
//////////////////////////////
// show the test results table
if($oTest->iTestingId) if($oTest->iTestingId)
{ {
$oTest->ShowVersionsTestingTable($_SERVER['PHP_SELF']."?iVersionId=".$this->iVersionId."&iTestingId=", $oTest->ShowVersionsTestingTable($_SERVER['PHP_SELF']."?iVersionId=".$this->iVersionId."&iTestingId=",
@@ -886,20 +919,23 @@ class Version {
{ {
echo '<form method=post name=sMessage action=objectManager.php?'. echo '<form method=post name=sMessage action=objectManager.php?'.
'sClass=testData_queue&sAction=add&iVersionId='.$this->iVersionId. 'sClass=testData_queue&sAction=add&iVersionId='.$this->iVersionId.
'&sTitle=Add+Test+Data>'; '&sTitle=Add+Test+Data>'."\n";
echo '<input type=submit value="Add Test Data" class="button" />'; echo "\t".'<input type=submit value="Add Test Data" class="button" />'."\n";
echo '</form>'; echo '</form>'."\n";
} else } else
{ {
echo '<form method="post" name="sMessage" action="account.php">'; echo '<form method="post" name="sMessage" action="account.php">'."\n";
echo '<input type="hidden" name="sCmd" value="login">'; echo "\t".'<input type="hidden" name="sCmd" value="login">'."\n";
echo '<input type=submit value="Log in add Test Data" class="button">'; echo "\t".'<input type=submit value="Log in add Test Data" class="button">'."\n";
echo '</form>'; echo '</form>'."\n";
} }
echo "</td></tr>";
/* close the table */ // end show test results table
echo "</table>\n"; /////////////////////////////
echo "</div>\n"; // end the version info pane, the right hand pane in the
// version display
echo html_frame_end(); echo html_frame_end();