1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-21 03:08:40 +01:00

Add "Stop Tracking" link to entries in the Phrequent search view.

Summary: Depends on D7163.  This adds a "Stop Tracking" link to the right-hand side of ongoing entries in the Phrequent search view.  It allows users to stop tracking items without first navigating to the item itself.

Test Plan: Started tracking and item and then clicked the "Stop Tracking" link in Phrequent.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran

Maniphest Tasks: T3870

Differential Revision: https://secure.phabricator.com/D7164
This commit is contained in:
James Rhodes 2013-10-01 13:17:28 -07:00 committed by epriestley
parent e4a07e01b5
commit 89df6f7bfc

View file

@ -83,6 +83,19 @@ final class PhrequentListController extends PhrequentController
pht(
'Tracked %s so far',
$time_spent));
if ($usertime->getObjectPHID() !== null &&
$usertime->getUserPHID() === $viewer->getPHID()) {
$item->addAction(
id(new PHUIListItemView())
->setIcon('history')
->addSigil('phrequent-stop-tracking')
->setWorkflow(true)
->setRenderNameAsTooltip(true)
->setName(pht("Stop"))
->setHref(
'/phrequent/track/stop/'.
$usertime->getObjectPHID().'/'));
}
$item->setBarColor('green');
}