From 8bddade8341890a964bf4e571cfcd0d57dc627d1 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Tue, 7 Jun 2011 15:24:28 -0400 Subject: [PATCH] Some preliminary Pastebin stuff. --- .../paste/controller/base/__init__.php | 15 +++++ .../PhabricatorPasteCreateController.php | 55 +++++++++++++++++++ .../paste/controller/create/__init__.php | 12 ++++ .../home/PhabricatorPasteHomeController.php | 29 ++++++++++ .../paste/controller/home/__init__.php | 12 ++++ 5 files changed, 123 insertions(+) create mode 100644 src/applications/paste/controller/base/__init__.php create mode 100644 src/applications/paste/controller/create/PhabricatorPasteCreateController.php create mode 100644 src/applications/paste/controller/create/__init__.php create mode 100644 src/applications/paste/controller/home/PhabricatorPasteHomeController.php create mode 100644 src/applications/paste/controller/home/__init__.php diff --git a/src/applications/paste/controller/base/__init__.php b/src/applications/paste/controller/base/__init__.php new file mode 100644 index 0000000000..b488b10f35 --- /dev/null +++ b/src/applications/paste/controller/base/__init__.php @@ -0,0 +1,15 @@ +getRequest(); + $user = $request->getUser(); + + $form = new AphrontFormView(); + $form + ->setUser($user) + ->setAction($request->getRequestURI()->getPath()) + ->appendChild( + id(new AphrontFormTextControl()) + ->setLabel('Title') + ->setName('title')) + ->appendChild( + id(new AphrontFormTextAreaControl()) + ->setLabel('Text') + ->setName('text')) + ->appendChild( + id(new AphrontFormSubmitControl()) + ->addCancelButton('/paste/') + ->setValue('Create Paste')); + + $panel = new AphrontPanelView(); + $panel->setWidth(AphrontPanelView::WIDTH_FULL); + $panel->setHeader("Create a Paste"); + $panel->appendChild($form); + + return $this->buildStandardPageResponse( + $panel, + array( + 'title' => 'Paste Creation', + 'tab' => 'create', + )); + } +} \ No newline at end of file diff --git a/src/applications/paste/controller/create/__init__.php b/src/applications/paste/controller/create/__init__.php new file mode 100644 index 0000000000..0e297abd04 --- /dev/null +++ b/src/applications/paste/controller/create/__init__.php @@ -0,0 +1,12 @@ +buildStandardPageResponse( + null, + array( + 'title' => 'Paste', + 'tab' => 'home', + )); + } +} \ No newline at end of file diff --git a/src/applications/paste/controller/home/__init__.php b/src/applications/paste/controller/home/__init__.php new file mode 100644 index 0000000000..65db4d0b96 --- /dev/null +++ b/src/applications/paste/controller/home/__init__.php @@ -0,0 +1,12 @@ +