mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
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
This commit is contained in:
parent
6bbba1e315
commit
59ef3a31d3
2 changed files with 5 additions and 21 deletions
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue