forked from phacility/phabricator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPhabricatorProjectWatcherListView.php
43 lines (34 loc) · 1.05 KB
/
PhabricatorProjectWatcherListView.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
final class PhabricatorProjectWatcherListView
extends PhabricatorProjectUserListView {
protected function canEditList() {
$viewer = $this->getViewer();
$project = $this->getProject();
return PhabricatorPolicyFilter::hasCapability(
$viewer,
$project,
PhabricatorPolicyCapability::CAN_EDIT);
}
protected function getNoDataString() {
return pht('This project does not have any watchers.');
}
protected function getRemoveURI($phid) {
$project = $this->getProject();
$id = $project->getID();
return "/project/watchers/{$id}/remove/?phid={$phid}";
}
protected function getHeaderText() {
return pht('Watchers');
}
protected function getMembershipNote() {
$viewer = $this->getViewer();
$viewer_phid = $viewer->getPHID();
$project = $this->getProject();
$note = null;
if ($project->isUserWatcher($viewer_phid)) {
$note = pht('You are watching this project and will receive mail about '.
'changes made to any related object.');
}
return $note;
}
}