1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-26 23:40:57 +01:00

Fix MenuItem names not getting attached

Summary:
- Attach objects when showing configuration screen
- Fix "Forms" to make more sense
- Alter EditEngine title to load correct name by loading object

Fixes T12116

Test Plan: Load up Apps/Projects/Forms on a configure menu, see proper names

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12116

Differential Revision: https://secure.phabricator.com/D17217
This commit is contained in:
Chad Little 2017-01-17 19:15:09 -08:00
parent 9d3f09ab47
commit 2d4eb460ab
3 changed files with 8 additions and 1 deletions

View file

@ -109,6 +109,7 @@ final class PhabricatorProfileMenuEditEngine
}
protected function getObjectEditTitleText($object) {
$object->willBuildNavigationItems(array($object));
return pht('Edit Menu Item: %s', $object->getDisplayName());
}

View file

@ -551,6 +551,12 @@ abstract class PhabricatorProfileMenuEngine extends Phobject {
$viewer = $this->getViewer();
$object = $this->getProfileObject();
$filtered_groups = mgroup($items, 'getMenuItemKey');
foreach ($filtered_groups as $group) {
$first_item = head($group);
$first_item->willBuildNavigationItems($group);
}
PhabricatorPolicyFilter::requireCapability(
$viewer,
$object,

View file

@ -12,7 +12,7 @@ final class PhabricatorEditEngineProfileMenuItem
}
public function getMenuItemTypeName() {
return pht('Forms');
return pht('Form');
}
public function canAddToObject($object) {