Modernize Paste
Summary: - Add a PhabricatorApplication. - Make most of the views work well on tablets / phones. The actual "Create" form doesn't, but everything else is good -- need to make device-friendly form layouts before I can do the form. Test Plan: Will attach screenshots. Reviewers: btrahan, chad, vrana Reviewed By: btrahan CC: aran Maniphest Tasks: T1569 Differential Revision: https://secure.phabricator.com/D3293
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,6 +18,26 @@
|
||||
|
||||
abstract class PhabricatorPasteController extends PhabricatorController {
|
||||
|
||||
public function buildSideNavView(PhabricatorPaste $paste = null) {
|
||||
$nav = new AphrontSideNavFilterView();
|
||||
$nav->setBaseURI(new PhutilURI($this->getApplicationURI('filter/')));
|
||||
|
||||
if ($paste) {
|
||||
$nav->addFilter('paste', 'P'.$paste->getID(), '/P'.$paste->getID());
|
||||
$nav->addSpacer();
|
||||
}
|
||||
|
||||
$nav->addLabel('Create');
|
||||
$nav->addFilter('create', 'New Paste');
|
||||
|
||||
$nav->addSpacer();
|
||||
$nav->addLabel('Pastes');
|
||||
$nav->addFilter('my', 'My Pastes');
|
||||
$nav->addFilter('all', 'All Pastes');
|
||||
|
||||
return $nav;
|
||||
}
|
||||
|
||||
public function buildStandardPageResponse($view, array $data) {
|
||||
|
||||
$page = $this->buildStandardPageView();
|
||||
|
||||
Reference in New Issue
Block a user