Conpherence - get the durable column header actions working correctly
Summary: Ref T7014. This diff addresses - getting it to be the right set of options - add participant - view in conpherence - close window - making those options work - make it so if you are on /conpherence/ you can't toggle the durable column Test Plan: inspected dom via chrome tools and found last transaction. added a participant and inspected the single new transactin added for accuracy. used view in conpherence action to view in conpherence. used close window action to close window Reviewers: chad, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7014 Differential Revision: https://secure.phabricator.com/D11991
This commit is contained in:
@@ -209,14 +209,19 @@ final class ConpherenceUpdateController
|
||||
->setDatasource(new PhabricatorPeopleDatasource()));
|
||||
|
||||
require_celerity_resource('conpherence-update-css');
|
||||
return id(new AphrontDialogView())
|
||||
$view = id(new AphrontDialogView())
|
||||
->setTitle(pht('Add Participants'))
|
||||
->addHiddenInput('action', 'add_person')
|
||||
->addHiddenInput(
|
||||
'latest_transaction_id',
|
||||
$request->getInt('latest_transaction_id'))
|
||||
->appendChild($form);
|
||||
|
||||
if ($request->getExists('minimal_display')) {
|
||||
$view->addHiddenInput('minimal_display', true);
|
||||
}
|
||||
return $view;
|
||||
}
|
||||
|
||||
private function renderRemovePersonDialogue(
|
||||
ConpherenceThread $conpherence) {
|
||||
|
||||
@@ -146,21 +146,17 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
||||
$dropdown_id = celerity_generate_unique_node_id();
|
||||
|
||||
$settings_list = new PHUIListView();
|
||||
$cw_registry =
|
||||
ConpherenceWidgetConfigConstants::getWidgetRegistry();
|
||||
$first = true;
|
||||
foreach ($cw_registry as $widget => $config) {
|
||||
$header_actions = $this->getHeaderActionsConfig($conpherence);
|
||||
foreach ($header_actions as $action) {
|
||||
$settings_list->addMenuItem(
|
||||
id(new PHUIListItemView())
|
||||
->setHref('#')
|
||||
->setDisabled($first)
|
||||
->setName($config['name'])
|
||||
->setIcon($config['icon'])
|
||||
->addSigil('conpherence-durable-column-widget-selected')
|
||||
->setHref($action['href'])
|
||||
->setName($action['name'])
|
||||
->setIcon($action['icon'])
|
||||
->addSigil('conpherence-durable-column-header-action')
|
||||
->setMetadata(array(
|
||||
'widget' => $widget,
|
||||
'action' => $action['key'],
|
||||
)));
|
||||
$first = false;
|
||||
}
|
||||
|
||||
$settings_menu = phutil_tag(
|
||||
@@ -220,6 +216,28 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
||||
|
||||
}
|
||||
|
||||
private function getHeaderActionsConfig(ConpherenceThread $conpherence) {
|
||||
return array(
|
||||
array(
|
||||
'name' => pht('Add Participants'),
|
||||
'href' => '/conpherence/update/'.$conpherence->getID().'/',
|
||||
'icon' => 'fa-plus',
|
||||
'key' => ConpherenceUpdateActions::ADD_PERSON,
|
||||
),
|
||||
array(
|
||||
'name' => pht('View in Conpherence'),
|
||||
'href' => '/conpherence/'.$conpherence->getID().'/',
|
||||
'icon' => 'fa-comments',
|
||||
'key' => 'go_conpherence',
|
||||
),
|
||||
array(
|
||||
'name' => pht('Close Window'),
|
||||
'href' => '#',
|
||||
'icon' => 'fa-times',
|
||||
'key' => 'close_window',
|
||||
),);
|
||||
}
|
||||
|
||||
private function buildTransactions() {
|
||||
$conpherence = $this->getSelectedConpherence();
|
||||
if (!$conpherence) {
|
||||
|
||||
Reference in New Issue
Block a user