From 59ef3a31d357b08f527594b3585a5007c966f038 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 31 Mar 2016 14:57:39 -0700 Subject: [PATCH] Clean up BadgeView a little bit Summary: Uses BLUE_PROPERTY on Recipients box, removes redundent properties since we render the badge itself already. Test Plan: View a badge with and without a description. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15553 --- .../PhabricatorBadgesViewController.php | 20 +------------------ .../PhabricatorBadgesRecipientsListView.php | 6 ++++-- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/applications/badges/controller/PhabricatorBadgesViewController.php b/src/applications/badges/controller/PhabricatorBadgesViewController.php index 3e3d1ffbc6..9b61e10b44 100644 --- a/src/applications/badges/controller/PhabricatorBadgesViewController.php +++ b/src/applications/badges/controller/PhabricatorBadgesViewController.php @@ -70,7 +70,7 @@ final class PhabricatorBadgesViewController $timeline, $add_comment, )) - ->addPropertySection(pht('BADGE DETAILS'), $details); + ->addPropertySection(pht('DESCRIPTION'), $details); return $this->newPage() ->setTitle($title) @@ -86,26 +86,8 @@ final class PhabricatorBadgesViewController $view = id(new PHUIPropertyListView()) ->setUser($viewer); - $quality_name = PhabricatorBadgesQuality::getQualityName( - $badge->getQuality()); - - $view->addProperty( - pht('Quality'), - $quality_name); - - $view->addProperty( - pht('Icon'), - id(new PhabricatorBadgesIconSet()) - ->getIconLabel($badge->getIcon())); - - $view->addProperty( - pht('Flavor'), - $badge->getFlavor()); - $description = $badge->getDescription(); if (strlen($description)) { - $view->addSectionHeader( - pht('Description'), PHUIPropertyListView::ICON_SUMMARY); $view->addTextContent( new PHUIRemarkupView($viewer, $description)); } diff --git a/src/applications/badges/view/PhabricatorBadgesRecipientsListView.php b/src/applications/badges/view/PhabricatorBadgesRecipientsListView.php index 68633a6a29..20fe2a0b3d 100644 --- a/src/applications/badges/view/PhabricatorBadgesRecipientsListView.php +++ b/src/applications/badges/view/PhabricatorBadgesRecipientsListView.php @@ -27,7 +27,8 @@ final class PhabricatorBadgesRecipientsListView extends AphrontView { PhabricatorPolicyCapability::CAN_EDIT); $list = id(new PHUIObjectItemListView()) - ->setNoDataString(pht('This badge does not have any recipients.')); + ->setNoDataString(pht('This badge does not have any recipients.')) + ->setFlush(true); foreach ($handles as $handle) { $remove_uri = '/badges/recipients/'. @@ -51,7 +52,8 @@ final class PhabricatorBadgesRecipientsListView extends AphrontView { } $box = id(new PHUIObjectBoxView()) - ->setHeaderText(pht('Recipients')) + ->setHeaderText(pht('RECIPIENTS')) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->setObjectList($list); return $box;