Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14059275
D11961.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D11961.diff
View Options
diff --git a/src/applications/owners/controller/PhabricatorOwnersController.php b/src/applications/owners/controller/PhabricatorOwnersController.php
--- a/src/applications/owners/controller/PhabricatorOwnersController.php
+++ b/src/applications/owners/controller/PhabricatorOwnersController.php
@@ -44,8 +44,11 @@
break;
}
- $crumbs = $this->buildApplicationCrumbs();
- $crumbs->addTextCrumb($title);
+ return $nav;
+ }
+
+ protected function buildApplicationCrumbs() {
+ $crumbs = parent::buildApplicationCrumbs();
$crumbs->addAction(
id(new PHUIListItemView())
@@ -53,9 +56,7 @@
->setHref('/owners/new/')
->setIcon('fa-plus-square'));
- $nav->setCrumbs($crumbs);
-
- return $nav;
+ return $crumbs;
}
public function buildApplicationMenu() {
diff --git a/src/applications/owners/controller/PhabricatorOwnersDetailController.php b/src/applications/owners/controller/PhabricatorOwnersDetailController.php
--- a/src/applications/owners/controller/PhabricatorOwnersDetailController.php
+++ b/src/applications/owners/controller/PhabricatorOwnersDetailController.php
@@ -111,27 +111,24 @@
'wide',
));
- $panel = new AphrontPanelView();
- $panel->setNoBackground();
- $panel->setHeader(
+ $panel = new PHUIObjectBoxView();
+ $header = new PHUIHeaderView();
+ $header->setHeader(
pht('Package Details for "%s"', $package->getName()));
- $panel->addButton(
- javelin_tag(
- 'a',
- array(
- 'href' => '/owners/delete/'.$package->getID().'/',
- 'class' => 'button grey',
- 'sigil' => 'workflow',
- ),
- pht('Delete Package')));
- $panel->addButton(
- phutil_tag(
- 'a',
- array(
- 'href' => '/owners/edit/'.$package->getID().'/',
- 'class' => 'button',
- ),
- pht('Edit Package')));
+ $header->addActionLink(
+ id(new PHUIButtonView())
+ ->setTag('a')
+ ->setHref('/owners/delete/'.$package->getID().'/')
+ ->addSigil('workflow')
+ ->setText(pht('Delete Package')));
+
+ $header->addActionLink(
+ id(new PHUIButtonView())
+ ->setTag('a')
+ ->setHref('/owners/edit/'.$package->getID().'/')
+ ->setText(pht('Edit Package')));
+
+ $panel->setHeader($header);
$panel->appendChild($table);
$key = 'package/'.$package->getID();
@@ -185,13 +182,10 @@
$commit_views[] = array(
'view' => $view,
'header' => pht('Recent Commits in Package'),
- 'button' => phutil_tag(
- 'a',
- array(
- 'href' => $commit_uri,
- 'class' => 'button grey',
- ),
- pht('View All Package Commits')),
+ 'button' => id(new PHUIButtonView())
+ ->setTag('a')
+ ->setHref($commit_uri)
+ ->setText(pht('View All Package Commits')),
);
$phids = array();
@@ -203,26 +197,29 @@
$commit_panels = array();
foreach ($commit_views as $commit_view) {
- $commit_panel = new AphrontPanelView();
- $commit_panel->setNoBackground();
- $commit_panel->setHeader($commit_view['header']);
+ $commit_panel = new PHUIObjectBoxView();
+ $header = new PHUIHeaderView();
+ $header->setHeader($commit_view['header']);
if (isset($commit_view['button'])) {
- $commit_panel->addButton($commit_view['button']);
+ $header->addActionLink($commit_view['button']);
}
$commit_view['view']->setHandles($handles);
+ $commit_panel->setHeader($header);
$commit_panel->appendChild($commit_view['view']);
$commit_panels[] = $commit_panel;
}
+ $crumbs = $this->buildApplicationCrumbs();
+ $crumbs->addTextCrumb($package->getName());
+
$nav = $this->buildSideNavView();
+ $nav->appendChild($crumbs);
$nav->appendChild($panel);
$nav->appendChild($commit_panels);
return $this->buildApplicationPage(
- array(
- $nav,
- ),
+ $nav,
array(
'title' => pht('Package %s', $package->getName()),
));
diff --git a/src/applications/owners/controller/PhabricatorOwnersEditController.php b/src/applications/owners/controller/PhabricatorOwnersEditController.php
--- a/src/applications/owners/controller/PhabricatorOwnersEditController.php
+++ b/src/applications/owners/controller/PhabricatorOwnersEditController.php
@@ -251,7 +251,15 @@
->setFormErrors($errors)
->setForm($form);
+ $crumbs = $this->buildApplicationCrumbs();
+ if ($package->getID()) {
+ $crumbs->addTextCrumb(pht('Edit %s', $package->getName()));
+ } else {
+ $crumbs->addTextCrumb(pht('New Package'));
+ }
+
$nav = $this->buildSideNavView();
+ $nav->appendChild($crumbs);
$nav->appendChild($form_box);
return $this->buildApplicationPage(
diff --git a/src/applications/owners/controller/PhabricatorOwnersListController.php b/src/applications/owners/controller/PhabricatorOwnersListController.php
--- a/src/applications/owners/controller/PhabricatorOwnersListController.php
+++ b/src/applications/owners/controller/PhabricatorOwnersListController.php
@@ -130,7 +130,7 @@
}
$packages = $package->loadAllFromArray($data);
- $header = pht('Owned Packages');
+ $header = pht('Project Packages');
$nodata = pht('No owned packages');
break;
case 'all':
@@ -198,15 +198,19 @@
->setValue(pht('Search for Packages')));
$filter->appendChild($form);
+ $title = pht('Package Index');
+
+ $crumbs = $this->buildApplicationCrumbs();
+ $crumbs->addTextCrumb($header);
+ $crumbs->setBorder(true);
$nav = $this->buildSideNavView();
+ $nav->appendChild($crumbs);
$nav->appendChild($filter);
$nav->appendChild($content);
return $this->buildApplicationPage(
- array(
- $nav,
- ),
+ $nav,
array(
'title' => pht('Package Index'),
));
@@ -330,10 +334,9 @@
'narrow',
));
- $panel = new AphrontPanelView();
- $panel->setHeader($header);
+ $panel = new PHUIObjectBoxView();
+ $panel->setHeaderText($header);
$panel->appendChild($table);
- $panel->setNoBackground();
return $panel;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 6:42 PM (1 d, 6 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6724069
Default Alt Text
D11961.diff (6 KB)
Attached To
Mode
D11961: Modernize Owners a bit
Attached
Detach File
Event Timeline
Log In to Comment