@@ -27,36 +27,53 @@ public function processRequest() {
27
27
->setName (pht ('Applications ' ))
28
28
->setHref ($ this ->getApplicationURI ()));
29
29
30
- $ properties = $ this ->buildPropertyView ($ selected );
31
- $ actions = $ this ->buildActionView ($ user , $ selected );
32
-
33
- return $ this ->buildApplicationPage (
34
- array (
35
- $ crumbs ,
36
- id (new PhabricatorHeaderView ())->setHeader ($ title ),
37
- $ actions ,
38
- $ properties ,
39
- ),
40
- array (
41
- 'title ' => $ title ,
42
- 'device ' => true ,
43
- ));
44
- }
30
+ $ header = id (new PhabricatorHeaderView ())
31
+ ->setHeader ($ title );
45
32
46
- private function buildPropertyView ( PhabricatorApplication $ selected ) {
47
- $ properties = new PhabricatorPropertyListView ( );
33
+ $ status_tag = id ( new PhabricatorTagView ())
34
+ -> setType (PhabricatorTagView:: TYPE_STATE );
48
35
49
36
if ($ selected ->isInstalled ()) {
50
- $ properties -> addProperty (
51
- pht ( ' Status ' ), pht ( ' Installed ' ) );
37
+ $ status_tag -> setName ( pht ( ' Installed ' ));
38
+ $ status_tag -> setBackgroundColor (PhabricatorTagView:: COLOR_GREEN );
52
39
53
40
} else {
54
- $ properties -> addProperty (
55
- pht ( ' Status ' ), pht ( ' Uninstalled ' ) );
41
+ $ status_tag -> setName ( pht ( ' Uninstalled ' ));
42
+ $ status_tag -> setBackgroundColor (PhabricatorTagView:: COLOR_RED );
56
43
}
57
44
58
- $ properties ->addProperty (
59
- pht ('Description ' ), $ selected ->getShortDescription ());
45
+ if ($ selected ->isBeta ()) {
46
+ $ beta_tag = id (new PhabricatorTagView ())
47
+ ->setType (PhabricatorTagView::TYPE_STATE )
48
+ ->setName (pht ('Beta ' ))
49
+ ->setBackgroundColor (PhabricatorTagView::COLOR_GREY );
50
+ $ header ->addTag ($ beta_tag );
51
+ }
52
+
53
+
54
+ $ header ->addTag ($ status_tag );
55
+
56
+ $ properties = $ this ->buildPropertyView ($ selected );
57
+ $ actions = $ this ->buildActionView ($ user , $ selected );
58
+
59
+ return $ this ->buildApplicationPage (
60
+ array (
61
+ $ crumbs ,
62
+ $ header ,
63
+ $ actions ,
64
+ $ properties ,
65
+ ),
66
+ array (
67
+ 'title ' => $ title ,
68
+ 'device ' => true ,
69
+ ));
70
+ }
71
+
72
+ private function buildPropertyView (PhabricatorApplication $ selected ) {
73
+ $ properties = id (new PhabricatorPropertyListView ())
74
+ ->addProperty (
75
+ pht ('Description ' ), $ selected ->getShortDescription ()
76
+ );
60
77
61
78
return $ properties ;
62
79
}
0 commit comments