From 35ffcf6e42ccecacdc16c138527653eede85b99c Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 20 Jan 2014 13:12:30 -0800 Subject: [PATCH] Add PHUIObjectBoxView to Diffusion Tags Summary: Boxes for everyone Test Plan: Tested on libphutil locally Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8015 --- .../DiffusionRepositoryController.php | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php index f426d634fd..d1ff6caf70 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -359,25 +359,31 @@ final class DiffusionRepositoryController extends DiffusionController { $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); - $panel = id(new AphrontPanelView()) - ->setHeader(pht('Tags')) - ->setNoBackground(true); + $panel = new PHUIObjectBoxView(); + $header = new PHUIHeaderView(); + $header->setHeader(pht('Tags')); if ($more_tags) { - $panel->setCaption(pht('Showing the %d most recent tags.', $tag_limit)); + $header->setSubHeader( + pht('Showing the %d most recent tags.', $tag_limit)); } - $panel->addButton( - phutil_tag( - 'a', - array( - 'href' => $drequest->generateURI( + $icon = id(new PHUIIconView()) + ->setSpriteSheet(PHUIIconView::SPRITE_ICONS) + ->setSpriteIcon('tag'); + + $button = new PHUIButtonView(); + $button->setText(pht("Show All Tags")); + $button->setTag('a'); + $button->setIcon($icon); + $button->setHref($drequest->generateURI( array( 'action' => 'tags', - )), - 'class' => 'grey button', - ), - pht("Show All Tags \xC2\xBB"))); + ))); + + $header->addActionLink($button); + + $panel->setHeader($header); $panel->appendChild($view); return $panel;