mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 12:52:42 +01:00
Always show a menu on durable column
Summary: If you don't have any rooms, we currently show no menu and users have no logical means of closing the column. This lets "Hide Column" at least still appear. Fixes T9195 Test Plan: Fresh install, hit {key \}, see menu. Close Column. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T9195 Differential Revision: https://secure.phabricator.com/D16516
This commit is contained in:
parent
138efb2b10
commit
5a33a6743e
3 changed files with 90 additions and 87 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => 'f03b9892',
|
||||
'core.pkg.css' => '85a1b79a',
|
||||
'core.pkg.js' => '1d376fa9',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '3fb7f532',
|
||||
|
@ -32,7 +32,7 @@ return array(
|
|||
'rsrc/css/aphront/typeahead.css' => 'd4f16145',
|
||||
'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af',
|
||||
'rsrc/css/application/auth/auth.css' => '0877ed6e',
|
||||
'rsrc/css/application/base/main-menu-view.css' => 'e862571a',
|
||||
'rsrc/css/application/base/main-menu-view.css' => 'f03e17be',
|
||||
'rsrc/css/application/base/notification-menu.css' => 'b3ab500d',
|
||||
'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601',
|
||||
'rsrc/css/application/base/phui-theme.css' => '027ba77e',
|
||||
|
@ -784,7 +784,7 @@ return array(
|
|||
'phabricator-flag-css' => '5337623f',
|
||||
'phabricator-keyboard-shortcut' => '1ae869f2',
|
||||
'phabricator-keyboard-shortcut-manager' => '4a021c10',
|
||||
'phabricator-main-menu-view' => 'e862571a',
|
||||
'phabricator-main-menu-view' => 'f03e17be',
|
||||
'phabricator-nav-view-css' => 'b29426e9',
|
||||
'phabricator-notification' => 'ccf1cbf8',
|
||||
'phabricator-notification-css' => '3f6c89c9',
|
||||
|
@ -2094,9 +2094,6 @@ return array(
|
|||
'e6e25838' => array(
|
||||
'javelin-install',
|
||||
),
|
||||
'e862571a' => array(
|
||||
'phui-theme-css',
|
||||
),
|
||||
'e9581f08' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
@ -2132,6 +2129,9 @@ return array(
|
|||
'javelin-workflow',
|
||||
'javelin-json',
|
||||
),
|
||||
'f03e17be' => array(
|
||||
'phui-theme-css',
|
||||
),
|
||||
'f411b6ae' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-stratcom',
|
||||
|
|
|
@ -141,12 +141,16 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
|||
'class' => implode(' ', $classes),
|
||||
),
|
||||
$this->buildHeader());
|
||||
|
||||
$icon_bar = null;
|
||||
if ($this->conpherences) {
|
||||
$icon_bar = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'conpherence-durable-column-icon-bar',
|
||||
),
|
||||
$this->buildIconBar());
|
||||
}
|
||||
|
||||
$transactions = $this->buildTransactions();
|
||||
|
||||
|
@ -283,14 +287,6 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
|||
private function buildHeader() {
|
||||
$conpherence = $this->getSelectedConpherence();
|
||||
|
||||
if (!$conpherence) {
|
||||
|
||||
$header = null;
|
||||
$settings_button = null;
|
||||
$settings_menu = null;
|
||||
|
||||
} else {
|
||||
|
||||
$bubble_id = celerity_generate_unique_node_id();
|
||||
$dropdown_id = celerity_generate_unique_node_id();
|
||||
|
||||
|
@ -343,6 +339,8 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
|||
->addClass('phabricator-dark-menu')
|
||||
->addClass('phabricator-application-menu');
|
||||
|
||||
$header = null;
|
||||
if ($conpherence) {
|
||||
$data = $conpherence->getDisplayData($this->getUser());
|
||||
$header = phutil_tag(
|
||||
'span',
|
||||
|
@ -372,42 +370,46 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
|||
));
|
||||
}
|
||||
|
||||
private function getHeaderActionsConfig(ConpherenceThread $conpherence) {
|
||||
private function getHeaderActionsConfig($conpherence) {
|
||||
|
||||
$actions = array();
|
||||
if ($conpherence) {
|
||||
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||
$this->getUser(),
|
||||
$conpherence,
|
||||
PhabricatorPolicyCapability::CAN_EDIT);
|
||||
|
||||
return array(
|
||||
array(
|
||||
$actions[] = array(
|
||||
'name' => pht('Add Participants'),
|
||||
'disabled' => !$can_edit,
|
||||
'href' => '/conpherence/update/'.$conpherence->getID().'/',
|
||||
'icon' => 'fa-plus',
|
||||
'key' => ConpherenceUpdateActions::ADD_PERSON,
|
||||
),
|
||||
array(
|
||||
);
|
||||
$actions[] = array(
|
||||
'name' => pht('Edit Room'),
|
||||
'disabled' => !$can_edit,
|
||||
'href' => '/conpherence/update/'.$conpherence->getID().'/?nopic',
|
||||
'icon' => 'fa-pencil',
|
||||
'key' => ConpherenceUpdateActions::METADATA,
|
||||
),
|
||||
array(
|
||||
);
|
||||
$actions[] = array(
|
||||
'name' => pht('View in Conpherence'),
|
||||
'disabled' => false,
|
||||
'href' => '/'.$conpherence->getMonogram(),
|
||||
'icon' => 'fa-comments',
|
||||
'key' => 'go_conpherence',
|
||||
),
|
||||
array(
|
||||
);
|
||||
}
|
||||
|
||||
$actions[] = array(
|
||||
'name' => pht('Hide Column'),
|
||||
'disabled' => false,
|
||||
'href' => '#',
|
||||
'icon' => 'fa-times',
|
||||
'key' => 'hide_column',
|
||||
),
|
||||
);
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
||||
private function buildTransactions() {
|
||||
|
|
|
@ -598,6 +598,7 @@ button.phabricator-main-menu-search-dropdown .caret:before {
|
|||
.phabricator-main-menu-dropdown.phui-list-sidenav .phui-list-item-has-icon
|
||||
.phui-list-item-href {
|
||||
padding: 4px 40px 4px 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.phabricator-main-menu-dropdown.phui-list-sidenav .phui-list-item-type-label
|
||||
|
|
Loading…
Reference in a new issue