mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Remove some unusual UI policy hints in Phriction
Summary: Ref T13077. We currently have these weird policy hints in Phriction that we don't use in other applications. Just remove them for consistency to make the eventual swap to EditEngine a little easier. Also nuke some unreacahble code. Test Plan: Loaded edit page, saw more standard UI. Reviewers: amckinley Maniphest Tasks: T13077 Differential Revision: https://secure.phabricator.com/D19618
This commit is contained in:
parent
4afb6446d9
commit
04f8270a74
2 changed files with 8 additions and 26 deletions
|
@ -226,13 +226,7 @@ final class PhrictionEditController
|
|||
->execute();
|
||||
$view_capability = PhabricatorPolicyCapability::CAN_VIEW;
|
||||
$edit_capability = PhabricatorPolicyCapability::CAN_EDIT;
|
||||
$codex = id(PhabricatorPolicyCodex::newFromObject($document, $viewer))
|
||||
->setCapability($view_capability);
|
||||
|
||||
$view_capability_description = $codex->getPolicySpecialRuleForCapability(
|
||||
PhabricatorPolicyCapability::CAN_VIEW)->getDescription();
|
||||
$edit_capability_description = $codex->getPolicySpecialRuleForCapability(
|
||||
PhabricatorPolicyCapability::CAN_EDIT)->getDescription();
|
||||
|
||||
$form = id(new AphrontFormView())
|
||||
->setUser($viewer)
|
||||
|
@ -279,15 +273,13 @@ final class PhrictionEditController
|
|||
->setSpacePHID($v_space)
|
||||
->setPolicyObject($document)
|
||||
->setCapability($view_capability)
|
||||
->setPolicies($policies)
|
||||
->setCaption($view_capability_description))
|
||||
->setPolicies($policies))
|
||||
->appendChild(
|
||||
id(new AphrontFormPolicyControl())
|
||||
->setName('editPolicy')
|
||||
->setPolicyObject($document)
|
||||
->setCapability($edit_capability)
|
||||
->setPolicies($policies)
|
||||
->setCaption($edit_capability_description))
|
||||
->setPolicies($policies))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
->setLabel(pht('Edit Notes'))
|
||||
|
@ -323,7 +315,8 @@ final class PhrictionEditController
|
|||
$crumbs->setBorder(true);
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setFooter(array(
|
||||
->setFooter(
|
||||
array(
|
||||
$draft_note,
|
||||
$form_box,
|
||||
$preview,
|
||||
|
@ -333,7 +326,6 @@ final class PhrictionEditController
|
|||
->setTitle($page_title)
|
||||
->setCrumbs($crumbs)
|
||||
->appendChild($view);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -279,7 +279,6 @@ final class AphrontFormPolicyControl extends AphrontFormControl {
|
|||
->setIcon($icon);
|
||||
}
|
||||
|
||||
|
||||
if ($this->templatePHIDType) {
|
||||
$context_path = 'template/'.$this->templatePHIDType.'/';
|
||||
} else {
|
||||
|
@ -346,15 +345,6 @@ final class AphrontFormPolicyControl extends AphrontFormControl {
|
|||
)),
|
||||
$input,
|
||||
));
|
||||
|
||||
return AphrontFormSelectControl::renderSelectTag(
|
||||
$this->getValue(),
|
||||
$this->getOptions(),
|
||||
array(
|
||||
'name' => $this->getName(),
|
||||
'disabled' => $this->getDisabled() ? 'disabled' : null,
|
||||
'id' => $this->getID(),
|
||||
));
|
||||
}
|
||||
|
||||
public static function getSelectCustomKey() {
|
||||
|
|
Loading…
Reference in a new issue