diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1710,6 +1710,7 @@ 'PHUIBadgeExample' => 'applications/uiexample/examples/PHUIBadgeExample.php', 'PHUIBadgeMiniView' => 'view/phui/PHUIBadgeMiniView.php', 'PHUIBadgeView' => 'view/phui/PHUIBadgeView.php', + 'PHUIBigInfoExample' => 'applications/uiexample/examples/PHUIBigInfoExample.php', 'PHUIBigInfoView' => 'view/phui/PHUIBigInfoView.php', 'PHUIBoxExample' => 'applications/uiexample/examples/PHUIBoxExample.php', 'PHUIBoxView' => 'view/phui/PHUIBoxView.php', @@ -6867,6 +6868,7 @@ 'PHUIBadgeExample' => 'PhabricatorUIExample', 'PHUIBadgeMiniView' => 'AphrontTagView', 'PHUIBadgeView' => 'AphrontTagView', + 'PHUIBigInfoExample' => 'PhabricatorUIExample', 'PHUIBigInfoView' => 'AphrontTagView', 'PHUIBoxExample' => 'PhabricatorUIExample', 'PHUIBoxView' => 'AphrontTagView', diff --git a/src/applications/uiexample/examples/PHUIBigInfoExample.php b/src/applications/uiexample/examples/PHUIBigInfoExample.php new file mode 100644 --- /dev/null +++ b/src/applications/uiexample/examples/PHUIBigInfoExample.php @@ -0,0 +1,48 @@ +getRequest(); + $viewer = $request->getUser(); + + $image = PhabricatorFile::loadBuiltin($viewer, + 'projects/v3/rocket.png'); + + $button = id(new PHUIButtonView()) + ->setTag('a') + ->setText(pht('Launch Away')) + ->setColor(PHUIButtonView::GREEN) + ->setHref('#'); + + $views = array(); + $views[] = id(new PHUIBigInfoView()) + ->setTitle(pht('Simply Slim')) + ->setDescription(pht('A simple description')) + ->addAction($button); + + $views[] = id(new PHUIBigInfoView()) + ->setTitle(pht('Basicly Basic')) + ->setIcon('fa-rocket') + ->setDescription(pht('A more basic description')) + ->addAction($button); + + $views[] = id(new PHUIBigInfoView()) + ->setTitle(pht('A Modern Example')) + ->setImage($image->getBestURI()) + ->setDescription(pht('A modern description with lots of frills.')) + ->addAction($button); + + + return phutil_tag_div('ml', $views); + } +} diff --git a/src/view/phui/PHUIBigInfoView.php b/src/view/phui/PHUIBigInfoView.php --- a/src/view/phui/PHUIBigInfoView.php +++ b/src/view/phui/PHUIBigInfoView.php @@ -49,6 +49,7 @@ protected function getTagContent() { require_celerity_resource('phui-big-info-view-css'); + $icon = null; if ($this->icon) { $icon = id(new PHUIIconView()) ->setIcon($this->icon)