@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhabricatorProjectWatcherListView
4 extends PhabricatorProjectUserListView {
5
6 protected function canEditList() {
7 $viewer = $this->getViewer();
8 $project = $this->getProject();
9
10 return PhabricatorPolicyFilter::hasCapability(
11 $viewer,
12 $project,
13 PhabricatorPolicyCapability::CAN_EDIT);
14 }
15
16 protected function getNoDataString() {
17 return pht('This project does not have any watchers.');
18 }
19
20 protected function getRemoveURI($phid) {
21 $project = $this->getProject();
22 $id = $project->getID();
23 return "/project/watchers/{$id}/remove/?phid={$phid}";
24 }
25
26 protected function getHeaderText() {
27 return pht('Watchers');
28 }
29
30 protected function getMembershipNote() {
31 $viewer = $this->getViewer();
32 $viewer_phid = $viewer->getPHID();
33 $project = $this->getProject();
34
35 $note = null;
36 if ($project->isUserWatcher($viewer_phid)) {
37 $note = pht('You are watching this project and will receive mail about '.
38 'changes made to any related object.');
39 }
40 return $note;
41 }
42
43}