Modernize Diffusion "history" view

Summary: Fixes T903. Knock out the side nav, make it policy-aware, other minor cleanup.

Test Plan: See below.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T903

Differential Revision: https://secure.phabricator.com/D7064
This commit is contained in:
epriestley
2013-09-23 12:55:23 -07:00
parent b3fa9d0c2f
commit 0271b051ae
4 changed files with 103 additions and 44 deletions

View File

@@ -202,7 +202,7 @@ abstract class DiffusionController extends PhabricatorController {
$crumb = id(new PhabricatorCrumbView())
->setName($view_name);
if ($view == 'browse' || $view == 'change') {
if ($view == 'browse' || $view == 'change' || $view == 'history') {
$crumb_list[] = $crumb;
return $crumb_list;
}
@@ -286,7 +286,7 @@ abstract class DiffusionController extends PhabricatorController {
return $this->getApplicationURI($repository->getCallsign().'/'.$path);
}
protected function renderPathLinks(DiffusionRequest $drequest) {
protected function renderPathLinks(DiffusionRequest $drequest, $action) {
$path = $drequest->getPath();
$path_parts = array_filter(explode('/', trim($path, '/')));
@@ -297,7 +297,7 @@ abstract class DiffusionController extends PhabricatorController {
array(
'href' => $drequest->generateURI(
array(
'action' => 'browse',
'action' => $action,
'path' => '',
)),
),
@@ -315,7 +315,7 @@ abstract class DiffusionController extends PhabricatorController {
array(
'href' => $drequest->generateURI(
array(
'action' => 'browse',
'action' => $action,
'path' => $accum,
)),
),