Make some incremental improvements in Diviner

Summary: Gets TOC populated for articles, at least, and fixes a few other things.

Test Plan: {F45474}

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6144
This commit is contained in:
epriestley
2013-06-06 08:36:51 -07:00
parent 76c8705a27
commit 1433a035c6
11 changed files with 170 additions and 45 deletions

View File

@@ -29,7 +29,7 @@ final class DivinerBookController extends DivinerController {
$crumbs->addCrumb(
id(new PhabricatorCrumbView())
->setName($book->getTitle())
->setName($book->getShortTitle())
->setHref('/book/'.$book->getName().'/'));
$header = id(new PhabricatorHeaderView())->setHeader($book->getTitle());
@@ -56,19 +56,7 @@ final class DivinerBookController extends DivinerController {
$out = array();
foreach ($groups as $group => $atoms) {
$group_info = idx($group_spec, $group);
if (!is_array($group_info)) {
$group_info = array();
}
$group_name = idx($group_info, 'name');
if (!strlen($group_name)) {
if (strlen($group)) {
$group_name = $group;
} else {
$group_name = pht('Free Radicals');
}
}
$group_name = $book->getGroupName($group);
$out[] = id(new PhabricatorHeaderView())
->setHeader($group_name);