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(
|
return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'core.pkg.css' => 'f03b9892',
|
'core.pkg.css' => '85a1b79a',
|
||||||
'core.pkg.js' => '1d376fa9',
|
'core.pkg.js' => '1d376fa9',
|
||||||
'darkconsole.pkg.js' => 'e7393ebb',
|
'darkconsole.pkg.js' => 'e7393ebb',
|
||||||
'differential.pkg.css' => '3fb7f532',
|
'differential.pkg.css' => '3fb7f532',
|
||||||
|
@ -32,7 +32,7 @@ return array(
|
||||||
'rsrc/css/aphront/typeahead.css' => 'd4f16145',
|
'rsrc/css/aphront/typeahead.css' => 'd4f16145',
|
||||||
'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af',
|
'rsrc/css/application/almanac/almanac.css' => 'dbb9b3af',
|
||||||
'rsrc/css/application/auth/auth.css' => '0877ed6e',
|
'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/notification-menu.css' => 'b3ab500d',
|
||||||
'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601',
|
'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601',
|
||||||
'rsrc/css/application/base/phui-theme.css' => '027ba77e',
|
'rsrc/css/application/base/phui-theme.css' => '027ba77e',
|
||||||
|
@ -784,7 +784,7 @@ return array(
|
||||||
'phabricator-flag-css' => '5337623f',
|
'phabricator-flag-css' => '5337623f',
|
||||||
'phabricator-keyboard-shortcut' => '1ae869f2',
|
'phabricator-keyboard-shortcut' => '1ae869f2',
|
||||||
'phabricator-keyboard-shortcut-manager' => '4a021c10',
|
'phabricator-keyboard-shortcut-manager' => '4a021c10',
|
||||||
'phabricator-main-menu-view' => 'e862571a',
|
'phabricator-main-menu-view' => 'f03e17be',
|
||||||
'phabricator-nav-view-css' => 'b29426e9',
|
'phabricator-nav-view-css' => 'b29426e9',
|
||||||
'phabricator-notification' => 'ccf1cbf8',
|
'phabricator-notification' => 'ccf1cbf8',
|
||||||
'phabricator-notification-css' => '3f6c89c9',
|
'phabricator-notification-css' => '3f6c89c9',
|
||||||
|
@ -2094,9 +2094,6 @@ return array(
|
||||||
'e6e25838' => array(
|
'e6e25838' => array(
|
||||||
'javelin-install',
|
'javelin-install',
|
||||||
),
|
),
|
||||||
'e862571a' => array(
|
|
||||||
'phui-theme-css',
|
|
||||||
),
|
|
||||||
'e9581f08' => array(
|
'e9581f08' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
|
@ -2132,6 +2129,9 @@ return array(
|
||||||
'javelin-workflow',
|
'javelin-workflow',
|
||||||
'javelin-json',
|
'javelin-json',
|
||||||
),
|
),
|
||||||
|
'f03e17be' => array(
|
||||||
|
'phui-theme-css',
|
||||||
|
),
|
||||||
'f411b6ae' => array(
|
'f411b6ae' => array(
|
||||||
'javelin-behavior',
|
'javelin-behavior',
|
||||||
'javelin-stratcom',
|
'javelin-stratcom',
|
||||||
|
|
|
@ -141,12 +141,16 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
||||||
'class' => implode(' ', $classes),
|
'class' => implode(' ', $classes),
|
||||||
),
|
),
|
||||||
$this->buildHeader());
|
$this->buildHeader());
|
||||||
|
|
||||||
|
$icon_bar = null;
|
||||||
|
if ($this->conpherences) {
|
||||||
$icon_bar = phutil_tag(
|
$icon_bar = phutil_tag(
|
||||||
'div',
|
'div',
|
||||||
array(
|
array(
|
||||||
'class' => 'conpherence-durable-column-icon-bar',
|
'class' => 'conpherence-durable-column-icon-bar',
|
||||||
),
|
),
|
||||||
$this->buildIconBar());
|
$this->buildIconBar());
|
||||||
|
}
|
||||||
|
|
||||||
$transactions = $this->buildTransactions();
|
$transactions = $this->buildTransactions();
|
||||||
|
|
||||||
|
@ -283,14 +287,6 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
||||||
private function buildHeader() {
|
private function buildHeader() {
|
||||||
$conpherence = $this->getSelectedConpherence();
|
$conpherence = $this->getSelectedConpherence();
|
||||||
|
|
||||||
if (!$conpherence) {
|
|
||||||
|
|
||||||
$header = null;
|
|
||||||
$settings_button = null;
|
|
||||||
$settings_menu = null;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$bubble_id = celerity_generate_unique_node_id();
|
$bubble_id = celerity_generate_unique_node_id();
|
||||||
$dropdown_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-dark-menu')
|
||||||
->addClass('phabricator-application-menu');
|
->addClass('phabricator-application-menu');
|
||||||
|
|
||||||
|
$header = null;
|
||||||
|
if ($conpherence) {
|
||||||
$data = $conpherence->getDisplayData($this->getUser());
|
$data = $conpherence->getDisplayData($this->getUser());
|
||||||
$header = phutil_tag(
|
$header = phutil_tag(
|
||||||
'span',
|
'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(
|
$can_edit = PhabricatorPolicyFilter::hasCapability(
|
||||||
$this->getUser(),
|
$this->getUser(),
|
||||||
$conpherence,
|
$conpherence,
|
||||||
PhabricatorPolicyCapability::CAN_EDIT);
|
PhabricatorPolicyCapability::CAN_EDIT);
|
||||||
|
$actions[] = array(
|
||||||
return array(
|
|
||||||
array(
|
|
||||||
'name' => pht('Add Participants'),
|
'name' => pht('Add Participants'),
|
||||||
'disabled' => !$can_edit,
|
'disabled' => !$can_edit,
|
||||||
'href' => '/conpherence/update/'.$conpherence->getID().'/',
|
'href' => '/conpherence/update/'.$conpherence->getID().'/',
|
||||||
'icon' => 'fa-plus',
|
'icon' => 'fa-plus',
|
||||||
'key' => ConpherenceUpdateActions::ADD_PERSON,
|
'key' => ConpherenceUpdateActions::ADD_PERSON,
|
||||||
),
|
);
|
||||||
array(
|
$actions[] = array(
|
||||||
'name' => pht('Edit Room'),
|
'name' => pht('Edit Room'),
|
||||||
'disabled' => !$can_edit,
|
'disabled' => !$can_edit,
|
||||||
'href' => '/conpherence/update/'.$conpherence->getID().'/?nopic',
|
'href' => '/conpherence/update/'.$conpherence->getID().'/?nopic',
|
||||||
'icon' => 'fa-pencil',
|
'icon' => 'fa-pencil',
|
||||||
'key' => ConpherenceUpdateActions::METADATA,
|
'key' => ConpherenceUpdateActions::METADATA,
|
||||||
),
|
);
|
||||||
array(
|
$actions[] = array(
|
||||||
'name' => pht('View in Conpherence'),
|
'name' => pht('View in Conpherence'),
|
||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
'href' => '/'.$conpherence->getMonogram(),
|
'href' => '/'.$conpherence->getMonogram(),
|
||||||
'icon' => 'fa-comments',
|
'icon' => 'fa-comments',
|
||||||
'key' => 'go_conpherence',
|
'key' => 'go_conpherence',
|
||||||
),
|
);
|
||||||
array(
|
}
|
||||||
|
|
||||||
|
$actions[] = array(
|
||||||
'name' => pht('Hide Column'),
|
'name' => pht('Hide Column'),
|
||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
'href' => '#',
|
'href' => '#',
|
||||||
'icon' => 'fa-times',
|
'icon' => 'fa-times',
|
||||||
'key' => 'hide_column',
|
'key' => 'hide_column',
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return $actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildTransactions() {
|
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
|
.phabricator-main-menu-dropdown.phui-list-sidenav .phui-list-item-has-icon
|
||||||
.phui-list-item-href {
|
.phui-list-item-href {
|
||||||
padding: 4px 40px 4px 12px;
|
padding: 4px 40px 4px 12px;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.phabricator-main-menu-dropdown.phui-list-sidenav .phui-list-item-type-label
|
.phabricator-main-menu-dropdown.phui-list-sidenav .phui-list-item-type-label
|
||||||
|
|
Loading…
Reference in a new issue