Jeremy Newman : set rating color on column
Jeremy Newman
jnewman at winehq.org
Mon Nov 21 08:38:09 CST 2016
Module: appdb
Branch: master
Commit: 008816f6ef04b9e0866d2d5032f8f3b0b20732b2
URL: http://source.winehq.org/git/appdb.git/?a=commit;h=008816f6ef04b9e0866d2d5032f8f3b0b20732b2
Author: Jeremy Newman <jnewman at codeweavers.com>
Date: Fri Nov 18 12:03:09 2016 -0600
set rating color on column
---
include/testData.php | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/include/testData.php b/include/testData.php
index aed90c0..352428f 100644
--- a/include/testData.php
+++ b/include/testData.php
@@ -544,6 +544,7 @@ class testData{
$oTableRowHeader->AddTextCell("Runs?");
$oTableRowHeader->AddTextCell("Rating");
$oTableRowHeader->AddTextCell("Submitter");
+ $oTableRowHeader->AddTextCell("");
$oTable->SetHeader($oTableRowHeader);
return $oTable;
}
@@ -567,18 +568,15 @@ class testData{
if ($this->iTestingId == $iCurrentId)
{
$sTRClass = $bgcolor;
-
$oTableCell = new TableCell("<b>Current</b>");
$oTableCell->SetAlign("center");
- } else /* make all non-current rows clickable so clicking on them selects the test as current */
+ }
+ else
{
- $sTRClass = $bgcolor;
-
+ /* make all non-current rows clickable so clicking on them selects the test as current */
$sUrl = $sLink.$this->iTestingId;
-
if($bShowAll)
$sUrl .= '&bShowAll=true';
-
$oTableRowClick = new TableRowClick($sUrl);
// add the table element indicating that the user can show the row by clicking on it
@@ -588,29 +586,29 @@ class testData{
}
$oTableRow->AddCell($oTableCell);
- $oTableRow->SetClass($sTRClass);
-
$oTableRow->AddTextCell($oDistribution->objectMakeLink());
$oTableRow->AddTextCell(date("M d Y", mysqldatetime_to_unixtimestamp($this->sTestedDate)));
$oTableRow->AddTextCell($this->sTestedRelease.' ');
$oTableRow->AddTextCell($this->sInstalls.' ');
$oTableRow->AddTextCell($this->sRuns.' ');
- $oTableRow->AddTextCell($this->sTestedRating.' ');
+ $oTableCell = new TableCell($this->sTestedRating);
+ $oTableCell->SetClass($bgcolor);
+ $oTableRow->AddCell($oTableCell);
$oTableRow->AddTextCell($oSubmitter->objectMakeLink().' ');
if ($this->iTestingId && $_SESSION['current']->hasAppVersionModifyPermission($oVersion))
{
$oObject = new objectManager('testData');
if($oApp->canEdit())
- $shChangeParentLink = '<a href="'.$oObject->makeUrl('showChangeParent', $this->iTestingId, 'Move test report to another version').'&sReturnTo='.urlencode($_SERVER['REQUEST_URI']).'">Move</a>'."\n";
+ $shChangeParentLink = '<a href="'.$oObject->makeUrl('showChangeParent', $this->iTestingId, 'Move test report to another version').'&sReturnTo='.urlencode($_SERVER['REQUEST_URI']).'" class="btn btn-default button-xs">Move</a>'."\n";
else
$shChangeParentLink = '';
$oTableRow->AddTextCell('<a href="'.$oObject->makeUrl('edit', $this->iTestingId,
- 'Edit Test Results').'&sReturnTo='.urlencode($_SERVER['REQUEST_URI']).'">'.
- 'Edit</a> '."\n".
+ 'Edit Test Results').'&sReturnTo='.urlencode($_SERVER['REQUEST_URI']).'" class="btn btn-default button-xs">'.
+ 'Edit</a> '."\n".
$shChangeParentLink.
'<a href="'.$oObject->makeUrl('delete', $this->iTestingId, 'Delete+Test+Results').
- '&sReturnTo='.urlencode($_SERVER['REQUEST_URI']).'">Delete</a></td>'."\n");
+ '&sReturnTo='.urlencode($_SERVER['REQUEST_URI']).'" class="btn btn-default button-xs">Delete</a></td>'."\n");
}
// if this is a clickable row, set the appropriate property
More information about the wine-cvs
mailing list