Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14356717
D15061.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
7 KB
Referenced Files
None
Subscribers
None
D15061.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -152,7 +152,7 @@
'rsrc/css/phui/phui-text.css' => 'cf019f54',
'rsrc/css/phui/phui-timeline-view.css' => '2efceff8',
'rsrc/css/phui/phui-two-column-view.css' => '39ecafb1',
- 'rsrc/css/phui/phui-workboard-view.css' => '95a54f74',
+ 'rsrc/css/phui/phui-workboard-view.css' => '8330bca5',
'rsrc/css/phui/phui-workpanel-view.css' => 'adec7699',
'rsrc/css/sprite-login.css' => '60e8560e',
'rsrc/css/sprite-menu.css' => '9dd65b92',
@@ -829,7 +829,7 @@
'phui-theme-css' => '981a58f8',
'phui-timeline-view-css' => '2efceff8',
'phui-two-column-view-css' => '39ecafb1',
- 'phui-workboard-view-css' => '95a54f74',
+ 'phui-workboard-view-css' => '8330bca5',
'phui-workpanel-view-css' => 'adec7699',
'phuix-action-list-view' => 'b5c256b8',
'phuix-action-view' => '8cf6d262',
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1147,6 +1147,7 @@
'HeraldEffect' => 'applications/herald/engine/HeraldEffect.php',
'HeraldEmptyFieldValue' => 'applications/herald/value/HeraldEmptyFieldValue.php',
'HeraldEngine' => 'applications/herald/engine/HeraldEngine.php',
+ 'HeraldExactProjectsField' => 'applications/project/herald/HeraldExactProjectsField.php',
'HeraldField' => 'applications/herald/field/HeraldField.php',
'HeraldFieldGroup' => 'applications/herald/field/HeraldFieldGroup.php',
'HeraldFieldTestCase' => 'applications/herald/field/__tests__/HeraldFieldTestCase.php',
@@ -2883,6 +2884,8 @@
'PhabricatorProjectEditPictureController' => 'applications/project/controller/PhabricatorProjectEditPictureController.php',
'PhabricatorProjectFulltextEngine' => 'applications/project/search/PhabricatorProjectFulltextEngine.php',
'PhabricatorProjectHeraldAction' => 'applications/project/herald/PhabricatorProjectHeraldAction.php',
+ 'PhabricatorProjectHeraldAdapter' => 'applications/project/herald/PhabricatorProjectHeraldAdapter.php',
+ 'PhabricatorProjectHeraldFieldGroup' => 'applications/project/herald/PhabricatorProjectHeraldFieldGroup.php',
'PhabricatorProjectHistoryController' => 'applications/project/controller/PhabricatorProjectHistoryController.php',
'PhabricatorProjectIconSet' => 'applications/project/icon/PhabricatorProjectIconSet.php',
'PhabricatorProjectInterface' => 'applications/project/interface/PhabricatorProjectInterface.php',
@@ -5247,6 +5250,7 @@
'HeraldEffect' => 'Phobject',
'HeraldEmptyFieldValue' => 'HeraldFieldValue',
'HeraldEngine' => 'Phobject',
+ 'HeraldExactProjectsField' => 'HeraldField',
'HeraldField' => 'Phobject',
'HeraldFieldGroup' => 'HeraldGroup',
'HeraldFieldTestCase' => 'PhutilTestCase',
@@ -7285,6 +7289,8 @@
'PhabricatorProjectEditPictureController' => 'PhabricatorProjectController',
'PhabricatorProjectFulltextEngine' => 'PhabricatorFulltextEngine',
'PhabricatorProjectHeraldAction' => 'HeraldAction',
+ 'PhabricatorProjectHeraldAdapter' => 'HeraldAdapter',
+ 'PhabricatorProjectHeraldFieldGroup' => 'HeraldFieldGroup',
'PhabricatorProjectHistoryController' => 'PhabricatorProjectController',
'PhabricatorProjectIconSet' => 'PhabricatorIconSet',
'PhabricatorProjectListController' => 'PhabricatorProjectController',
diff --git a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php
--- a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php
+++ b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php
@@ -917,4 +917,19 @@
->save();
}
+
+ protected function shouldApplyHeraldRules(
+ PhabricatorLiskDAO $object,
+ array $xactions) {
+ return true;
+ }
+
+ protected function buildHeraldAdapter(
+ PhabricatorLiskDAO $object,
+ array $xactions) {
+
+ return id(new PhabricatorProjectHeraldAdapter())
+ ->setProject($object);
+ }
+
}
diff --git a/src/applications/project/herald/HeraldExactProjectsField.php b/src/applications/project/herald/HeraldExactProjectsField.php
new file mode 100644
--- /dev/null
+++ b/src/applications/project/herald/HeraldExactProjectsField.php
@@ -0,0 +1,31 @@
+<?php
+
+final class HeraldExactProjectsField extends HeraldField {
+
+ const FIELDCONST = 'projects.exact';
+
+ public function getHeraldFieldName() {
+ return pht('Projects being edited');
+ }
+
+ public function getFieldGroupKey() {
+ return PhabricatorProjectHeraldFieldGroup::FIELDGROUPKEY;
+ }
+
+ public function supportsObject($object) {
+ return ($object instanceof PhabricatorProject);
+ }
+
+ public function getHeraldFieldValue($object) {
+ return array($object->getPHID());
+ }
+
+ protected function getHeraldFieldStandardType() {
+ return self::STANDARD_PHID_LIST;
+ }
+
+ protected function getDatasource() {
+ return new PhabricatorProjectDatasource();
+ }
+
+}
diff --git a/src/applications/project/herald/PhabricatorProjectHeraldAdapter.php b/src/applications/project/herald/PhabricatorProjectHeraldAdapter.php
new file mode 100644
--- /dev/null
+++ b/src/applications/project/herald/PhabricatorProjectHeraldAdapter.php
@@ -0,0 +1,66 @@
+<?php
+
+final class PhabricatorProjectHeraldAdapter extends HeraldAdapter {
+
+ private $project;
+
+ protected function newObject() {
+ return new PhabricatorProject();
+ }
+
+ public function getAdapterApplicationClass() {
+ return 'PhabricatorProjectApplication';
+ }
+
+ public function getAdapterContentDescription() {
+ return pht('React to projects being created or updated.');
+ }
+
+ protected function initializeNewAdapter() {
+ $this->project = $this->newObject();
+ }
+
+ public function supportsApplicationEmail() {
+ return true;
+ }
+
+ public function getRepetitionOptions() {
+ return array(
+ HeraldRepetitionPolicyConfig::EVERY,
+ HeraldRepetitionPolicyConfig::FIRST,
+ );
+ }
+
+ public function supportsRuleType($rule_type) {
+ switch ($rule_type) {
+ case HeraldRuleTypeConfig::RULE_TYPE_GLOBAL:
+ case HeraldRuleTypeConfig::RULE_TYPE_PERSONAL:
+ return true;
+ case HeraldRuleTypeConfig::RULE_TYPE_OBJECT:
+ default:
+ return false;
+ }
+ }
+
+ public function setProject(PhabricatorProject $project) {
+ $this->project = $project;
+ return $this;
+ }
+
+ public function getProject() {
+ return $this->project;
+ }
+
+ public function getObject() {
+ return $this->project;
+ }
+
+ public function getAdapterContentName() {
+ return pht('Projects');
+ }
+
+ public function getHeraldName() {
+ return pht('Project %s', $this->getProject()->getName());
+ }
+
+}
diff --git a/src/applications/project/herald/PhabricatorProjectHeraldFieldGroup.php b/src/applications/project/herald/PhabricatorProjectHeraldFieldGroup.php
new file mode 100644
--- /dev/null
+++ b/src/applications/project/herald/PhabricatorProjectHeraldFieldGroup.php
@@ -0,0 +1,15 @@
+<?php
+
+final class PhabricatorProjectHeraldFieldGroup extends HeraldFieldGroup {
+
+ const FIELDGROUPKEY = 'projects.project';
+
+ public function getGroupLabel() {
+ return pht('Project Fields');
+ }
+
+ protected function getGroupOrder() {
+ return 500;
+ }
+
+}
diff --git a/webroot/rsrc/css/phui/phui-workboard-view.css b/webroot/rsrc/css/phui/phui-workboard-view.css
--- a/webroot/rsrc/css/phui/phui-workboard-view.css
+++ b/webroot/rsrc/css/phui/phui-workboard-view.css
@@ -41,6 +41,11 @@
left: 253px;
}
+.device-desktop .phui-profile-menu-collapsed .project-board-wrapper
+ .phui-workboard-view-shadow {
+ left: 93px;
+}
+
.device-desktop .phui-workboard-view .aphront-multi-column-fixed
.aphront-multi-column-inner {
margin-left: 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 11:37 PM (17 h, 24 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6912246
Default Alt Text
D15061.diff (7 KB)
Attached To
Mode
D15061: Add Herald support for projects
Attached
Detach File
Event Timeline
Log In to Comment