Differential D20432 Diff 48785 src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
| Show All 18 Lines | final class DiffusionRepositoryBranchesManagementPanel | ||||
| } | } | ||||
| public function getManagementPanelIcon() { | public function getManagementPanelIcon() { | ||||
| $repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
| $has_any = | $has_any = | ||||
| $repository->getDetail('default-branch') || | $repository->getDetail('default-branch') || | ||||
| $repository->getTrackOnlyRules() || | $repository->getTrackOnlyRules() || | ||||
| $repository->getAutocloseOnlyRules(); | $repository->getPermanentRefRules(); | ||||
| if ($has_any) { | if ($has_any) { | ||||
| return 'fa-code-fork'; | return 'fa-code-fork'; | ||||
| } else { | } else { | ||||
| return 'fa-code-fork grey'; | return 'fa-code-fork grey'; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | public function buildManagementPanelContent() { | ||||
| $view->addProperty(pht('Track Only'), $track_only); | $view->addProperty(pht('Track Only'), $track_only); | ||||
| $publishing_disabled = $repository->isPublishingDisabled(); | $publishing_disabled = $repository->isPublishingDisabled(); | ||||
| if ($publishing_disabled) { | if ($publishing_disabled) { | ||||
| $permanent_display = | $permanent_display = | ||||
| phutil_tag('em', array(), pht('Publishing Disabled')); | phutil_tag('em', array(), pht('Publishing Disabled')); | ||||
| } else { | } else { | ||||
| $permanent_rules = $repository->getAutocloseOnlyRules(); | $permanent_rules = $repository->getPermanentRefRules(); | ||||
| if ($permanent_rules) { | if ($permanent_rules) { | ||||
| $permanent_display = implode(', ', $permanent_rules); | $permanent_display = implode(', ', $permanent_rules); | ||||
| } else { | } else { | ||||
| $permanent_display = phutil_tag('em', array(), pht('All Branches')); | $permanent_display = phutil_tag('em', array(), pht('All Branches')); | ||||
| } | } | ||||
| } | } | ||||
| $view->addProperty(pht('Permanent Refs'), $permanent_display); | $view->addProperty(pht('Permanent Refs'), $permanent_display); | ||||
| ▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines | |||||