Give Phriction a real dropdown
Summary: Fixes T8150. Small generalization: - Timeline has a dropdown with no special logic; make that generic. - Use it in Phriction. Test Plan: - Used Phriction dropdown on desktop and mobile. - Used timeline dropdown. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8150 Differential Revision: https://secure.phabricator.com/D12931
This commit is contained in:
@@ -192,10 +192,19 @@ final class PhrictionDocumentController
|
||||
$crumbs->addCrumb($view);
|
||||
}
|
||||
|
||||
$action_button = id(new PHUIButtonView())
|
||||
->setTag('a')
|
||||
->setText(pht('Actions'))
|
||||
->setHref('#')
|
||||
->setIconFont('fa-bars')
|
||||
->addClass('phui-mobile-menu')
|
||||
->setDropdownMenu($actions);
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setUser($user)
|
||||
->setPolicyObject($document)
|
||||
->setHeader($page_title);
|
||||
->setHeader($page_title)
|
||||
->addActionLink($action_button);
|
||||
|
||||
if ($content) {
|
||||
$header->setEpoch($content->getDateCreated());
|
||||
@@ -206,16 +215,12 @@ final class PhrictionDocumentController
|
||||
$prop_list = new PHUIPropertyGroupView();
|
||||
$prop_list->addPropertyList($properties);
|
||||
}
|
||||
$action_id = celerity_generate_unique_node_id();
|
||||
$actions->setID($action_id);
|
||||
|
||||
$page_content = id(new PHUIDocumentView())
|
||||
->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS)
|
||||
->setHeader($header)
|
||||
->setActionListID($action_id)
|
||||
->appendChild(
|
||||
array(
|
||||
$actions,
|
||||
$prop_list,
|
||||
$version_note,
|
||||
$move_notice,
|
||||
|
||||
Reference in New Issue
Block a user