@@ -17,6 +17,8 @@ public function handleRequest(AphrontRequest $request) {
17
17
return $ response ;
18
18
}
19
19
20
+ require_celerity_resource ('diffusion-css ' );
21
+
20
22
$ viewer = $ this ->getViewer ();
21
23
$ drequest = $ this ->getDiffusionRequest ();
22
24
$ repository = $ drequest ->getRepository ();
@@ -25,11 +27,13 @@ public function handleRequest(AphrontRequest $request) {
25
27
$ crumbs ->setBorder (true );
26
28
27
29
$ header = $ this ->buildHeaderView ($ repository );
28
- $ curtain = $ this ->buildCurtain ($ repository );
29
30
$ property_table = $ this ->buildPropertiesTable ($ repository );
31
+ $ actions = $ this ->buildActionList ($ repository );
30
32
$ description = $ this ->buildDescriptionView ($ repository );
31
33
$ locate_file = $ this ->buildLocateFile ();
32
34
35
+ $ header ->setActionList ($ actions );
36
+
33
37
// Before we do any work, make sure we're looking at a some content: we're
34
38
// on a valid branch, and the repository is not empty.
35
39
$ page_has_content = false ;
@@ -88,14 +92,13 @@ public function handleRequest(AphrontRequest $request) {
88
92
89
93
$ view = id (new PHUITwoColumnView ())
90
94
->setHeader ($ header )
91
- ->setCurtain ($ curtain )
92
95
->setTabs ($ tabs )
93
- ->setMainColumn (array (
96
+ ->setFooter (array (
97
+ $ locate_file ,
94
98
$ property_table ,
95
99
$ description ,
96
- $ locate_file ,
97
- ))
98
- ->setFooter ($ content );
100
+ $ content ,
101
+ ));
99
102
100
103
return $ this ->newPage ()
101
104
->setTitle (
@@ -236,7 +239,8 @@ private function buildHeaderView(PhabricatorRepository $repository) {
236
239
->setPolicyObject ($ repository )
237
240
->setProfileHeader (true )
238
241
->setImage ($ repository ->getProfileImageURI ())
239
- ->setImageEditURL ('/diffusion/picture/ ' .$ repository ->getID ().'/ ' );
242
+ ->setImageEditURL ('/diffusion/picture/ ' .$ repository ->getID ().'/ ' )
243
+ ->addClass ('diffusion-profile-header ' );
240
244
241
245
if (!$ repository ->isTracked ()) {
242
246
$ header ->setStatus ('fa-ban ' , 'dark ' , pht ('Inactive ' ));
@@ -254,13 +258,15 @@ private function buildHeaderView(PhabricatorRepository $repository) {
254
258
return $ header ;
255
259
}
256
260
257
- private function buildCurtain (PhabricatorRepository $ repository ) {
261
+ private function buildActionList (PhabricatorRepository $ repository ) {
258
262
$ viewer = $ this ->getViewer ();
259
263
260
264
$ edit_uri = $ repository ->getPathURI ('manage/ ' );
261
- $ curtain = $ this ->newCurtainView ($ repository );
265
+ $ action_view = id (new PhabricatorActionListView ())
266
+ ->setUser ($ viewer )
267
+ ->setObject ($ repository );
262
268
263
- $ curtain ->addAction (
269
+ $ action_view ->addAction (
264
270
id (new PhabricatorActionView ())
265
271
->setName (pht ('Manage Repository ' ))
266
272
->setIcon ('fa-cogs ' )
@@ -270,14 +276,14 @@ private function buildCurtain(PhabricatorRepository $repository) {
270
276
$ push_uri = $ this ->getApplicationURI (
271
277
'pushlog/?repositories= ' .$ repository ->getMonogram ());
272
278
273
- $ curtain ->addAction (
279
+ $ action_view ->addAction (
274
280
id (new PhabricatorActionView ())
275
281
->setName (pht ('View Push Logs ' ))
276
282
->setIcon ('fa-list-alt ' )
277
283
->setHref ($ push_uri ));
278
284
}
279
285
280
- return $ curtain ;
286
+ return $ action_view ;
281
287
}
282
288
283
289
private function buildDescriptionView (PhabricatorRepository $ repository ) {
@@ -290,9 +296,8 @@ private function buildDescriptionView(PhabricatorRepository $repository) {
290
296
$ description = new PHUIRemarkupView ($ viewer , $ description );
291
297
$ view ->addTextContent ($ description );
292
298
return id (new PHUIObjectBoxView ())
293
- ->setHeaderText (pht ('Description ' ))
294
- ->setBackground (PHUIObjectBoxView::BLUE_PROPERTY )
295
- ->appendChild ($ view );
299
+ ->appendChild ($ view )
300
+ ->addClass ('diffusion-profile-description ' );
296
301
}
297
302
return null ;
298
303
}
@@ -455,15 +460,12 @@ private function buildLocateFile() {
455
460
id (new AphrontFormTypeaheadControl ())
456
461
->setHardpointID ('locate-control ' )
457
462
->setID ('locate-input ' )
458
- ->setLabel (pht ('Locate File ' )));
463
+ ->setPlaceholder (pht ('Locate File ' )));
459
464
$ form_box = id (new PHUIBoxView ())
460
- ->appendChild ($ form ->buildLayoutView ());
461
- $ locate_panel = id (new PHUIObjectBoxView ())
462
- ->setHeaderText (pht ('Locate File ' ))
463
- ->setBackground (PHUIObjectBoxView::BLUE_PROPERTY )
464
- ->appendChild ($ form_box );
465
+ ->appendChild ($ form ->buildLayoutView ())
466
+ ->addClass ('diffusion-profile-locate ' );
465
467
}
466
- return $ locate_panel ;
468
+ return $ form_box ;
467
469
}
468
470
469
471
private function buildBrowseTable (
0 commit comments