Let objectManager label the edit link in objectOutputTableRow() because the edit link text
depends on the queue state
This commit is contained in:
committed by
WineHQ
parent
fc47fdabcd
commit
9ef6268fa6
@@ -330,7 +330,8 @@ class appData
|
||||
}
|
||||
}
|
||||
|
||||
function objectOutputTableRow($oObject, $sClass)
|
||||
/* arg1 = OM object, arg2 = CSS style, arg3 = text for edit link */
|
||||
function objectOutputTableRow($oObject, $sClass, $sEditLinkLabel)
|
||||
{
|
||||
$oVersion = new Version($this->iVersionId);
|
||||
|
||||
@@ -347,7 +348,7 @@ class appData
|
||||
|
||||
if(appData::canEdit($oObject->sClass))
|
||||
$aCells[] = "[ <a href=\"".$oObject->makeUrl("edit",
|
||||
$this->iId)."\">Process</a> ]";
|
||||
$this->iId)."\">$sEditLinkLabel</a> ]";
|
||||
|
||||
echo html_tr($aCells, $sClass);
|
||||
}
|
||||
|
||||
@@ -438,7 +438,8 @@ class distribution {
|
||||
return new distribution($oRow->distributionId, $oRow);
|
||||
}
|
||||
|
||||
function objectOutputTableRow($oManager, $sClass)
|
||||
/* arg1 = OM object, arg2 = CSS style, arg3 = text for edit link */
|
||||
function objectOutputTableRow($oManager, $sClass, $sEditLinkLabel)
|
||||
{
|
||||
$aCells = array(
|
||||
"<a href=\"".$oManager->makeUrl("view", $this->iDistributionId,
|
||||
@@ -449,13 +450,12 @@ class distribution {
|
||||
if($this->canEdit())
|
||||
{
|
||||
if(!sizeof($this->aTestingIds))
|
||||
{
|
||||
$sDelete = " [<a href='".$oManager->makeUrl("delete",
|
||||
$shDeleteLink = " [<a href='".$oManager->makeUrl("delete",
|
||||
$this->iDistributionId)."'>delete</a>]";
|
||||
}
|
||||
$aCells[3] = array(
|
||||
"[<a href='".$oManager->makeUrl("edit", $this->iDistributionId,
|
||||
"Edit Distribution")."'>edit</a>]$sDelete",
|
||||
|
||||
$aCells[] = array(
|
||||
"[<a href='".$oManager->makeUrl("edit",
|
||||
$this->iDistributionId)."'>$sEditLinkLabel</a>]$shDeleteLink",
|
||||
"align=\"center\"");
|
||||
}
|
||||
|
||||
|
||||
@@ -421,7 +421,8 @@ class maintainer
|
||||
echo html_tr($aCells, $sClass);
|
||||
}
|
||||
|
||||
function ObjectOutputTableRow($oObject, $sClass)
|
||||
/* arg1 = OM object, arg2 = CSS style, arg3 = text for edit link */
|
||||
function ObjectOutputTableRow($oObject, $sClass, $sEditLinkLabel)
|
||||
{
|
||||
$oUser = new User($this->iUserId);
|
||||
$oApp = new Application($this->iAppId);
|
||||
@@ -435,8 +436,8 @@ class maintainer
|
||||
"<a href=\"mailto:".$oUser->sEmail."\">".$oUser->sRealname."</a>");
|
||||
|
||||
if(maintainer::canEdit())
|
||||
$aCells[sizeof($aCells)] = "<a href=\"".$oObject->makeUrl("edit",
|
||||
$this->iMaintainerId)."\">answer</a>";
|
||||
$aCells[sizeof($aCells)] = "[ <a href=\"".$oObject->makeUrl("edit",
|
||||
$this->iMaintainerId)."\">$sEditLinkLabel</a> ]";
|
||||
|
||||
echo html_tr($aCells,
|
||||
$sClass);
|
||||
|
||||
@@ -95,8 +95,9 @@ class ObjectManager
|
||||
$oObject = call_user_func(array($this->sClass,
|
||||
"objectGetInstanceFromRow"), $oRow);
|
||||
|
||||
$oObject->objectOutputTableRow($this,
|
||||
($iCount % 2) ? "color0" : "color1");
|
||||
/* arg1 = OM object, arg2 = CSS style, arg3 = text for edit link */
|
||||
$oObject->objectOutputTableRow($this, ($iCount % 2) ? "color0" : "color1",
|
||||
$this->bIsQueue ? "process" : "edit");
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
@@ -313,7 +314,7 @@ class ObjectManager
|
||||
|
||||
$sTitle = urlencode($sTitle);
|
||||
|
||||
return $_SERVER['PHP_SELF']."?bIsQueue=$sIsQueue&sClass=$this->sClass".
|
||||
return BASE."objectManager.php?bIsQueue=$sIsQueue&sClass=$this->sClass".
|
||||
"&sTitle=$sTitle$sId$sAction";
|
||||
}
|
||||
|
||||
|
||||
@@ -537,10 +537,11 @@ class Screenshot {
|
||||
return new appData($oRow->id, $oRow);
|
||||
}
|
||||
|
||||
function objectOutputTableRow($oObject, $sClass)
|
||||
/* arg1 = OM object, arg2 = CSS style, arg3 = text for edit link */
|
||||
function objectOutputTableRow($oObject, $sClass, $sEditLinkLabel)
|
||||
{
|
||||
$oAppData = new AppData();
|
||||
$oAppData->objectOutputTableRow($oObject, $sClass);
|
||||
$oAppData->objectOutputTableRow($oObject, $sClass, $sEditLinkLabel);
|
||||
}
|
||||
|
||||
function objectDisplayQueueProcessingHelp()
|
||||
|
||||
@@ -185,7 +185,8 @@ class Vendor {
|
||||
return new vendor($oRow->vendorId, $oRow);
|
||||
}
|
||||
|
||||
function objectOutputTableRow($oObject, $sClass = "")
|
||||
/* arg1 = OM object, arg2 = CSS style, arg3 = text for edit link */
|
||||
function objectOutputTableRow($oObject, $sClass = "", $sEditLinkLabel)
|
||||
{
|
||||
$aCells = array(
|
||||
"<a href=\"".$oObject->makeUrl("view", $this->iVendorId,
|
||||
@@ -196,12 +197,12 @@ class Vendor {
|
||||
if($this->canEdit())
|
||||
{
|
||||
if(!sizeof($this->aApplicationsIds))
|
||||
$sDelete = " [<a href=\"".$oObject->makeUrl("delete",
|
||||
$shDeleteLink = " [<a href=\"".$oObject->makeUrl("delete",
|
||||
$this->iVendorId, "View Vendors")."\">".
|
||||
"delete</a>]";
|
||||
|
||||
$aCells[sizeof($aCells)] = "[<a href=\"".$oObject->makeUrl("edit",
|
||||
$this->iVendorId, "Edit Vendor")."\">edit</a>]$sDelete";
|
||||
$this->iVendorId, "Edit Vendor")."\">$sEditLinkLabel</a>]$shDeleteLink";
|
||||
}
|
||||
|
||||
echo html_tr($aCells, $sClass);
|
||||
|
||||
Reference in New Issue
Block a user