Replace all instances of AphrontSideNavView with AphrontSideNavFilterView

Summary:
AphrontSideNavView is an old class which required you to do a lot of work; it was obsoleted by AphrontSideNavFilterView. Remove all direct callsites so I can clean it up.

This is a precursor to letting me render a filter menu as a dropdown menu for T1960.

Test Plan:
Examined each interface for correct filter construction and selection:

  - Browsed Diffusion
  - Browsed Differential
  - Browsed Files
  - Browsed Slowvote
  - Browsed Phriction
  - Browsed repo edit interface

Grepped for `AphrontSideNavView`. The only remaining instances are in `AphrontSideNavView` itself and `AphrontSideNavFilterView` (which currently uses it).

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1960

Differential Revision: https://secure.phabricator.com/D4034
This commit is contained in:
epriestley
2012-12-07 13:30:31 -08:00
parent 6482876cf3
commit 20ee3003b5
7 changed files with 40 additions and 110 deletions

View File

@@ -33,19 +33,13 @@ final class PhabricatorRepositoryEditController
$this->view = head_key($views);
}
$nav = new AphrontSideNavView();
$nav = new AphrontSideNavFilterView();
$base_uri = new PhutilURI('/repository/edit/'.$repository->getID().'/');
$nav->setBaseURI($base_uri);
foreach ($views as $view => $name) {
$nav->addNavItem(
phutil_render_tag(
'a',
array(
'class' => ($view == $this->view
? 'aphront-side-nav-selected'
: null),
'href' => '/repository/edit/'.$repository->getID().'/'.$view.'/',
),
phutil_escape_html($name)));
$nav->addFilter($view, $name);
}
$nav->selectFilter($this->view, null);
$nav->appendChild($this->renderDaemonNotice());