Differential D25067 Diff 319 src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/paneltype/PhabricatorDashboardTabsPanelType.php
Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | foreach ($config as $idx => $tab_spec) { | |||||||||
if ($subpanel) { | if ($subpanel) { | |||||||||
$name = $subpanel->getName(); | $name = $subpanel->getName(); | |||||||||
} | } | |||||||||
} | } | |||||||||
if (!strlen($name)) { | if (!strlen($name)) { | |||||||||
$name = pht('Unnamed Tab'); | $name = pht('Unnamed Tab'); | |||||||||
} | } | |||||||||
valerio.bozzolanUnsubmitted Not Done Inline Actions
valerio.bozzolan: | ||||||||||
$tab_view = id(new PHUIListItemView()) | $tab_view = id(new PHUIListItemView()) | |||||||||
->setHref('#') | ->setHref('#') | |||||||||
->setSelected((string)$idx === (string)$selected) | ->setSelected((string)$idx === (string)$selected) | |||||||||
valerio.bozzolanUnsubmitted Not Done Inline Actions
valerio.bozzolan: | ||||||||||
->addSigil('dashboard-tab-panel-tab') | ->addSigil('dashboard-tab-panel-tab') | |||||||||
->setMetadata(array('panelKey' => $idx)) | ->setMetadata(array('panelKey' => $idx)) | |||||||||
->setName($name); | ->setName($name); | |||||||||
if ($is_edit) { | if ($is_edit) { | |||||||||
$dropdown_menu = id(new PhabricatorActionListView()) | $dropdown_menu = id(new PhabricatorActionListView()) | |||||||||
->setViewer($viewer); | ->setViewer($viewer); | |||||||||
▲ Show 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | foreach ($config as $idx => $tab_spec) { | |||||||||
} | } | |||||||||
$content_id = celerity_generate_unique_node_id(); | $content_id = celerity_generate_unique_node_id(); | |||||||||
$content[] = phutil_tag( | $content[] = phutil_tag( | |||||||||
'div', | 'div', | |||||||||
array( | array( | |||||||||
'id' => $content_id, | 'id' => $content_id, | |||||||||
'style' => ($idx == $selected) ? null : 'display: none', | 'style' => ($idx === $selected) ? null : 'display: none', | |||||||||
valerio.bozzolanUnsubmitted Not Done Inline ActionsThanks. Seems good to me. I have not a strong opinion about this, but above I see: $tab_view->setSelected( (string)$idx === (string)$selected ) Then I wonder whenever we should do the same string-cast also here. valerio.bozzolan: Thanks. Seems good to me. I have not a strong opinion about this, but above I see:
```lang=php… | ||||||||||
DylsssAuthorUnsubmitted Done Inline ActionsIt doesn't really matter, the logic is correct either-way. Dylsss: It doesn't really matter, the logic is correct either-way. | ||||||||||
valerio.bozzolanUnsubmitted Not Done Inline Actions
valerio.bozzolan: | ||||||||||
), | ), | |||||||||
$panel_content); | $panel_content); | |||||||||
$panel_list[] = array( | $panel_list[] = array( | |||||||||
'panelKey' => (string)$idx, | 'panelKey' => (string)$idx, | |||||||||
'panelContentID' => $content_id, | 'panelContentID' => $content_id, | |||||||||
); | ); | |||||||||
} | } | |||||||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0