@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a UIExamples page for PHUIBigInfoView

Summary: Fixes the icon bug and builds a basic examples page for future testing.

Test Plan: Visit uiexampls and various types of info views.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18356

+51
+2
src/__phutil_library_map__.php
··· 1710 1710 'PHUIBadgeExample' => 'applications/uiexample/examples/PHUIBadgeExample.php', 1711 1711 'PHUIBadgeMiniView' => 'view/phui/PHUIBadgeMiniView.php', 1712 1712 'PHUIBadgeView' => 'view/phui/PHUIBadgeView.php', 1713 + 'PHUIBigInfoExample' => 'applications/uiexample/examples/PHUIBigInfoExample.php', 1713 1714 'PHUIBigInfoView' => 'view/phui/PHUIBigInfoView.php', 1714 1715 'PHUIBoxExample' => 'applications/uiexample/examples/PHUIBoxExample.php', 1715 1716 'PHUIBoxView' => 'view/phui/PHUIBoxView.php', ··· 6867 6868 'PHUIBadgeExample' => 'PhabricatorUIExample', 6868 6869 'PHUIBadgeMiniView' => 'AphrontTagView', 6869 6870 'PHUIBadgeView' => 'AphrontTagView', 6871 + 'PHUIBigInfoExample' => 'PhabricatorUIExample', 6870 6872 'PHUIBigInfoView' => 'AphrontTagView', 6871 6873 'PHUIBoxExample' => 'PhabricatorUIExample', 6872 6874 'PHUIBoxView' => 'AphrontTagView',
+48
src/applications/uiexample/examples/PHUIBigInfoExample.php
··· 1 + <?php 2 + 3 + final class PHUIBigInfoExample extends PhabricatorUIExample { 4 + 5 + public function getName() { 6 + return pht('Big Info View'); 7 + } 8 + 9 + public function getDescription() { 10 + return pht( 11 + 'Basic New User State information block.'); 12 + } 13 + 14 + public function renderExample() { 15 + $request = $this->getRequest(); 16 + $viewer = $request->getUser(); 17 + 18 + $image = PhabricatorFile::loadBuiltin($viewer, 19 + 'projects/v3/rocket.png'); 20 + 21 + $button = id(new PHUIButtonView()) 22 + ->setTag('a') 23 + ->setText(pht('Launch Away')) 24 + ->setColor(PHUIButtonView::GREEN) 25 + ->setHref('#'); 26 + 27 + $views = array(); 28 + $views[] = id(new PHUIBigInfoView()) 29 + ->setTitle(pht('Simply Slim')) 30 + ->setDescription(pht('A simple description')) 31 + ->addAction($button); 32 + 33 + $views[] = id(new PHUIBigInfoView()) 34 + ->setTitle(pht('Basicly Basic')) 35 + ->setIcon('fa-rocket') 36 + ->setDescription(pht('A more basic description')) 37 + ->addAction($button); 38 + 39 + $views[] = id(new PHUIBigInfoView()) 40 + ->setTitle(pht('A Modern Example')) 41 + ->setImage($image->getBestURI()) 42 + ->setDescription(pht('A modern description with lots of frills.')) 43 + ->addAction($button); 44 + 45 + 46 + return phutil_tag_div('ml', $views); 47 + } 48 + }
+1
src/view/phui/PHUIBigInfoView.php
··· 49 49 protected function getTagContent() { 50 50 require_celerity_resource('phui-big-info-view-css'); 51 51 52 + $icon = null; 52 53 if ($this->icon) { 53 54 $icon = id(new PHUIIconView()) 54 55 ->setIcon($this->icon)